Hacker News new | past | comments | ask | show | jobs | submit
Probably because Redis gives you a very well-defined/understood set of rich data structures with built-in behavior like TTL, atomic operations, eviction, and persistence. These things are otherwise usually scattered across native types, helper classes, or entirely separate libraries.
It doesn’t seem like the right tool for the job, though. Aren’t your own programming language’s constructs much more well-defined / understood ?
Language's own native data-structures are generally much more capable and vast. 99%+ developers use only a very limited set of those capabilities. This approach packages those most used ones into a nice, consistent DSL.

It's similar in effect to what busybox does to shell utilities, though the motives are different.

agreed but depends on then language. for instance, the .NET equivalent (MemoryCache) is pretty poor.
Redis has some pretty useful primitive that many languages don't:

- HyperLogLog, bloom filter, other probabilistic data structures

- Geospatial operations on stored points and polygons

- Expiring keys, for creating caches

These aren't in most standard libraries, and the Redis implementations tend to be fast, robust and well understood.

Can you name a single language that can talk to redis and doesn't have these in a form of a library that integrates with an app better than mystical embedded redis?

Every language you can talk to redis most likely has a library to do that, and it probably works much better with the rest of application than "embedded redis". If it doesn't, it probably has C-FFI and there is "fast, robust and well understood" implementations in C.

Sure. But if Redis was embeddable you'd get a robust C-FFI style implementation of those data structures which has been tested a lot more than some random library that has almost no existing users or active maintenance.

(I'm not personally sold on embedded Redis myself, but the question was "Aren’t your own programming language’s constructs much more well-defined / understood?")

I use PHP. None of the language tools or constructs available to me are adequate.

https://blog.codinghorror.com/the-php-singularity/

And you want to embed Redis inside PHP as a solution?? That’s nuts.
Where else could they store their serialized PHP data structures? (just kidding)