Faye or Redis Pubsub

后端 未结 2 1643
伪装坚强ぢ
伪装坚强ぢ 2021-02-02 02:08

I thought I understood this technology, but maybe I don\'t. What\'s the difference between the two? Why would you choose one over the other?

Usecase: ~Realtime updates.

2条回答
  •  一个人的身影
    2021-02-02 03:05

    I'm the author of Faye. Conceptually, Faye and Redis pub/sub do very similar things, indeed the latest release of Faye can use Redis as a back-end. As Tom says, Redis is appropriate for inter-process messaging within your server cluster since the Redis client will get access to your whole Redis database.

    Faye is more appropriate if you want to provide a publicly accessible pub/sub service over the web, for example to power the UI for your website. It only does pub/sub, not any other storage like Redis provides, and works over HTTP and WebSocket rather than over a raw TCP socket. It also allows for user-defined client- and server-side extensions to expand the messaging protocol it uses.

提交回复
热议问题