publish-subscribe

Pub/Sub and Content-Based Subscriptions

自作多情 提交于 2019-12-10 10:49:45
问题 I am in the beginning phases of designing a system that will be event-driven architecture (basic pub/sub). The actual tools and frameworks have not been selected yet, so this question is more conceptual than technology specific (though it will be done in .Net). A nearly perfect analogy for the situation is a financial trading system. Imagine a server that is constantly receiving market data (in real time or at intervals--it doesn't matter). The server will publish pricing updates for specific

Loading a Meteor client app with fake fire-and-forget data

回眸只為那壹抹淺笑 提交于 2019-12-10 10:34:59
问题 I'm trying to figure out a good way to create tutorials for using Meteor apps. Visually, I've figured out a good approach, and packed this into a smart package: https://github.com/mizzao/meteor-tutorials . However, there is a second piece that turns out to be rather hard to figure out. In many cases, a tutorial app needs to be loaded with fake data, to demonstrate the interface to the user without requiring it to be populated with real data that may be hard to generate. (For example, see

Rx how to create a sequence from a pub/sub pattern

混江龙づ霸主 提交于 2019-12-09 23:18:20
问题 I'm trying to evaluate using Rx to create a sequence from a pub/sub pattern (i.e. classic observer pattern where next element is published by the producer(s)). This is basically the same as .net events, except we need to generalize it such that having an event is not a requirement, so I'm not able to take advantage of Observable.FromEvent. I've played around with Observable.Create and Observable.Generate and find myself end up having to write code to take care of the pub/sub (i.e. I have to

Why does Redis have Pub/Sub capabilities?

大兔子大兔子 提交于 2019-12-09 07:36:12
问题 Why does Redis, a datastore, have Pub/Sub features? My first thought is that it's the wrong layer to implement such a thing. But maybe I need to think outside the box. 回答1: Redis is defined as data structure server. Redis provides multiple functionality like memcache, queue, pubsub etc. This is very useful for a cloudapp/webstack where 3 components RabbitMQ(queuing) + XMPP(pubsub) + Memcache can be currently replaced with redis. Queuing is not as feature rich as RabbitMQ though. 回答2: That

Kafka topic per producer

两盒软妹~` 提交于 2019-12-09 06:54:31
问题 Lets say I have multiple devices. Each device has different type of sensors. Now I want to send the data from each device for each sensor to kafka. But I am confused about the kafka topics. For processing this real time data Is it good to have kafka topic per device and all the sensors from that device will send the data to particular kafka topic, or I should create one topic and have all the devices send the data to that one topic. If I go with first case where we will create topic per

Query from minimongo of large number of records stucks and hangs browser

喜你入骨 提交于 2019-12-08 15:40:50
问题 I am building a page for admin in angular-meteor . I have published all the records from a collection: " posts " and have taken the subscription of all the records on front end. $meteor.subscribe('posts'); In the controller, if I select the cursors of all records from minimongo it works fine like: $scope.posts = $meteor.collection(Posts); But I want to display pagination, so for that I want limited records at a time like: $scope.posts = $meteor.collection(function(){ return Posts.find( {}, {

Trouble publishing/subscribing to a Mongo aggregate query

£可爱£侵袭症+ 提交于 2019-12-08 13:23:08
问题 Using Meteor and Iron-Router, I'm trying to publish the following mongo query (in the server folder): Meteor.publish("getTestList", function() { return Tests.aggregate( [{ $project : { "name" : 1, "description" : 1, "testNumber" : 1 } }, { $sort : { "testNumber" : 1 } } ]) }); Note that I have tested this query in the meteor mongo console tool and it works fine there. Also Tests is Tests = new Mongo.Collection("tests") and I am subscribing in the router like this: Router.route('/user', {

Pub/Sub scope in jQuery

匆匆过客 提交于 2019-12-08 10:56:33
问题 I am attempting to implement a Pub/Sub pattern in jQuery with the following code : $.each({ trigger : 'publish', on : 'subscribe', off : 'unsubscribe' }, function ( key, val) { jQuery[val] = function() { o[key].apply( o, arguments ); }; }); This works fine until I attempt to build something with multiple instances. I have an activity object that is applied to each $('.activity_radio') div element. When I click on a radio button inside any $('.activity_radio') div the $.subscribe event will

ZeroMQ Subscribers not receiving message from Publisher over an inproc: transport class

偶尔善良 提交于 2019-12-08 09:19:46
问题 I am fairly new to pyzmq . I am trying to understand inproc: transport class and have created this sample example to play with. It looks a Publisher instance is publishing messages but Subscriber instances are not receiving any. In case I move Subscriber instances into a separate process and change inproc: to a tcp: transport class, the example works. Here is the code: import threading import time import zmq context = zmq.Context.instance() address = 'inproc://test' class Publisher(threading

Can a Subscriber act as a Publisher?

蓝咒 提交于 2019-12-08 09:12:23
In terms of Reactive Streams, there is a Publisher and it could have as many Subscribers. But suppose, a subscriber gets a message from Publisher. Now this Subscriber(say Subs1) changes/modifies the message and passes it to some other Subscriber(say Subs2), which consumes the modified message. So can this Subs1 subscriber can act as a Publisher which can pass on message to new Subs2 subscriber? I am not sure if it possible or not, but the scenario is possible i think. If its possible, please suggest a possible way to do this. If we want to transform incoming message and pass it further to the