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?
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.
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.
So yes, you can use (on open-source Java implementation) of Socket.IO together with Spring Boot.
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/
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