Erlang Term Storage (ETS)
Erlang Term Storage, more commonly referred to as ETS, is a powerful in-memory data store for Erlang and Elixir. It offers a robust solution, capable of storing large amounts of data with constant access time, O(1). ETS is a central component of Erlang/OTP. As such, it has a long history of providing a performant and reliable solution.
Benefits
It provides a robust built-in solution for storing, editing, and retrieving data.
Performance. A big portion of ETS is written in C, as part of the Erlang runtime system.
API
The :ets
module provides an interface to the ETS.
ETS Types
Set | Ordered Set | Bag | Duplicate Bag | |
---|---|---|---|---|
Duplicate keys? | N | N | Y | Y |
Duplicate key/value? | N | N | N | Y |
Ordered? | N | Y | N | N |