Java

There are multiple implementations available for socket.io on a Java server. Let's take a look at them.

The first is Socket.IO-Java , maintained most actively at https://github.com/Ovea/Socket.IO-Java. It has been forked and modified to work with various servers and platforms.

Then there is Atmosphere. Atmosphere began as a project to bring server push to glassfish servers, but was spun off as a project of its own and works with almost any Java server. Atmosphere server comes with atmosphere.js, which is its own JS client, but any Atmosphere application will work with a socket.io client out of the box, without any modification; use https://github.com/Atmosphere/atmosphere/wiki/Getting-Started-with-Socket.IO to get started with Atmosphere,. If you are starting a new java project or are introducing push in your existing java one, don't make a decision until you have taken a look at Atmosphere.

Netty brings an asynchronous server to Java; and very important to mention is Yongboy's socket io-netty (http://code.google.com/p/socketio-netty/). It is highly recommended due to the async nature of netty, which is more suited for these applications.

Gisio (https://bitbucket.org/c58/gnisio/wiki/Home) brings socket.io to the GWT framework, the Google's write-in-Java-and-compile-to-JS library. So if your application is built in GWT and you want to introduce server-push in your application, you can use this library.

And for the new and upcoming completely asynchronous server Vert.x , there is mo d-socket-io (https://github.com/keesun/mod-socket-io) Again, if you are looking at an application of a highly asynchronous nature, I would suggest you to take a look at this server and this module.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset