An interesting and very efficient way to share mutable data by utilizing :atomics and :ets modules

Ane - a library to share mutable data efficiently by utilizing atomics and ets modules.

The idea is:

  • Store all data with versionstamp in ETS table.
  • Keep a cached copy with versionstamp locally.
  • Use atomics array to save latest versionstamp and sync data between ETS table and local cache.

Benchmark result showed this approach is faster than ETS standalone for read-heavy case.

Project with more detailed info is available at github.com/gyson/ane.

8 Likes

Really interesting project, thank you. Planning to use it!

1 Like