java - Achieving JMS/AMQP messaging patterns using Redis -


this question arises came across mentions (such this), using messaging software such zeromq alongwith redis, keep hearing redis used messaging-system. so, if redis used along other messaging systems, mean redis has serious deficiencies when used messaging system ?

while use of redis caching , pub/sub clear me, not clear if redis can used in place of full-fledged messaging system such jms, amqp or zeromq.
leaving alone standards-compliance aspect , concentrating on functionality/features, redis provide support messaging patterns/models required of messaging system ?

the messaging patterns talking :

  1. rpc/request-reply (an example using activemq/jms , another using rabbitmq/amqp)
  2. pipeline/work queues (once , atmost once consumption of each message)
  3. broadcast (everyone subscribed channel)
  4. multicast (filtering of messages @ server based on consumers' selectors)
  5. any other messaging pattern ?

if yes, redis seems solve 2 (possibly more) aspects @ once: caching , messaging.

i looking @ in context of web-application backed java/java ee server. , looking @ not proof-of-concept point-of-view large-scale software development angle.

edit1:
user:791406 asked valid question:

"who cares if redis supports patterns; redis meet sla , qos needs?"

i thought better give detail part of question instead of in comments section.

my current needs less sla , qos , more choosing tool job (messaging) can use when requirements grow (reasonably) in future. starting simplistic requirements @ first , know requirements tend grow. , no, not looking 1 tool all. want know if redis fulfills usual requirements expected out of messaging system, activemq/rabbitmq does. ofcourse, if sla/qos needs extreme/eccentric, need special tool satisfying that. ex: in cases zeromq chosen on rabbitmq due specific sla requirements. not talking such special requirements. focusing on average enterprise requirements.

i afraid (based on little understanding) eventhough redis used basic tool messaging needs of today, might wrong tool real messaging job in future. have experiences messaging systems activemq/rabbitmq , know used simple (reasonably) complex messaging needs.

edit2:

  1. the redis website mentions "redis used messaging server" how achieve messaging patterns not clear.

  2. salvatore sanfilippo mentions redis users tend use database, as messaging bus, or cache. extent can serve "messaging bus" not clear.

  3. when trying find out messaging requirements of jms redis doesnt support, came across redis supports jms doesnt: pattern-matching subscriptions i.e clients may subscribe glob-style patterns in order receive messages sent channel names matching given pattern.

conclusion:

i have decided use jms messaging needs , use redis caching.

what needs?

i think question should asking "what quality of messaging need support application?" before deciding on messaging platform. cares if redis supports patterns; redis meet sla , qos needs? focus on first, make technology decision based on assessment.

having said that, i'll offer input on how can make decision...

highly-reliable/persistent/durable messaging
let's take extreme case: you're building trading or financial application. such applications demand strict sla's message persistence, reliability, exactly-once delivery , durability paramount. using redis messaging backbone case bad choice, lots of reasons why...

  • message redelivery (when sh*t hits fan)
  • message store replication when redis goes down
  • message transactions (redis can't xa)
  • producer/subscriber fault tolerance , disconnection resilience
  • message order sequencing
  • sending messages when broker down (store-and-forward)
  • single-threaded redis may become bottleneck

if system has strict sla's, or of these issues arise, how handle these limitations? can implement custom code around redis address issues, why bother when mature messaging platforms activemq, webspheremq, , weblogic jms offer persistence, reliability, , fault tolerance? said you're on java/java ee stack, you're in position use of robust messaging frameworks available, either open source or commercial. if you're doing financial transactions, need consider these options.

high performance/large distributed systems messaging
if you're building social network or gaming platform want performance on reliability, zeromq fit. it's socket communication library wrapped in messaging-like api. it's decentralized (no broker), fast, , highly resilient , fault tolerant. if need things n-to-n pub/sub broker intermediaries, flow control, message persistence, or point-to-point synchronization, zeromq offers necessary facilities , code samples minimal code while avoiding building solutions ground up. it's written in c has client libraries every popular language.

hope helps...


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -