public static void Start(string clusterName, string address, IClusterProvider provider) { var(h, p) = ParseAddress(address); var kinds = RemotingSystem.GetKnownKinds(); SubscribePartitionKindsToEventStream(); SpawnPidCacheActor(); SpawnMembershipActor(); SubscribeMembershipActorToEventStream(); provider.RegisterMember(clusterName, h, p, kinds); provider.MonitorMemberStatusChanges(); }
public static void Start(string clusterName, IClusterProvider provider) { _logger.LogInformation("Starting Proto.Actor cluster"); var(h, p) = ParseAddress(ProcessRegistry.Instance.Address); var kinds = Remote.Remote.GetKnownKinds(); Partition.SpawnPartitionActors(kinds); Partition.SubscribeToEventStream(); PidCache.Spawn(); MemberList.Spawn(); MemberList.SubscribeToEventStream(); provider.RegisterMemberAsync(clusterName, h, p, kinds).Wait(); provider.MonitorMemberStatusChanges(); _logger.LogInformation("Cluster started"); }
public static void Start(string clusterName, string address, int port, IClusterProvider provider) { Remote.Remote.Start(address, port); cp = provider; Serialization.RegisterFileDescriptor(ProtosReflection.Descriptor); Logger.LogInformation("Starting Proto.Actor cluster"); var(h, p) = ParseAddress(ProcessRegistry.Instance.Address); var kinds = Remote.Remote.GetKnownKinds(); Partition.SpawnPartitionActors(kinds); Partition.SubscribeToEventStream(); PidCache.Spawn(); PidCache.SubscribeToEventStream(); MemberList.Spawn(); MemberList.SubscribeToEventStream(); cp.RegisterMemberAsync(clusterName, h, p, kinds).Wait(); cp.MonitorMemberStatusChanges(); Logger.LogInformation("Started Cluster"); }