Stage
. The Grid
API is the same as you would expect from any Stage
with one exception: the Actor
implementations that should be started on a Grid
must have a grid-compatible Address
. There are no other requirements, such as implementing a special interface or extending an abstract base class.Grid
use one of the static Grid.start(...)
methods. You may then start any actor that has a grid-compatible Address
as you would normally do on a Stage
.ProductEntity
actor instance is assigned a grid-compatible Address
, and is therefore reachable by any message sender on the Grid
.GridNode
. Each GridNode
in the cluster has a copy of a hash ring data structure. Without going into details on how a hash ring works, it is used to determine where in the cluster a given actor is to be distributed and subsequently found within the grid. An actor's node location is determined by where the hash of its Address
distributes on the hash ring data structure. For example, if there are three nodes in the cluster, each actor Address
must hash into one of the three nodes. This means that a given actor purposely has a single instance in a single grid node in the cluster; that is, that one actor instance is pinned to a given node. Address
is used to look up the grid node on which it is pinned. The message is serialized, sent across a network socket channel to the node of the target actor, deserialized, and delivered to the actor via its mailbox.Grid
is a specialization (extension) of Stage
. When a Grid
is instantiated, its construction process forces the eviction service to be enabled on its behalf. This is accomplished by using either a default configuration or the one configured through the XOOM Actors plugin configuration, but the enabled
flag is force-set to true
regardless of what is configured by default (suggested disabled). Note that this has no effect on other Stage
instances, such as the default Stage
. To reiterate, the forced enablement is performed only for a Grid
as it is being newly instantiated, and it will remain in effect for the lifetime of the Grid
.