totalcruise
totalcruise

Reputation: 1363

High Performance Messaging between Java Client and Java 'Back End'

I have a basic Java Messaging application that sends JAVA objects to a remote server for processing. I leverage Spring support on both sides of the wire and use ActiveMQ as my JMS provider. It works well - and we have experienced no real problems with 10 clients that send messages concurrently.

However, we now really want to scale. The number of clients is likely to increase to circa 500 . Also, the bandwidth used for each client is more of an issue than was declared initially.

I was wondering whether anyone thought that ActiveMQ is the right tool for this job - or whether socket based TCP/UDP would help us scale better. We are not well versed in some of the 'advanced' features of AMQ, since we are using it with basic Spring JMS Template support.

Any comments / thoughts would be appreciated.

Thanks

Upvotes: 3

Views: 787

Answers (1)

raffian
raffian

Reputation: 32076

Without knowing what quality of service and SLA's you're trying to achieve, the basic rules I follow when evaluating messaging service implementations for any application are the following...

Performance over Reliability

  • Fast messaging
  • Intermittent message loss acceptable
  • Messages are non-persistent
  • Little to no cost

In this case, a product like ZeroMq (and others alike) would suffice since it works at the socket level, is decentralized, offers extremely low latency and scales well in large distributed systems, and is open source so cost is negligible. If some use cases require persistence and reliability, be prepared to implement custom solutions that traditional messaging middleware offer out-of-box (persistence, durability, replication, etc).

Balance Performance and Reliability

  • Performance and reliability equally important
  • Lost messages not acceptable
  • Messages are persistent
  • Need for some support
  • Relatively low cost

Here's where products like ActiveMQ, RabbitMq, etc., come into play. Broker-based middleware addresses reliability and persistence concerns while providing good performance and scalability. Support costs are usually low enough for small and mid-sized companies to afford without breaking the bank. It's safe to say most messaging needs fall into this category because it provides accessibility to both performance and reliability, and you can sacrifice one for the other based on future needs as your application matures without swapping out the entire messaging infrastructure due to a bad choice made years earlier.

Reliability over Performance

  • Reliability is most important
  • Messages can't be dropped
  • Message redelivery out-of-box
  • Clustering, HA, replication, etc. available out-of-box.
  • Need enterprise-class, global support and professional services
  • High Cost

Financial firms, trading systems, banking applications, etc., typically have such requirements where message system reliability has a dollar-value attached to it, and when things don't work, money is lost. Therefore, message persistence, HA/fault-tolerance, fail-over, are all extremely important. If cost is not an issue, look at products like WebLogic, Websphere, SonicMQ, or TIBCO, etc.,...they're expensive, but all offer solid reliability, enterprise support and perform well under load. I've used SonicMQ, it's a great product, very fast and reliable, but it costs an arm and a leg.

Hope it helps...

Upvotes: 3

Related Questions