Is this RabbitMQ / sockjs pub/sub connection setup a comet solution?

My company is attempting to set up a pub/sub connection using RabbitMQ and sockjs, on Windows servers. I have two questions:

  1. My supervisor is calling this setup a comet solution, I was wondering if that is the right terminology?

  2. Is there a better solution stack for having a data server asynchronously ship data to a client without the client requesting data (besides the initial subscription)?

4

  1. SockJS is a bit more than “Comet”. “Comet” is mostly about polling (like http long-polling). SockJS will use native streaming WebSockets when available. In other words: SockJS will use “proper” Websockets if possible and “comet” otherwise.

  2. No. SockJS is probably as good as it can be if you need to support IE6 and IE7 and weird network configurations. If you can limit your supported browsers to IE10, new FF and Chrome, and don’t care about users behind broken proxies using native WebSockets might be an alternative.

As a side note, please take a look at RabbitMQ-Web-Stomp plugin. It might be a useful to an extent.

1

‘Comet’ is an approach that allows simulating push-style network communication over a stateless request-response protocol, typically HTTP. It is a solution to the problem that an HTTP server cannot actively push messages to a client – the only way for the server to get data to the client is to respond to a request.

The comet approach uses ‘long polling’ to achieve data pushes; it works like this:

  • client sends request to server, with a very long timeout
  • server keeps connection open, but doesn’t respond immediately
  • as soon as the server wants to push something, it responds to the pending request
  • client, upon receiving and processing the response, immediately sends the next request

If this is what your solution does, then it’s justified to call it a ‘comet’ solution.

The most prominent problem with comet-style communication is that the server must be prepared to keep a massive amount of requests open simultaneously – if you have 1000 users logged into your site, you will have 1000 pending requests, all the time. Also, timeouts and network issues (dropped connections etc.) can make comet solutions quite unreliable.

As for alternatives:

  • you can compromise on heartbeat-style short polling (client sends a heartbeat every x seconds, server responds with any available data)
  • you can try WebSockets, although browser support isn’t ideal
  • you can decide step off the web platform and build a desktop application instead
  • you can find a browser plugin that provides asynchronous server-push communication

2

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật