I am finding it hard to find any detailed documentation on the use of StatelessWorkers.
I want to achieve something similar to this. As suggested in the document I need to use Stateless Workers in order to process some messages and activate the grains that will eventually hold the state.
I would like to have multiple instances of a dispatcher grain processing the "initialization" since this grain by no means handles any state and the messages do not need to be queued in order.
Do I need to mark this grain as Reentrant? or Will the StatelessWorker (attribute) be enough?
With regards to activation, it seems like I need to inherit from
You can create a stateless worker by inheriting
IGrainWithIntegerKey and using a key
Stateless workers are the same as normal grains with a couple of differences:
They are subject to the same deactivation semantics.
It might be surprising that stateless workers have keys, but there are couple of reasons why keys might be useful:
But if these features aren't useful to you, the convention is to use a key of