views:

864

answers:

6

I'm trying to get my head around AMQP. It looks great for inter-machine (cluster, LAN, WAN) communication between applications but I'm not sure if it is suitable (in architectural, and current implementation terms) for use as a software bus within one machine.

Would it be worth pulling out a current high performance message passing framework to replace it with AMQP, or is this falling into the same trap as RPC by blurring the distinction between local and non-local communication?

I'm also wary of the performance impacts of using a WAN technology for intra-machine communications, although this may be more of an implementation concern than architecture.

War stories would be appreciated.

+2  A: 

AMQP is a specification so you'd be comparing apples with oranges really. There are not that many production ready AMQP providers out there really; none of the major messaging providers or vendors support AMQP at the time of writing (e.g. IBM, Tibco, Sonic, BEA, Oracle, SwiftMQ, MS, Apache ActiveMQ, openmq from Sun) - so all the available AMQP providers are pretty new.

So I'd recommend comparing whatever AMQP provider you are interested in with your message passing framework. There's no point ripping something out that is working fine just because of the way it reads & writes bytes to a socket :)

James Strachan
Apache ActiveMQ does - sort of - support amqp however most development efforts have been shifted to Apache Qpid. It is one of the two primary AMQP brokers available (with RabbitMQ).AMQP can in some way be seen as a more open competitor to Tibco, BEA and the like. Many of us see this as a major advantage ;)
Rob Cowie
ActiveMQ has a way to go before it can serve as a replacement for passing pieces of paper around by hand, never mind as a replacement for Tibco.
skaffman
skaffman, how so? Is this just about ActiveMQ or AMQP in general -- I'm interested in the relative strengths and weaknesses.
Bwooce
I think this answer is outdated. For example RabbitMQ outperforms any non AMQP messaging system and is used by NASA for some serious heavy lifting. Stacking it up against Sonic as a "production ready" solution leaves Sonic looking like a joke.
iwein
A: 

AMQP looks more like a reliable transport middleware offering for SOA than something to be used internally.

Bob
+3  A: 

AMQP is not an RPC framework. It provides the building blocks to model things like shared queues, RPC, pubsub etc. but it does not mandate any specific way to use it.

If you want to partition your application (making it distributable on the way) and to wire it together with AMQP I think it's the right technology. There might be faster alternatives though but probably none as generic as AMQP.

yawn
+1  A: 

As a basis for a reliable, extremely flexible (in terms of messaging patterns) it can be used for many messaging scenarios, both intra-machine (i.e inter-process) and inter-network. It can scale all the way from zero to huge, high-bandwidth, multi-network systems.

I am currently evaluating it for a small, but relatively complex near real-time system where we don't care how far the messages travel or who/what (within reason ;) is consuming them. If a consumer is sitting on the same machine so be it. I'd give it a go and see what you make of it. If you want to knock together a prototype system, use python and the carrot library.

Rob Cowie
A: 

If you're primarily interested in performances in an intra-machine scenario, the question is less about AMQP (which is only a wire level protocol) than about which implementation you should try.

By removing the latency introduced by the network, you'll probably be a lot more sensitive to the raw performances of the various implementation. Therefore, I would look at products implemented in C++ such as Qpid or Zeromq.

Qpid can easily reach 400 000 messages/second (with messages of 1024 bytes) on some decent hardware (quad core). Zeromq will probably perform a lot better because you can have peer to peer channels whereas Qpid is using a broker architecture (which had a step).

Julien
A: 

The AMQP standard is getting mature and solves some of the hairy problems that have plagued other messaging standards like JMS. To your question whether it's worth replacing an existing solution, I'd say it depends. I would be very skeptical, since presumably the system is already working, in production and highly performant.

If you have problems like:

  • Interoperability is not working
  • Can't scale out easily
  • Performance isn't good enough
  • The current messaging solution is expensive (to maintain)

You should investigate the work required and analyze the benefits more precisely. If you're already happy, replacing a messaging framework isn't going to return on investment.

iwein