5 ms·
I am not aware of an in-process alternative similar to what Redis offers.
by jchw 4mo ago
I am not aware of an in-process alternative similar to what Redis offers.
- s_trumpet 4mo agoMnesia, if you’re using Erlang or Elixir.
- jchw 4mo agoUnfortunately I have never really used Erlang outside of deploying RabbitMQ. I mostly use Go, Rust, Python, sometimes C/C++. However, Mnesia seems like it is quite a bit more of a complete distributed database engine than Redis. To me the nicest thing about Redis is just the convenience of what it offers: very fast data structures, serialized, optimized (at least by default) for cases where speed is more important than durability. It is simple on many levels and somewhat constrained in scope. Mnesia seems to be aiming more generally in the distributed database category. So how do you feel they compare?
- wkrp 4mo agoReally it would be more like Nebulex/Cachex which provide a really nice caching interface across ETS (what Mnesia is built off of) or other data stores.
- WJW 4mo agoWell the most basic redis replacement would be just a global hashmap to replace GET and SET, possibly with a background thread to periodically delete expired keys. But obviously that stops working as soon as you get a second node. The entire value of redis IMO is that is ISN'T inside your normal application, but rather some shared storage that all nodes can use to coordinate and that survives deploys, but that provides more ergonomic data structures than SQL databases. Caches are only one type of such shared data, but things like feature flags, circuit breakers and rate limiters are also super common (and super useful).
- 0x457 4mo agoI would Cache with TTL? A cache that can store lists?