N
N
neodekvat092015-09-23 20:19:03
JavaScript
neodekvat09, 2015-09-23 20:19:03

Does it make sense to write chat in meteor.js?

Does it make sense to chat on meteor? Production is not expected (since I'm a beginner and this is more for practice).
All the examples that I googled with meteor, everywhere the messages are stored in mongo collections, which is a little irrational, as it seems to me (again, I'm new), to make a request to the database every time, and this is real-time ... And is there implementation of web sockets in a meteor (only from the site I learned about ddp, I didn’t really understand what it was, but somehow connected with web sockets).

Please give a detailed answer

PS I know about socket.io/sock.js.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Konstantin Kitmanov, 2015-09-23
@neodekvat09

If not for sale, then, apparently, for educational purposes.
If the goal is to understand the meteor, then go ahead. MongoDB is nimble enough for real-time use on a learning scale. You can also try to do it on redis, it seems to be faster on simple selections (and complex ones are not needed in a chat).
If the goal is to write the fastest chat possible, then we keep the current conversations in memory, and after a certain period of inactivity we dump them into the database (mongo, radish, it’s not so important here). In this case, the meteor is not really needed.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question