When thinking about async processing for almost all Java people the first thing that comes to mind is JMS or Java Script AJAX. For the web nothing beats AJAX – simple and effective.

I am not a big fan of JMS (10 years old spec that is incomplete, hard to use and Java only) unless used as an in memory (embedded) JMS broker within your app for async needs.

What should to expose or use for integrating different apps with async needs? There are multiple ways. The first one is to use a cross-platform messaging protocol, like the easy and simple STOMP (http text based) or even the more complex and cumbersome AMQP (not sure 100% about this one because even some of the people that worked on the spec hate it). The second one is to use RESTful services as the external API and use JMS or STOMP internally (STOMP is supported by most JMS providers and simpler async tools like node.js). The last option is to use SOAP services with async support.

Pick the simplest one that works for your case, not the most complex one for the future (just in case). You can refactor it later if needed.

Leave a Reply