K
K
Konstantin Malyarov2016-01-27 08:54:44
MySQL
Konstantin Malyarov, 2016-01-27 08:54:44

How to store messages on the chat server?

There was a need to store messages of users who communicate in a chat. Where to store them? In a DB, in a text file?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Andrey Shubin, 2016-01-27
@idegree

14491539_eff3bba6e8059208461e190c5560b4d
Well, of course, in the database.

A
Andrey, 2016-01-27
@VladimirAndreev

And then what should be done with these messages?
How big is the load and the cost of missing messages?
If the load is small and you need the last 20 chat messages, I would store it in a file, and if the cost of loss is zero, then in the chat daemon's memory...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question