by hardwaresofton · 5y ago · 0 comments
Do not use redis as your main database, it will require you to contort very painfully to so things that are normal to most apps. Maintaining Lua scripts instead of SQL queries is a bad idea.
If this is an ad for redis labs then it’s a really bad one.
The model subtly breaks even on simple questions like "I want to know all users who are currently logged in and the contents of their feed right now, with the last 5 messages they sent". You basically have to do multiple requests, MULTI, or write a lua script to get all this to happen in a transaction (so the state of the world is consistent). Such a request is trivial in relational databases, though performance of the query may not be.