Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Web Socket vs JMS or Activemq [closed]

I want to know what are the differences between Java Web socket and JMS (or ActiveMq) ? Please let me know or have any source having any comparison of WebSocket and JMS and where to use websocket and not to and where to use Activemq instead of websocket please. Activemq is an implementation of JMS. Activemq might use Web socket. What if web socket is used to transfer messages (having any type of data) instead Activemq ? This may depend on the type of application and requirements, how ever as general and to make me easy to get an decision what to use, let me have your ideas(I want to message between two web applications, simply,fast and light weight).

Those who vote to Close : Please think to help, at least let some one to get help, knowledge and not to avoid it.

like image 650
Débora Avatar asked Apr 27 '14 03:04

Débora


1 Answers

Web sockets are a way of providing two way socket style interfaces between a web browser and a web server, with the server able to push information, rather than only responding to browser HTTP "pull" requests. It sounds from your question and clarifications that that's not what you need.

Plain sockets, however, are a good way of providing synchronous communications between applications. If the application receiving the messages can process them synchronously - as soon as they are sent - regular sockets may be a good solution.

Message queues are intended for asynchronous communications - cases where a message, after being sent, may need to be stored for a while before the recipient picks up the message and acts on it. Because of the need for storage, message queues require a separate server to store the message, or in some cases a database server if you already have one.

Plain sockets are simple, fast, and lightweight; message queues aren't really since they require setting up a separate server. If you need asynchronous message delivery, though, there may be no truly simple, fast, and lightweight solution, so message queues may be the next best thing.

like image 174
Warren Dew Avatar answered Nov 09 '22 04:11

Warren Dew