Danny Coward

Author
+ Follow
since Sep 25, 2013
Danny likes ...
Netbeans IDE Oracle Java
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
5
In last 30 days
0
Total given
0
Likes
Total received
2
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Danny Coward

Yeah I think so.

Instant messaging is a multi client to server app where the server needs to update (multiple) clients when a new message is sent.
Instant messaging apps usually need to hold state in a client-server session (like 'the last 25 messages sent by a client')
Instant messaging apps usually need to hold application global state on the server ("everyone currently logged in", "the last N messages sent in the app").

These three features get to the core of the Java WebSocket API: message processing, Session state particular to one client and logical endpoint state common to all clients.

In the book I wrote, there's a group drawing application and a chat application. Instant Messaging is sort of in the middle there in terms of the fundamentals of the API.

HTH,

- Danny
A good book on Java WebSocket Programming is indeed a rarity, AFAIK there's only one !

The book goes into a lot of detail about the different ways websocket messages can be sent: from synchronous sending and receiving basic text and binary messages, to blocking I/O, to streaming, to async sends. Even a bit on message batching. Hope that's enough !

- Danny
If I understand it right, if you have Socket.IO on one end and JSR 356 websockets on the other, unless there are bugs in the implementations it should work since both ends are talking websockets. I haven't tried it though.
When we designed the API in the expert group we had active participation from the Jetty and JBoss guys. So in addition to Tyrus, Glassfish, Tomcat you should check out Jetty and JBoss

http://webtide.intalio.com/2012/10/jetty-9-updated-websocket-api/
https://www.openshift.com/blogs/deploy-websocket-web-applications-with-jboss-wildfly

HTH,

- Danny

I'm excited to be here !

Bring on the questions about Java WebSockets and the Java WebSocket Programming Book and I will answer them as best I can !

Yes, in the book each chapter has a substantive example. There's a balance between real world and instructive, so I focussed on what I thought readers would find useful - group drawing, chat, stock account, that sort of thing.

Best,

- Danny
Hopefully this is old news but there's a new Java WebSocket API in Java EE 7.

So its in Glassfish 4.0, which has some samples too.

And there's a new book which I wrote if you like WebSockets, you can find it easily on Amazon.