Started actors as objects with local and grid varieties. #10
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@jakzal Please take a look. The idea is to make actors less conspicuous and to make sure that actors can be clearly created in the local-only
Stage
or in aGrid
extension ofStage
.For the setting, we have some issues with actor serialization because some actors are being put on the grid that shouldn't be. See below. What follows is not only a nicer way to think of domain model actors as objects, it will also provide a simple fix for the serialization issues.
XOOM Starter
codegen
must be sure thatvlingo-symbio-*
storage actors are created locally, such that when an is serialized to distribute on the grid, the stores are not serialized. In other words, there must be an explicit distinction between local-only actors and those that belong on the grid. A simple rule is that anyio.vlingo.lattice.model
entity type is grid distributable. Other actors can be as well, butStateStore
,Journal
,ObjectStore
, etc., must never be put on the grid.Also I think there should be a very simple way to make the
ObjectDescriptor
use theActorInstantiator
. I noted your example use of the lambda/function() -> new SomeEntity(...)
. It would be great to introduce this approach into theObjectDescriptor
andActorInstantiator
. In that way we can make each new actor instance a matter of applying a function rather than instantiating a new specializedActorInstantiator
type; meaning that maybe we can use a general-purposeActorInstantiator
that can provide type-safe parameters for the function:() -> new SomeEntity(...)
These are really incomplete ideas because I haven't had time to experiment. In general, WDYT? Can you run with this?
/cc @danilo-ambrosio in the mean time we need to be sure that the
Stage
whereStateStore
,Journal
,ObjectStore
, etc., are created must be the local/defaultStage
and not theGrid
. Perhaps a better way to put it is that onlyStatefulEntity
,EventSourced
,CommandSourced
, various abstractProcesses
, andObjectEntity
extenders may be placed on theGrid
.