Faye,simple pub/sub Messaging for the web

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.