Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JMS alternative

 
Pavel Kazlou
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone.
I have web application under Tomcat that allows its users to perform activity which involves sending and receiving messages over high-latency channel. The latency can be really high and I don't want my users' HTTP requests to wait for messages to be delivered and responded. That is why I need to split my application in two parts: the first part handling users requests and the second part (standalone application with multiple threads, I need multiple threads because sending messages is actually session-based communication) performing message-sending activities. I want to connect these parts with some asynchronous message service. I don't want to use JMS as it is too complex for my simple task. I need only one point-to-point connection on the same computer. Just sending data between two applications asynchronously.
My search brought me to the following solutions (which are not suitable):
-using time scheduling - is not suitable because messages should be sent as quickly as possible. It's not emailing, it's real-time communication.
-using persistence (files or database) - I can't say that it is totally unacceptable solution, but it brings the dilemma of either checking the storage with some reasonable period of time (which is almost the same as scheduling) or checking the storage with small period thus producing a lot of useless load on both applications and computer in general.

Do you have any ready for use alternatives to JMS? Or maybe some advise on how to implement such communication myself? I don't have any experience with asynchronous communication and I don't even know where should I start from if I am to implement communication myself.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35744
412
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pavel,
I'd use JMS.

If I were writing my own solution - which goes against JEE - maybe put the message in a static data structure and have a thread that polls it - then have that thread make a remote call to app 2 which does the processing.
 
Pavel Kazlou
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you, Jeanne.
In order to use JMS, which is the best implementation ? (best in my case is most reliable and having as less configuration as possible) I'll use it with spring 2.0. In "Spring in Action" book the authors use ActiveMQ 4.1. On ActiveMQ site I've found that the whole range of versions is available. Googling on the latest version (5.2) brought some doubts whether I should use it =\
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!