Comments (2)
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.
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)
- fix compatibility issue with VS Code coverage and assembly rewriting HOT 3
- include the test method name in the schedule file
- Why does coyote find no bugs in this code? HOT 1
- fix send event logs when actor runtime has terminated
- Question: About Coyote supporting .NET Core HOT 2
- coyote test failure: Could not load file or assembly 'Microsoft.VisualStudio.TestPlatform.TestFramework, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. HOT 5
- Deadlock when using SemaphoreSlim HOT 9
- Error: Please provide RewritingOptions.AssemblyPaths HOT 3
- Improve logging infrastructure when used with xUnit HOT 4
- disable periodic deadlock monitor when running in a debugger
- InvalidProgramException while trying coyote on my library. HOT 13
- IAsyncEnumerable with ToArrayAsync System.BadImageFormatException HOT 2
- race in updating coverage report
- Exception when trying to rewrite WPF .NET 6.0 application; unable to find PresentationCore HOT 5
- Potential bug with race condition HOT 4
- Deadlock if Interleave point inside a static constructor
- Unable to load one or more of the requested types
- Reschdule after AutoResetEvent.Set HOT 6
- System.NullReferenceException when using Timer in test class
- "Object reference not set to an instance of an object" when running the rewriter.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from coyote.