Efficient server push through rails

314 views Asked by At

I would like to know the efficiecnt server push technique working through rails. The ones explored are XMPP-Bosh , comet etc.

How much effect would these long polling technique have on battery consumpition at mobile end. The need is to push the data to the client as soon as it gets to the server (the data size and type is not fixed and can vary in mb's).

Please throw some light on this. Any technique/stuff/links/hacks/Ruby & Python modules for the same would be great.

1

There are 1 answers

0
4nkh On

I don't know exactly what you want to do or the effect on battery consumption on a mobile phone but I know several easy ways to push your data to a browser without a websocket:

  • Mongrel 1.1.5 is old but with some small initializer fix it still is the easiest way to continually push data in front.

    Mongrel::HttpHandler
    
  • NGINX and Apache provide a module but I didn't find a way to tweak it like I want, it's not very flexible from what I saw.

  • If you are building a chat think about Openfire (very easy to use....RED5 plugin, kraken ect..) or jabberd with a spectrum gateway.

  • Also, the xmpp4r gem is very complete.

  • If you are streaming static files, or big data of any type, you might want to use a streaming module for the web server.