GridAPI is the same as you would expect from any
Stagewith one exception: the
Actorimplementations that should be started on a
Gridmust have a grid-compatible
Address. There are no other requirements, such as implementing a special interface or extending an abstract base class.
Griduse one of the static
Grid.start(...)methods. You may then start any actor that has a grid-compatible
Addressas you would normally do on a
ProductEntityactor instance is assigned a grid-compatible
Address, and is therefore reachable by any message sender on the
GridNodein 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
Addressdistributes on the hash ring data structure. For example, if there are three nodes in the cluster, each actor
Addressmust 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.
Addressis 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.