Question

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.

Était-ce utile?

La solution

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.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top