Code Monkey home page Code Monkey logo

Comments (2)

akashlal avatar akashlal commented on July 26, 2024

Hey @muwaqar, you are free to choose any communication mechanism for sending messages. We only recommend hiding it behind an interface so that you can supply a mock for testing. See the Raft sample that uses Azure Service Bus for communication but also uses a mock for running tests with multiple "remote" state machines. The mock, in some sense, should capture the messaging guarantee that the real system provides. Use the messaging system that makes most sense for your application/service.

I perhaps don't fully understand your scenario, but let me mention a couple of things. A Coyote StateMachine does not hold any compute resources when it has nothing to do (e.g., its inbox is empty). It only holds on to its in-memory object. If you want to further reclaim its memory then yes, should could store it away and rehydrate when work arrives. Otherwise you can keep it alive. It will wake up as soon as you send a message to it.

Polling can be easy to implement sometimes. Another option is to send out a message on task completion; the other side just waits for this message to arrive. But again, perhaps I don't follow all the details here.

from coyote.

muwaqar avatar muwaqar commented on July 26, 2024

This clears up things in my mind; regardless of however we send the message, the underlying nature of the messaging system can be captured in a mock and can be tested. I'll study the Raft sample too.

Thanks for the help.

from coyote.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.