Closed jfyne closed 3 years ago
@dstpierre this is my first pass at what we discussed. There is a new PubSub
primitive (which I might change the name of) and a PubSubTransport
interface so that you can bring your own message broker. Included is a LocalTransport
which can enable in process communication between handlers.
There is an example linked that shows how to use the Go CDK to achieve multi node broadcasting. It uses an in memory broker in the example, but it would be trivial to change it to one of the many brokers the Go CDK supports.
I'm going to keep playing with this, before I merge it.
This PR allows multiple instances to communicate via Broadcast.
PubSub
object which allows handlers to communicate with each otherPubSubTransport
describes how thePubSub
should send messages.LocalTransport
enables in process handler communicationSee this for a more complex example https://github.com/jfyne/live-examples/pull/4