News for hackers. Stuff that matters.
Re:Braid: Synchronization for HTTP by toomim on Monday November 25, 2019 @07:58PM (#21634713)
Thank you very much!

Does EventSource meet your need for a generic subscribe mechanism? https://developer.mozilla.org/en-US/docs/Web/API/EventSource

I'm also curious what use-cases you have for a generic pub/sub beyond synchronization. In my experience, 95% of pub/sub implementations are used as a substrate for synchronization.

As for using PATCH vs PUT, this is an open question. I'd love to see more discussion of it on the mailing list: [email protected]. There are a number of pros and cons on both sides.

Re:Braid: Synchronization for HTTP by BiteCode_dev on Tuesday November 26, 2019 @04:26AM (#21636728)
EventSource is only from the server to the client. Pub/sub goes in any direction: client to client, client to server, etc.

Crossbar.io provides that with websocket.

Eventsource + the sync rfc would mean everybody would build a non standard bridge for this to link a publication, a sync from the server and an event source. And because we only need 2, and they are overlapping, several completly incompatible de facto solutions would emerge.

Pub/sub is useful for any kind of communication that doesn't involve a resource: notifications of events , communication between microservices, etc. Basically anything that doesn't have a need for an history.

Of course, you can always create abstract conceptual resources you sync with to obtain this effect. E.G: the "streaming service is down event" could be a sub to a "service/streaming/heartbeat" event that you sync, and ignore versions and give no parents. It's just a bit twisted.

It feels more natural to have a pub/sub primitive that goes back and forth in any direction, and build the specific case for sync with that. Even if sync is 90% of the time what you want.