Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to implement Socket.io on Tomcat 7

We have existing applications which are hosted on tomcat 6 and we are moving to tomcat 7 which provides websockets support.

I wanted to try socket.io in our application, for some of the features based on websockets, since it has very good cross browser support.

I couldn't find any resources online for this combination, socket.io + tomcat,though there are quite a few for (Socket.io + jetty).

Has anyone tried it?

like image 980
sandeepkunkunuru Avatar asked Sep 06 '12 11:09

sandeepkunkunuru


People also ask

Does Tomcat support WebSockets?

Tomcat implements the Java WebSocket 1.1 API defined by JSR-356. There are several example applications that demonstrate how the WebSocket API can be used. You will need to look at both the client side HTML and the server side code.

How many WebSockets can Tomcat handle?

The default installation of Tomcat sets the maximum number of HTTP servicing threads at 200. Effectively, this means that the system can handle a maximum of 200 simultaneous HTTP requests.

Can I use Socket.IO with spring boot?

So yes, you can use (on open-source Java implementation) of Socket.IO together with Spring Boot.


1 Answers

Though I haven't used, I recommend the Atmosphere project to develop socket.io application on the JVM. Their support is built on top of Atmosphere API which is powered by Servlet 3 spec and all most server-specific features. That means, you don't need to stick Tomcat 7 to use socketio on the JVM.

http://jfarcand.wordpress.com/2012/06/04/writing-socket-io-application-that-runs-on-the-jvm/

like image 57
Donghwan Kim Avatar answered Sep 28 '22 00:09

Donghwan Kim