I'm writing/porting a C++ HTTP event server to Java. I'm wondering what are the best paradigms for implementing comet with Jetty, Tomcat, any other server, or natively.
Scalability is an absolute must as I'm developing a new protocol that uses up to 3 concurrent connections per client.
Any help is appreciated.
PS: If possible, I would love to also see some sample code or tutorials..
Comet is a programming technique that allows a web server to send updates to clients without requiring the clients to explicitly request them. This kind of programming technique is called server push, which means that the server pushes data to the client.
Comet is a web application design paradigm that describes a continuous, two-way interaction between a server and a web browser using native HTTP methods.
Comet is a web application model in which a long-held HTTPS request allows a web server to push data to a browser, without the browser explicitly requesting it. Comet is an umbrella term, encompassing multiple techniques for achieving this interaction.
We've had a lot of success with Caucho Resin's LongPoll features (the majority of the data to our UI comes in over Comet). Caucho has also added support for WebSockets, so if you have an HTML 5 client you can benefit there too.
On Linux they have some custom JNI code that talks directly to epoll, which allows the server to scale well.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With