I am currently working on a project that needs to work with WebSockets. The clients will be the browsers only, so not interested in any message broker feature of these two.
Although I don't think that it would be much a difference, but would be interested if I can get a few comments on STOMP vs WAMP as a subprotocol using Spring-WebSockets.
And I might get a few hints that may help choose one over the other.
Cheers,
EDITED (27-02-2014): As, programming directly with webSockets is low-level, so its suggested in many places (one the spring documentation) to use some sub-protocol.
Also, the use of a sub-protocol over websocket, is a type of native webSocket security; like you can do a sub-protocol validation.
There are many other sub-protocol that can be used instead of STOMP or WAMP like XMPP, AMQP. I couldn't find much information related to these and webSockets, most of it is related to message brokers only.
STOMP, an acronym for Simple Text Oriented Messaging Protocol, is a simple HTTP-like protocol for interacting with any STOMP message broker. Any STOMP client can interact with the message broker and be interoperable among languages and platforms.
This project is no longer maintained. If you encounter bugs with it or need enhancements, you can fork it and modify it as the project is under the Apache License 2.0.
WebSocket Support. This part of the reference documentation covers Spring Framework's support for WebSocket-style messaging in web applications including use of STOMP as an application level WebSocket sub-protocol.
The one reason (obvious) that I should use STOMP over any other sub-protocol, is that I am using spring-webSockets so for STOMP I don't need add any additional library at the server side, for others I would need to. At the clients there are many JS libraries that I can use like socket.io for STOMP and similar JS for WAMP and others.
Since, my main concern is at the server side: So, STOMP it is.
I will update this post if I find out something new while implementing my solution.
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