Java Reference
In-Depth Information
Figure 14.2. Interaction of the endpoint, message handler, and ChatServer
JSON messages are exchanged between the client and server. On the server side, the Com-
mandMessageDecoder and CommandMessageEncoder are responsible for decod-
ing and encoding the chat messages. JAR-353 is used to implement both of these classes.
JSON is much more compact than XML and is easier to work with in JavaScript.
Figure 14.3 illustrates the implementation of the bulletin WebSocket service. This service
is much simpler than the customer service chat we just discussed. The bulletin service is
used to implement a dashboard so that CSRs can see what's going on with the support
queue and also send out broadcast messages to all of the other CSRs.
 
Search WWH ::




Custom Search