3 ms·
Yes you can do this with most scripting languages. This is why I consider Redis more a DSL, proof is, it is trivial to write a Redis-complete script using a rea
by antirez 16y ago
Yes you can do this with most scripting languages. This is why I consider Redis more a DSL, proof is, it is trivial to write a Redis-complete script using a real scripting language.
However the problem with this approach is that you get a lot less performances and memory efficiency.
- ntoshev 16y agoRedis is i/o bound, while this approach eliminates i/o and copying data from Redis to the client ;) Not sure about memory efficiency. You can use __slots__ in Python or custom data structures (e.g. blist) if you have specific needs.
- antirez 16y agoIf you don't have a network interface, is not the same thing as Redis. Even Redis can be written as a C library, but it's not the same. Redis is all about a shared persistent state. I've no idea about __slots__, just a feeling that there are too much underscores to work well ;) But in general to get as memory efficient as Redis in a scripting language is very hard for different (good) reasons.