Questions tagged [publish-subscribe]

Publish/subscribe is a messaging pattern where senders (publishers) of messages do not program the messages to be sent directly to specific receivers (subscribers). Rather, published messages are characterized into channels, without knowledge of what, if any, subscribers there may be.

Publish/subscribe is a messaging pattern where senders (publishers) of messages do not program the messages to be sent directly to specific receivers (subscribers). Rather, published messages are characterized into channels, without knowledge of what, if any, subscribers there may be. Subscribers express interest in one or more channels, and only receive messages that are of interest, without knowledge of what, if any, publishers there are.

Among technologies known to implement the Publish/Subscribe pattern you can find :
( in a purely alphabetical order )

2940 questions
14
votes
4 answers

Whats the best way of linking/synchronising view models in Knockout?

If you have several view models on one page, how do you ensure that you can keep them synced? For example, if one item is added or a button clicked on one view model and you want the other view model to be sensitive to that change, can Knockout…
jaffa
  • 26,770
  • 50
  • 178
  • 289
14
votes
5 answers

Pub/sub implementation in nodeJS

I've been playing around with different publish/subscribe implementations for nodeJS and was wondering which one would be best for a specific application. The requirements of the application involve real-time syncing of objects in multi-channel,…
Detect
  • 2,049
  • 1
  • 12
  • 21
14
votes
2 answers

Pub/Sub Vs Observer Vs Reactive

When I have used Pub/Sub pattern frameworks like MVVMLight before, I have seen that the subscriber's calls are handled synchronously. From a scalability point of view, does a reactive framework like Rx help scalability where the pub and sub are…
wonderful world
  • 10,969
  • 20
  • 97
  • 194
14
votes
2 answers

Get subscriber filter from a ZMQ PUB socket

I noticed in the FAQ, in the Monitoring section, that it's not possible to get a list of connected peers or to be notified when peers connect/disconnect. Does this imply that it's also not possible to know which topics a PUB/XPUB socket knows it…
dfarrell07
  • 2,872
  • 2
  • 21
  • 26
14
votes
1 answer

ZeroMQ, Client<-> Server , bi-directional communication possible with only having the client connect to host?

I am facing the following problem: I have a client (ultimately n-clients) and like to connect to a server. Clients know the server/host address but the server does not know the address of the client(s). I like to be able to accomplish the following…
Matt
  • 7,004
  • 11
  • 71
  • 117
14
votes
1 answer

Redis: how (or should) I delete pubsub channels

In my app I dynamically create new pubsub channels and there might be too many like 5k per day. According to my app's requirements any channel is used for at most 5minutes. Considering this situation, thousands of unused channels will be present in…
destan
  • 4,301
  • 3
  • 35
  • 62
14
votes
1 answer

How to design redis pub/sub for an instant messaging system?

I am new to redis pub/sub. I have a chat facility in the system which is like IM. So I would like to use redis pub/sub. As I have examined the samples most of them are designed based on a chat room. In my system I will have multiple chat rooms…
Ali Ersöz
  • 15,860
  • 11
  • 50
  • 64
13
votes
1 answer

Is there a standard PubSub protocol over WebSocket?

I'm looking for a way to implement basic Publish / Subscribe between applications written in different languages, to exchange events with JSON payloads. WebSocket seems like the obvious choice for the transport, but you need an (arguably small)…
phtrivier
  • 13,047
  • 6
  • 48
  • 79
13
votes
1 answer

How to design publish-subscribe pattern properly in grpc?

i'm trying to implement pub sub pattern using grpc but i'm confusing a bit about how to do it properly. my proto: rpc call (google.protobuf.Empty) returns (stream Data); client: asynStub.call(Empty.getDefaultInstance(), new StreamObserver()…
Dmitry Zagorulkin
  • 8,370
  • 4
  • 37
  • 60
13
votes
5 answers

Mediator pattern vs Publish/Subscribe

Can someone point out the main differences between the two? It seems that, at least conceptually, the two are very closely related. If I were to hazard a guess, I would say that the publish/subscribe method is a subset of the mediator pattern…
Kristian D'Amato
  • 3,996
  • 9
  • 45
  • 69
13
votes
2 answers

how would you use subscription managers with meteor's template subscriptions?

Meteor recently introduced template subscription capabilities. You can now call this.subscribe from within a Temeplate.xyz.onCreated call and the helper {{#if Template.subscriptionsReady}} will only be true once the subscriptions have gotten ready…
funkyeah
  • 3,074
  • 5
  • 28
  • 47
13
votes
1 answer

Messaging in a micro-service architecture

I'm beginning to investigate service-oriented architectures and wonder how best to structure the messaging between processes. It seems that direct HTTP calls between services and/or a pubsub bus are two common approaches. In what sorts of…
scttnlsn
  • 2,976
  • 1
  • 33
  • 39
12
votes
1 answer

Node Redis XREAD blocking subscription

I'm converting a redis pub/sub system to redis streams, so that I can add some fault tolerance to my server sent events. Subscribing the traditional way is trivial: import { createClient } from 'redis'; const redisOptions = { url:…
Dudo
  • 4,002
  • 8
  • 32
  • 57
12
votes
3 answers

Publish/Subscribe samples with RabbitMQ in .NET

I've built this sample: Getting Started With RabbitMQ in .net, but made 2 programs: one-publisher one-subscriber I'm using BasicPublish to publish and BasicAck to listen as in example. If I run one publisher and several subscribers-on every…
0x49D1
  • 8,505
  • 11
  • 76
  • 127
12
votes
1 answer

Help with "Scalable JavaScript Application Architecture"

I am building a large javascript application and I decided to use Nicholas Zakas' scalable application architecture design: http://developer.yahoo.com/yui/theater/video.php?v=zakas-architecture According to his system, modules are self-encapsulated…
patrick
  • 9,290
  • 13
  • 61
  • 112