Reputation: 583
The Akka.Net cluster requires a single ActorSystem but if what if I have several ActorSystems (Distributed Apps) that need to coordinate synchronously or asynchronously?
How to handle shared message libraries? Perhaps it would be best not to share anything (other than a generic message library) and use a dynamic message, such as: DynamicJsonMessageBase.
How to handle service discovery?
Background: I am designing a microservices architecture using Akka.Net that will probably employ Lighthouse for discovery, REST HTTP API for backend agents/portals, and incorporate a transport mechanism for sending/receiving messages to non-Actor services.
Upvotes: 1
Views: 1188
Reputation: 7542
Usually your cluster consists of multiple actor systems. However in Akka.NET clusters can be heterogeneous, which means that nodes (actor systems) may differ from each other in terms of performed operations and loaded assemblies. To differentiate them in this regard, you can configure each actor system with different set of roles.
Cluster roles can also be used to limit the communication between nodes when updating the code inside the cluster - so that nodes with the older code won't try to talk with the updated ones. This allows to perform incremental update of the cluster without shutting it down.
Service discovery is the best achieved using third-party provider, which already enables such thing i.e. Consul, Azure Service Fabric, etcd or Zookeeper.
Upvotes: 1