publish-subscribe

How do I create a actor if I subscribe to a specific topic?

雨燕双飞 提交于 2019-12-30 13:34:23
问题 Hi I have some code which includes publish/subscribe and actors. The generic_device class allows me to create other actors. I was wondering how do I create a specific actor from the generic_device class when I subscribe to a topic and if the topic isn't subscribed then no actor is created from the generic_device class. At the moment it is just if a specific message is received then the actor is created. All help appreciated thanks. import logging from datetime import timedelta import time

What should I be using? Socket.io rooms or Redis pub-sub?

会有一股神秘感。 提交于 2019-12-29 02:24:06
问题 Pretty simple question. I am building a realtime game using nodejs as my backend and I am wondering if there is any information available on which one is more reliable and which one is more efficient? I am heavily using both Redis and Socket.io throughout my code. So I want to know whether I should be utilizing Socket.io's Rooms or I would be better off using redis' pub-sub ? Update: Just realized there is a very important reason why you may want to use redis pub/sub over socket.io rooms.

Is Observer pattern and pub-sub same when a database is used in the implementation?

只谈情不闲聊 提交于 2019-12-25 15:15:08
问题 I am trying to understand observer pattern and stuck at one particular point. In my understanding, once an observer subscribes to notify them on any event change, the subscription is stored somewhere and then when event changes the subscriber is notified. In practical scenarios I should store the values in a database or a file for persistence reasons and inform them once event occurs by getting from db and looping through the list. Is this correct understanding? I do not see any example

How is ordering preserved in ActiveMQ?

折月煮酒 提交于 2019-12-25 10:02:18
问题 I have set up an application to listen to an ActiveMQ topic. Here's the way I have configured it: <jms:listener-container connection-factory="jmsFactory" container-type="default" destination-type="durableTopic" client-id="CMY-LISTENER" acknowledge="transacted"> <jms:listener destination="CMY.UPDATES" ref="continuingStudiesCourseUpdateListener" subscription="CMY-LISTENER" /> </jms:listener-container> <bean id="jmsFactoryDelegate" class="org.apache.activemq.ActiveMQConnectionFactory"> <property

How is ordering preserved in ActiveMQ?

淺唱寂寞╮ 提交于 2019-12-25 10:02:00
问题 I have set up an application to listen to an ActiveMQ topic. Here's the way I have configured it: <jms:listener-container connection-factory="jmsFactory" container-type="default" destination-type="durableTopic" client-id="CMY-LISTENER" acknowledge="transacted"> <jms:listener destination="CMY.UPDATES" ref="continuingStudiesCourseUpdateListener" subscription="CMY-LISTENER" /> </jms:listener-container> <bean id="jmsFactoryDelegate" class="org.apache.activemq.ActiveMQConnectionFactory"> <property

wxpython 3.0 & multiprocessing - update GUI from background process

自作多情 提交于 2019-12-25 08:55:00
问题 From my wxpython GUI app I have an rsync task that I kick off as a multiprocessing.Process. The idea is to update a wx.textCtrl with the constant output from this background process. I am using a pubsub subscribe method. The functions work fine but I can't get the textCtrl to update. If I use a CallAfter method I get this crash/error: The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec(). Break on THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS

RxJS5 - How can I cache the last value of a aggregate stream, without using Subjects and whilst excluding those that have completed?

别说谁变了你拦得住时间么 提交于 2019-12-25 07:18:47
问题 I want a pubsub system, with producers and consumers of streams, via a dataplane layer but without Subjects. Many producers can multicast to the same stream name (e.g, 'filters.add'), and multiple consumers can subscribe to the stream. Producers register with a name and stream to create a 'stream of published streams'. If a new producer registers with a particular stream name, the streams flowing to the consumers are dynamically updated such that the data received is a merging of all

Join in Meteor with publishComposite

安稳与你 提交于 2019-12-25 06:07:01
问题 I have removed autopublish from my Meteor app. Now I'm publishing my collections manually. I have some related collections. I want to increase performance as much as possible. If I'm, for instance, looking at a post and want to see all the comments related to this post, I have to query the database with both post: Posts.findOne(postId) AND comments: Comments.find({postId: postId}) . I am querying the two collections in the data field with iron-router so they are present in my template but I'm

How can I limit total concurrent subscriber connections to a ZeroMQ publisher endpoint?

大城市里の小女人 提交于 2019-12-25 02:38:22
问题 When building a pub-sub service using ZeroMQ on a Linux system, is there any way to enforce concurrent subscriber limits? For example, I might want to create a ZeroMQ publisher service on a resource-limited system, and want to prevent overloading the system by setting a limit of, say, 100 concurrent connections to the tcp publisher endpoint. After that limit is reached, all subsequent connection attempts from ZeroMQ subscribers would fail. I understand ZeroMQ doesn't provide notifications

PubSub - How to add subscriber for each ElasticBeanstalk EC2 instance

▼魔方 西西 提交于 2019-12-25 01:35:28
问题 I have a simple key-value pair collection in my mongo database, it holds configuration details for my web-app and it's read by each EC2 instance started by the ElasticBeanstalk autoscaling (1-10 instances). Almost every JAXRS service endpoint causes a read from the mongo config collection and I want to stop reading values directly from the DB to lighten the load on the database. My plan is to read the value once, store it in an in-memory dictionary then use the value from the dictionary