I\'m developing a chat project (server/client), so I will need an RDBMS for savi
ID: 660446 • Letter: I
Question
I'm developing a chat project (server/client), so I will need an RDBMS for saving and loading user profiles, users logging-in etc., just like Skype does.
So my question is: which RDBMS will fit my needs?
There will be a lot of heavy queries like when users will log-in, all their profile information + their avatar picture will be queried from the DB and sent to the client app.
So imagine 1000 users are logging the same time, if successfully logged in then all these users will have their profile information + their avatar pic + their contacts list.
Explanation / Answer
Pretty much any real RDBMS will do the job you describe. Possibly even SQLite could cope at the scale you're talking about, though not great.
Your main concern will actually be the write-rate. You'll want to do group commits / commit delays or enable asynchronous commits. Otherwise, unless you have some fast storage, you'll quickly find yourself limited by the commit rate as each message produces its own individual database commit.
You'll also want to find a way to avoid polling the database for new messages.
If I were designing this application I would use a message broker on top of the database, like RabbitMQ, ZeroMQ, etc etc. The database would be the persistent data store for the app, but real time user-to-user message exchange would happen through the message queue/broker, with the database serving to log the messages for offline retrieval, history, etc.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.