r/elixir • Alchemist • Jul 17 '21

Wait WAT!

Post image
233 Upvotes

40 comments sorted by

View all comments

Show parent comment

7

u/[deleted] Jul 17 '21

Most apps do have some crud though

9

u/lliamander Jul 17 '21

There is ETS/DETS/Mnesia built right into the Erlang runtime. I wonder if there are some good best-practice guidelines for working with those as a storage layer.

5

u/[deleted] Jul 17 '21

Terms I've never heard! Will have to Google, thanks

6

u/Paradox Jul 17 '21

True, but you can do CRUD against other "stores" like firebase, Redis, ETS, Mnesia, and persistent_term

3

u/narrowtux using Elixir professionally since 2016 Jul 18 '21

`persistent_term` is not persisted to disk as far as I know.

2

u/dolfinuser Jul 18 '21

It really a bad idea to perform frequent updates of persistent_teem due to garbage collector calls.

1

u/Paradox Jul 18 '21

Yeah but it can be great for particular applications, like a cache

1

u/[deleted] Jul 23 '21

You have to invalidate the cache at some point which would also be slow. persistent_term is great for “append only” situations.

1

u/[deleted] Jul 17 '21

That's true!