6

Read about Server push here.
I want to push data to client from my web application in real time.
I was looking at TCP sockets as one of the options.
For HTTP I found a variety of frameworks for Java, PHP, Python and others over here. However I don't know whether any of these support Push.

  • What options and frameworks would you suggest for implementing Server push?
  • What language would you advocate for implementing the same and why?
Kevin Boyd
  • 12,121
  • 28
  • 86
  • 128
  • 2
    A framework doesn't "support" push..all a push is is a long request with a sleep in it that periodically sends (pushes) updates to the client. I think whether or not the framework supports it shouldn't be of concern for you. – ryeguy Sep 15 '09 at 04:00
  • @ryeguy: Would the TCP sockets implementation be more efficient than HTTP long polling. – Kevin Boyd Sep 15 '09 at 04:05
  • 1
    Well you still have to do an HTTP request, assuming you're just using basic HTML (as opposed to flash where you can use actual sockets). But if you mean is building your own server to accept these kinds of requests, yes, it is better. Facebook built their comet server in erlang for their chat. – ryeguy Sep 15 '09 at 04:14

8 Answers8

3

How about Orbited, it's very good and being used by Echowaves

khelll
  • 23,590
  • 15
  • 91
  • 109
  • Since Orbited opens TCP sockets on a web server will I have to use VPS for it?..If I am using shared hosting, probably the web host may not allow sockets to be kept open and running... – Kevin Boyd Sep 15 '09 at 15:18
3

I'm using Orbited right now, it's great!

If you are doing chat or subscription type stuff use stompservice and orbited.

If you are doing 1 to 1 client mapping use TCPSocket.

I can give you some code examples if you want.

DevDevDev
  • 5,107
  • 7
  • 55
  • 87
  • My implementation has multiple clients connecting to my server and they would be connected maybe for days.. would TCP Sockets be better here if so what framework/technology would you recommend? – Kevin Boyd Sep 15 '09 at 04:08
  • Do the clients need to communicate with each other? TCP sockets are nice if your server is sending tailored data to the client rather than the clients sending data between themselves or the server broadcasting data which the clients subscribe to. For the above situations use Orbited/STOMP/MorbidQ. Otherwise the TCPSocket is nice and you just write the server side socket stuff manually. Depending on the complexity of what your server needs to do I've heard of people using twisted to do some of the heavylifting on the sockets, but I've not yet done that. – DevDevDev Sep 15 '09 at 06:29
  • The nice thing about the sockets is that you can write the server in whatever language you like. Personally I tend to use Orbited + Python + Django which works really nicely for me. – DevDevDev Sep 15 '09 at 06:30
  • By TCPSocket do you mean the one in Orbited or the generalized Socket? – Kevin Boyd Sep 15 '09 at 08:51
  • 1
    TCPSocket is the Orbited specific implementation of an inbrowser socket. On the server side you can use whatever socket stuff you want. Either directly or through another framework like twsited. – DevDevDev Sep 15 '09 at 20:29
3

Comet is the protocol you want. What Comet implementation is best, is a harder call.

If you're OK with Java (or, I guess, Jython), or .NET (where IronPython's a possibility), I suspect (not having extensively tried them all!-) that stream hub must be a major contender. It'a typical "freemium" product -- you can get a free ("as in free beer";-) version, or you can try the pricey Web Edition, or the even-pricier Enterprise Edition; feature comparison is here (e.g., free edition: no https, no more than 10 concurrent users, no .NET).

Alex Martelli
  • 854,459
  • 170
  • 1,222
  • 1,395
3

Ok, I'm using ASP.NET with PokeIn comet ajax library on my project. Also, I tried Atmosphere under JAVA.. My last choice was PokeIn.. Because, only server push support is not solving the problems. You will need some kind of client to server object serialization and object life time management. PokeIn covered all these needs for me.

BigbangO
  • 820
  • 5
  • 9
2

What about Ajax Push Engine?

Shoban
  • 22,920
  • 8
  • 63
  • 107
2

I'm personally biased, but I like WebSync, for IIS/.NET. It integrates with IIS, so no other server software necessary, just a dll to add to your project.

Jerod Venema
  • 44,124
  • 5
  • 66
  • 109
1

I believe xmpp implementation is one which is being use by a lot of big companies but the common thing is to use a comet server as well.

a lot of implementation in python for thoses you can google around.

Chmouel Boudjnah
  • 2,541
  • 3
  • 24
  • 28
0

Have you tried StreamHub Push Server?

DLauer
  • 1,302
  • 2
  • 15
  • 24
  • Not really, Alex Martelli mentioned this in his post... but the free version only allows 10 concurrent users...right? – Kevin Boyd Oct 02 '09 at 17:15