4 ms·
If the goal is to make it simple to run, why not support SQLite?
by memla 10y ago
If the goal is to make it simple to run, why not support SQLite?
- brightball 10y agoSeems like the goal is avoiding dependencies and he's got 3 built in database choices for that already. DETS or Mnesia would probably work well for this.
- sergiotapia 10y agoThank you, I'll take a look at what those are. If there's a way to remove Postgres from the equation, I'm all for it.
- macintux 10y agoDETS (and ETS, the in-memory equivalent) are quite simple for basic K/V-ish storage needs. If you need a relational database, Mnesia should do the trick.
- yellowapple 10y agoMnesia is probably what you want in that case, since it turns (D)ETS into a full-fledged database rather than a simple key-value store (think SQL v. Redis). Both are part of Erlang/OTP, though, so you get them for free just by using Erlang/Elixir/LFE/whatever. There's a hex.pm package called "Amnesia" that wraps Mnesia in a more Elixiry format.
- sergiotapia 10y agoThat sounds fantastic. I'm all for trimming the fat if we don't need it. I'll research this, thanks for the suggestion.
- elcritch 10y agoIf you're using Phoenix or Ecto, look into ecto_mnesia (https://github.com/Nebo15/ecto_mnesia https://github.com/Nebo15/ecto_mnesia). It wraps up mnesia into a nice ecto wrapper. It's limited on what your primary keys can be.