Resources
http://faye.jcoglan.com/
Faye is a publish-subscribe messaging system based on Thebayeux protocol/cometd. IT provides message servers fornode. js and Ruby, and clients for use with the server and in all major web Browsers.
System architecture
Component |
Function |
Storage |
storage content
- active client ID
- subscription information
- queued message to BES delivered to clients
storage mode
- memory engine
- redis engine
|
engine |
storage the abstraction layer, realizing all the services of Faye
- client registering Span style= "font-size:12pt" >
- storing subscriptions
- Span style= "font-size:14pt" >routing messages
|
server |
implements Bayeus protocol, operation set
- handshake
- connect
- disconnect
- subscribe
- unsubscribe
- publish
server no HTTP or any other network transmission technology related |
Server-side extendsions |
Extension layer, can intercept incoming/outgoing message |
Adapter |
provides server services over HTTP, responsible for JSON serialization and deserialization message;< Span style= "font-family: Arial" > connection processing
- persistent connection based on WebSocket
- HTTP post-based long polling
- CORS (Cross Origin Resource sharing)
- JSONP
Two implementations: Nodeadapter, Rackadapter |
transport |
client's network transport, Responsible for serialization and deserialization of communications and JSON as well as detection and recovery of network faults
- WebSocket Real-time strong
- long Polling/ Jsonp can only rely on timeouts
|
client-side extensions |
similar to server-side extendsions |
Client |
Provide subscribe/unsubscribe, Send/receive message Interface, implement Bayeux protocol, users do not need to deal with handshake and connect and other underlying operations |
Cluster support
The storage in this structure uses Redis. The server is stateless, facilitates horizontal scaling, and simplifies routing (using a random/RR strategy).
Easy to use
Use similar socket.io.
Faye,simple pub/sub Messaging for the web