I'm a newbie to real-time database integration and am attempting to wrap my mind round the myriad options available. I've read as numerous blogs, notes and essays available that individuals happen to be kind enough to talk about. Yet, an easy problem appears un-answered during my small brain. I figured many other people might have a similar issues, and so i may as well register and publish here on SO. Here goes:

I'm creating a small real-time application that is asynchronous chat + another fun feature. I boiled my options lower towards the following two options:

  1. Light + RabbitMQ
  2. Node.JS + Redis + Pub-Sub

In my opinion which i obtain the fundamentals to begin learning and building this out. However, my (seriously n00b) questions are:

  • How do you contact the finish-user -> Client to/from Server both in of individuals? Would that the simple Javascript lengthy/infinite polling?
  • Of these two, that might more effective to construct out and manage from one Slice (presuming 100 - 1,000 customers)?
  • Must I just build everything by helping cover their jQuery within the 'old school' paradigm after which identify which stack might be preferable? So will be able to obtain the product fleshed out like a prototype after which 'optimize' it. Or perhaps is writing in a single within the various other than mere optimisation? ( Personally i think so, but I'm not 100% about this personally )

I really hope this is not a wild question and will not get flamed immediately. Want some constructive feedback, love this community!


Architecturally, each of your options overlap with storing data within an Oracle database server for an additional application to retrieve.

Both RabbitMQ and also the Redis solution require your applications for connecting for an intermediary server that handles the information communications. Redis is probab Oracle, because you can use it simply like a persistent database having a network API. But RabbitMQ is a touch different since the MQ Broker isn't accountable for persisting data. Should you configure it right and employ the best options when posting a note, then RabbitMQ will really persist the information for you personally however, you can't obtain the data out except included in the normal message queueing process. Quite simply, RabbitMQ is perfect for interacting messages and just offers persistence as a means of recuperating from network problems or system crashes.

I recommend using RabbitMQ and whatever programming languages you're already acquainted with. Because the M in Light is generally construed as MySQL, which means that you'd either not use MySQL whatsoever, or only apply it long-term storage of information, not for that realtime communications.

The RabbitMQ site has a lot of documentation about building applications with AMQP. I would recommend that whenever you put in RabbitMQ, you go through the paperwork for rabbitmqctl after which produce a vhost to experiment in. This way you can easily cleanup your experiments without resetting everything. I additionally suggest only using subject trades since you can emulate the behaviour of direct and fanout trades by utilizing wildcards within the routing_key. Remember, you simply publish messages to trades, and also you only receive messages from queues. The exchange accounts for pattern matching the message's routing_answer to the queue's binding_key to find out which queues should get a copy from the message. It's useful learning the entire AMQP model even when you simply intend to send messages to 1 queue with similar title because the routing_key.

If you're building your client within the browser, and you need to develop a prototype, then you should look at simply using XHR today, after which proceed to something similar to Kamaloka-js the industry pure Javascript implementation of AMQP (the AMQ Protocol) the standard protocol accustomed to communicate to some RabbitMQ message broker. Quite simply, construct it using what you realize today, after which speed up later which something (AMQP) which has a long-term future inside your toolbox.