firehoseio / firehose

Build realtime Ruby web applications. Created by the fine folks at Poll Everywhere.
http://firehose.io/
MIT License
727 stars 72 forks source link

Document Firehose protocol in PROTOCOL.md #56

Open bradgessler opened 8 years ago

bradgessler commented 8 years ago

Document Firehose protocol for publishers and subscribers over HTTP Long Polling and WebSockets in PROTOCOL.md. Ideally the message formats should:

I propose the following format for publishing:

// Message from service published to Firehose
{
  "message": "Bee boop",
  "channel": "/greetings/from/mars",
  "ttl": 60
}

And the following for a client consuming a sequence of messages:

// Message from Firehose to consuming client
{
  "message": "Bee boop",
  "channel": "/greetings/from/mars",
  "sequence": 101
}