2 ms·
- Redis is a DSL for persistent data structures and a network server, which exposes it. - ETS (Erlang Term Store) is an optimized native in-memory lookup table
by nivertech 15y ago
- Redis is a DSL for persistent data structures and a network server, which exposes it.
- ETS (Erlang Term Store) is an optimized native in-memory lookup table [1].
- DETS (Disk ETS) is the same as ETS but with disk persistency. There is some limitations on the size of database.
- Mnesia is a distributed/replicated STM built on top of ETS/DETS.
You can think about ETS/DETS as a lightweight Redis without network interface.
ETS/DETS support much less data structures, than Redis, i.e. only sets, ordered sets, bags, duplicate bags. Redis supports strings, lists, sets, sorted sets, hashes, etc.
Redis is much more featured, than ETS/Mnesia.
Both have different scalability profiles.
Using Mnesia in distributed cluster effectively places a limit on the number of nodes in cluster (tens).
Clustering support for Redis is not yet released. Most production installatons using Master-Slave replication and/or sharding.
On raw single node request/s metric Redis is faster than Mnesia.
Redis is single-threaded, while Mnesia can utilize SMP and clusters.
I would like to see Redis stripped of TCP network interface and integrated in the same way as ETS in Erlang.
[1] http://erldocs.com/R14B03/stdlib/ets.html?i=0&search=ets:new#new/2 http://erldocs.com/R14B03/stdlib/ets.html?i=0&search=ets...