Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

STOMP vs WAMP over Spring-WebSockets

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.

like image 954
AliR Avatar asked Feb 18 '14 00:02

AliR


People also ask

What is STOMP in WebSocket?

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.

Is STOMP deprecated?

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.

What provides support for STOMP as the WebSocket Subprotocol to use in applications?

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.


1 Answers

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.

like image 157
AliR Avatar answered Sep 21 '22 04:09

AliR