문제

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.

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top