static void Main(string[] args)
        {
            using (var actorSystem = ActorSystem.Create("simulator"))
            {
                var firstProj     = Guid.NewGuid();
                var secondProj    = Guid.NewGuid();
                var notifierProps = Props.Create(() => new SimulationNotifierActor());

                var systemActors = new SystemActors(actorSystem)
                {
                    SimulationNotifier = actorSystem.ActorOf(notifierProps)
                };

                var props            = Props.Create(() => new CoordinatorActor(systemActors));
                var coordinatorActor = actorSystem.ActorOf(props, "SimulationCoordinator");

                var coActorSelection = actorSystem.ActorSelection("akka.tcp://TechnologyA@localhost:8091/user/coordinator");
                coActorSelection.Tell(new StartSimulation());

                actorSystem.WhenTerminated.Wait();
                Console.ReadLine();
            }
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            var url = "http://+:12345";

            using (var actorSystem = ActorSystem.Create("CoolSystem"))
            {
                var app = WebHost.CreateDefaultBuilder(args)
                          .ConfigureServices((services) =>
                {
                    var sa = new SystemActors()
                    {
                        HealthCheckActor    = actorSystem.ActorOf(HealthCheckActor.Props(), "healthCheck"),
                        FooCoordinatorActor = actorSystem.ActorOf(FooCoordinatorActor.Props(), "fooCoordinator"),
                        BarActor            = actorSystem.ActorOf(BarActor.Props(), "bar")
                    };
                    services.AddSingleton(sa);
                })
                          .UseStartup <Startup>()
                          .UseUrls(url)
                          .Build();

                app.Run();
            }
        }
Beispiel #3
0
 public TraitLocationAttribute(SystemActors systemActors)
 {
     SystemActors = systemActors;
 }
 public FooBarController(SystemActors systemActors)
 {
     _systemActors = systemActors;
 }
 public ActorInfo this[SystemActors key] => dict[key.ToString().ToLowerInvariant()];
Beispiel #6
0
 public HealthCheck(SystemActors systemActors)
 {
     _systemActors = systemActors;
 }