Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

pub/sub broker implementation #64

Open
mcollina opened this issue Oct 24, 2014 · 2 comments
Open

pub/sub broker implementation #64

mcollina opened this issue Oct 24, 2014 · 2 comments

Comments

@mcollina
Copy link
Contributor

After seen the work done in #61 and #63, I think it's worth linking in here that I created a Graft/jschan pubsub broker: https://github.com/GraftJS/graft-broker. Graft-broker can also be backed by Redis, thanks to https://github.com/mcollina/mqemitter-redis, however you can't send channels through it.

@dmcgowan
Copy link
Contributor

I like it, I think we are on the same page that the best way to solve pub/sub is through an attached service. Thanks for linking. It is probably a good early example service to implement using the bus/job engine.

@mcollina
Copy link
Contributor Author

A question: a pub/sub service can generate loops with channels, like so:

  1. session A subscribes to topic "hello"
  2. session B subscribes to topic "hello"
  3. session A publishes a "write" channel to to topic hello
  4. session A receives its own channels from the broker
  5. session B recevies a "read" channel to to topic hello

Summarizing, In jschan when a channel is received from the originating session it returns the originating channel, however, all the other parties receives the "inverted" channel. Is that the right behavior?

While it does not make any sense whatsoever to send back a channel with a normal service invocation, in pub/sub scenarios it might happen. Is this the correct behavior? Should jschan error? How this case is handled in libchan?

@AdrianRossouw

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants