Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

RPC and MessageQueues in node.js

What are the good use cases for using RPC over MQ ? If a node process wants to talk to a java program, can we use RabbitMQ ? What are the other alternatives ? what nowjs or dNode does that can not be done with socket.io ? There are many modules in node.js on either RPC or MQ.. Do they all cater to some specific need ?

EDIT:

What I am looking for ?

  1. How do you do a RPC style of full duplex communication between browser/client and server? I think the answer would be socket.io or nowjs or dNode.. Please add if there are more.

  2. How does your node process talk to other processes in a heterogeneous system ? This might be necessary if you want to offload some of your CPU bound task to other processes... For example between node.js process and a Java process. There can be 3 different ways of doing that. Which one is suitable for what ?

    i. publish-subscribe

    ii. request-response

    iii. push-pull

  3. When would you use xmpp and not rabbitMQ ?

like image 220
user644745 Avatar asked Feb 03 '26 06:02

user644745


1 Answers

  1. Yes, NowJS or dnode are good choices.
  2. redis pub sub might work for you, as would using rabbit. Depends on your use-case.
  3. I don't think xmpp and rabbit are comparable? rabbit is for messaging, xmpp is a chat protocol (like what google chat uses, I think).

/fyi #node.js IRC welcomes you: http://bit.ly/nodeIRC

like image 99
DTrejo Avatar answered Feb 05 '26 05:02

DTrejo



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!