I have read a series of posts on this forum now regarding realtime messaging between clients and wanted to get some advice.
What is the current best solution for ‘Real time’ messaging within the Meteor system?
My understanding is we have:
I get it collections are great, easy to setup and use and on the face of of perfect for a messaging API. Is a system based upon a collection per room going to run into performance issues quickly?
My understanding is that Meteor uses Websockets anyway to implement realtime updates to minimongo, is there an advantage to seperating the concerns and implementing a seperate connection to say a node bases redis pub/sub?
This has popped up a couple of times in the forums as a option and favoured due to the direct connection between clients. But in this case how is chat history stored and connection dropouts dealt with?
The more I investigate, the more it seems that although simple on the surface, implementing realtime chat outside collections is quite complex. Correct me if I am wrong but I need:
- A client side cache with pub/sub system capable of dealing with dropouts.
- A server dealing with multiple connections and publishing filtered messages.
- A database with the ability to store but quickly retrieve a potentially huge collection of small strings.
- A media storage system linked to the server for media uploads.
This potential headache brings me back to Collections as a great solution, all I would need to add is a S3 bucket.
I am however worried about performance and do not want to get bitten by slow downs down the line.
Please could someone who has figured this out give me some pointers, thank you.