Пример #1
0
        public static void SetupActorSystem()
        {
            var actorSystemFactory = new ShardedActorSystemFactory(8964, "eventActorSystemForTesting", "inmem", "127.0.0.1:8964");
            var actorSystem        = actorSystemFactory.GetActorSystem();

            _shardedSubscriptionManager = new ShardedSubscriptionManager(actorSystem);
        }
Пример #2
0
        protected override void ConfigureIoc()
        {
            var actorSystemFactory = new ShardedActorSystemFactory(AkkaHostingPort, ActorSystemName, PersistenceSectionName, AkkaSeedNodes);
            var actorSystem        = actorSystemFactory.GetActorSystem();

            var subscriptionManager   = new ShardedSubscriptionManager(actorSystem);
            var eventPublisher        = new DistributedPubSubEventPublisher(actorSystem);
            var loggingEventPublisher = new LoggingEventPublisherDecorator(eventPublisher);

            var atomDocumentFactory = new ShardedAtomDocumentFactory(actorSystem);
            var atomFeedFactory     = new ShardedAtomFeedFactory(actorSystem, atomDocumentFactory, new ConfigurableAtomDocumentSettings(EntriesPerDocument));

            var settings = new AtomNotificationSettings(atomFeedFactory);

            var atomRetriever        = new AtomDocumentRetriever(atomFeedFactory, atomDocumentFactory);
            var loggingAtomRetriever = new LoggingAtomDocumentRetrieverDecorator(atomRetriever);

            IocContainer.Register <ISubscriptionManager>(subscriptionManager);
            IocContainer.Register <IEventPublisher>(loggingEventPublisher);
            IocContainer.Register <ShardedAtomDocumentFactory>(atomDocumentFactory);
            IocContainer.Register <ShardedAtomFeedFactory>(atomFeedFactory);
            IocContainer.Register <IAtomDocumentRetriever>(loggingAtomRetriever);

            IocContainer.RegisterMultiple <IOwinConfiguration, WebApiOwinConfiguration>(IocLifecycle.PerRequest);
        }
Пример #3
0
 public void Setup()
 {
     dummyAtomDocumentActorCreator = new DummyAtomDocumentActorCreator();
     shardedActorSystemFactory     = new ShardedActorSystemFactory(8965, "eventActorSystemForTesting", "inmem", "127.0.0.1:8965");
     system = shardedActorSystemFactory.GetActorSystem();
     CreateAtomFeedActor(Guid.NewGuid().ToString());
     CreateFeed();
 }
 public void Setup()
 {
     dummyAtomDocumentActorCreator = new DummyAtomDocumentActorCreator();
     shardedActorSystemFactory = new ShardedActorSystemFactory(8965, "eventActorSystemForTesting", "inmem", "127.0.0.1:8965");
     system = shardedActorSystemFactory.GetActorSystem();
     CreateAtomFeedActor(Guid.NewGuid().ToString());
     CreateFeed();
 }
 private void Create(int port, string actorSystemName, string seedNode)
 {
     var factory = new ShardedActorSystemFactory(port, actorSystemName, "inmem", seedNode);
     var actorSystem = factory.GetActorSystem();
     actorSystem.ActorOf(Props.Create<ClusterEventListener>());
     var atomDocumentFactory = new ShardedAtomDocumentFactory(actorSystem);
     var actorFactory = new ShardedAtomFeedFactory(actorSystem, atomDocumentFactory, new ConfigurableAtomDocumentSettings(10));
     atomNotifiers.Add(new AtomEventNotifier(actorFactory));
     atomDocumentRetrievers.Add(new AtomDocumentRetriever(actorFactory, atomDocumentFactory));
     numberOfNodes++;
 }
        private void Create(int port, string actorSystemName, string seedNode)
        {
            var factory     = new ShardedActorSystemFactory(port, actorSystemName, "inmem", seedNode);
            var actorSystem = factory.GetActorSystem();

            actorSystem.ActorOf(Props.Create <ClusterEventListener>());
            var atomDocumentFactory = new ShardedAtomDocumentFactory(actorSystem);
            var actorFactory        = new ShardedAtomFeedFactory(actorSystem, atomDocumentFactory, new ConfigurableAtomDocumentSettings(10));

            atomNotifiers.Add(new AtomEventNotifier(actorFactory));
            atomDocumentRetrievers.Add(new AtomDocumentRetriever(actorFactory, atomDocumentFactory));
            numberOfNodes++;
        }
        public static void SetupActorSystem()
        {
            var actorSystem = factory.GetActorSystem();

            ShardedAtomDocumentFactory atomDocumentFactory = new ShardedAtomDocumentFactory(actorSystem);
            ShardedAtomFeedFactory     actorFactory        = new ShardedAtomFeedFactory(actorSystem, atomDocumentFactory, new ConfigurableAtomDocumentSettings(10));

            _notifier  = new AtomEventNotifier(actorFactory);
            _retriever = new AtomDocumentRetriever(actorFactory, atomDocumentFactory);

            subscriptionMessage = new SubscriptionMessage(
                new AtomNotificationChannel(),
                new SubscriptionId(Guid.NewGuid().ToString()),
                new AllEventMatcher());

            _notifier.Create(subscriptionMessage);
        }
Пример #8
0
        protected override void ConfigureIoc()
        {
            var actorSystemFactory = new ShardedActorSystemFactory(AkkaHostingPort, ActorSystemName, PersistenceSectionName, AkkaSeedNodes);
            var actorSystem        = actorSystemFactory.GetActorSystem();
            var atomSettings       = new ConfigurableAtomDocumentSettings(EntriesPerDocument);

            var subscriptionManager   = new SubscriptionManager(actorSystem, atomSettings);
            var eventPublisher        = new EventPublisher(actorSystem);
            var loggingEventPublisher = new LoggingEventPublisherDecorator(eventPublisher);

            IocContainer.Register <IEventPublisher>(loggingEventPublisher);

            IocContainer.Register <ISubscriptionManager>(subscriptionManager);

            var documentRetriever = new LoggingAtomDocumentRetrieverDecorator(new AtomDocumentRetriever(subscriptionManager, actorSystem.Log, new InMemoryAtomDocumentRepository()));

            IocContainer.Register <IAtomDocumentRetriever>(documentRetriever);

            IocContainer.RegisterMultiple <IOwinConfiguration, WebApiOwinConfiguration>(IocLifecycle.PerRequest);
        }
 public static void SetupActorSystem()
 {
     var actorSystemFactory = new ShardedActorSystemFactory(8964, "eventActorSystemForTesting", "inmem", "127.0.0.1:8964");
     var actorSystem = actorSystemFactory.GetActorSystem();
     _shardedSubscriptionManager = new ShardedSubscriptionManager(actorSystem);
 }