Re:Do you need Redis? PostgreSQL does queuing, locking, and ...
by strken on Monday November 04, 2024 @02:27AM
(#42039337)
I'm a bit confused here, because the original comment was that "most people will never really see the point of Redis, which is that if it is running on the same machine as the application, it can respond in much less than a millisecond", to which the response was "there's more to redis than just being a K/V store".
I do see the point of Redis if you have multiple hosts, but I was unsure why someone would use it on just one host.
Re:Do you need Redis? PostgreSQL does queuing, locking, and ...
by mperham on Monday November 04, 2024 @10:20AM
(#42042306)
Right, it's still useful as shared data for multiple processes on the same machine. A SQL database mostly forces your data into one structure: the table. Redis instead provides commands which operate directly on those different data structures I mentioned.
My Sidekiq background job system runs entirely on top of Redis. Structures like Sorted Sets become the basis for indexes. Lists provide extremely fast queue behavior and Hashes map easily to persistent objects. Databases, traditionally, have not performed well when used as queues.
Those are the big 3 structures necessary to implement anything: trees, lists and maps.