easiest way for push notifications

I wanted to implement real time push notification to one of the apps written in RoR. I don’t have any experience with nodejs, nowjs, express or socketio.

What would be the easiest way to implement the realtime push notification system?

0

http://railscasts.com/episodes/260-messaging-with-faye

Taken from this question: https://stackoverflow.com/questions/5616614/how-would-you-create-a-notification-system-like-on-so-or-facebook-in-ror

My personal opinion is that while architecturally one of the most widespread solution is long-poll or comet, from a development perspective, I don’t agree that it’s the easiest in the sense that it’s a part of the way to do things: simply there’s much more in a queue/pubsub system because of the load its backend has to bear.

Personally, I’d even consider plugging in an ActiveMQ server or some other message queue solution, as long as it has a notion of per-user queue, which can be drained by a client, and it has a JS API to drain, and perhaps a Ruby / REST API to push, it works.

But again, this is my personal opinion, that while yes, long-polling can be an option (or socket.IO can be), it’s only a part of the equation, even if a major part.

The easiest way would be to use a long-poll. However, this is not push. A long-poll is a normal request, with some long timeout. If there is a message, the request will be answered. Your client receives the answer and starts the next request. This way you almost always have an open request, waiting for an answer.

Take a look at Bridge made by the creators of nowjs. It helps you push messages down to your clients very easily, whether you’re building a Rails app or a Node.js app or even python apps. It supports a lot of languages and platforms. It’s a very robust system that can handle billions of messages a day.

0

The good folks at pubsubhubbub have a great solution using RSS feeds.
‘PubSubHubBub’ is a new protocol for real-time notifications.

In short, how you can enable your app to push real-time notifications:

  • Enable your app with an RSS feed
  • You need to register your feed with a Pubsubhubbub hub
  • Your subscribers will then receive real-time (or extremely close to real-time) updates from the hub

Please refer to this youtube video for a comprehensive presentation on the subject.

0

I’ve seen a port of Socket.IO on github (link). I guess you can use it.

Socket.IO is the easiest way to do a realtime push app, for that it abstracts you from the transport mechanism being used for the push.(for more information see the link).

The Advantages of using Socket.IO is that you don’t need to be bothered about the underlying transport being used. The documentation is very simple to follow and yet, is very detailed.

Have a look at PushRadar – it delivers notifications to clients instantly, and allows you to scale to hundreds of thousands of concurrent connections. There is a pre-built Ruby library that you can use. Also, specific to this service is the fact that you can target end-users by actions they have taken on your website or web app, geographical location (countries & continents), IP address, web browser and user ID.

An example:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>radar.target_country('US').target_not_action('live-chat').broadcast('test-channel',
{message: 'Would you like to talk to one of our customer support team members on live chat?'})
</code>
<code>radar.target_country('US').target_not_action('live-chat').broadcast('test-channel', {message: 'Would you like to talk to one of our customer support team members on live chat?'}) </code>
radar.target_country('US').target_not_action('live-chat').broadcast('test-channel',
{message: 'Would you like to talk to one of our customer support team members on live chat?'})

Disclaimer: I am the Founder of PushRadar.

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