At Gitter we use Faye extensibly to publish real-time messages regarding user and room activity to all our clients.
Faye is a publish-subscribe messaging system based on the Bayeux protocol.
Learn more: Faye
We provide Faye endpoints that look like our REST API. When a user subscribes to them, she will receive real-time activity regarding those resources:
A user can subscribe to the following endpoints:
/api/v1/user/:userId/rooms
/api/v1/user/:userId/rooms/:roomId/unreadItems
/api/v1/user/:userId
/api/v1/rooms/:roomId
: Room user presence./api/v1/rooms/:roomId/chatMessages
: Room messages./api/v1/rooms/:roomId/users
: Room users./api/v1/rooms/:roomId/events
: Room events./api/v1/rooms/:roomId/chatMessages/:messageId/readBy
To consume messages from Faye you'll need to use one of the provided clients.
- Gitter Realtime Client - a higher-level abstraction than a straight Faye client.
- Browser clients
- Server-side Node.js clients
- Server-side Ruby clients
Get the packages.
We don't currently support publishing messages from your client to the server. For that purpose you should use our REST API.
You can find an example client at https://github.com/gitterHQ/gitter-faye-client.