News for hackers. Stuff that matters.
Re:How I write back ends by christiansakai on Wednesday January 22, 2020 @12:15AM (#22114843)
Please enlighten me about why Redis is a good use case here.

Won't Redis cache eviction policy make it not a good use case to be a general purpose database, compared to, MongoDB?

Re:How I write back ends by fpereiro on Wednesday January 22, 2020 @07:56AM (#22117093)
I added a few more notes on when/why to use Redis and when to use something else: https://github.com/fpereiro/backendlore#redis . Redis can take you surprisingly far as a general purpose database. I prefer to use either Redis or a relational database, but I'm in no position to tell you that you should do that too, particularly if MongoDB works well for you.
Re:How I write back ends by mercer on Wednesday January 22, 2020 @08:00AM (#22117129)
Could you elaborate on why your first choice would be Redis? I tend to go for Postgres, but mostly out of habit and familiarity.
Re:How I write back ends by fpereiro on Wednesday January 22, 2020 @08:17AM (#22117250)
I love working with fundamental data structures (sets, lists, hashes) much more than working with relational databases. I feel I'm more productive and my code is shorter. It does, however, require far stricter validations in the code; in general a lot of what a relational database does for you (in terms of type validation, schemas and even data consistency), you must do yourself in code or by using redis carefully.
Re:How I write back ends by aprdm on Wednesday January 22, 2020 @02:51AM (#22115513)
Redis has plenty of configuration, IIRC the cache eviction policy isn't the default configuration. By default it also writes to disk periodically to recover in case of crashes.
Re:How I write back ends by chipz on Wednesday January 22, 2020 @01:10AM (#22115051)
Isn't it said in the article that Redis can be replaced by anything else

> _redis can be replaced or complemented by another NoSQL database (such as MongoDB) or a relational database (such as Postgres). Throughout this section, where you see redis, feel free to replace it with the database you might want to use._