envertech
Trending in Questions
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
Hello,
I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
New
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
So my question is quite simple and i have found no conclusive answer on forum, google or AI.
Should we use :erlang.float for Integer to ...
New
Documentation
While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New
If a change or preparation module uses Ash.Changeset.get_argument/2 or Ash.Query.get_argument/2 (or any of the other get_argument functio...
New
Other Trending Topics
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Hi there! We created Gust: A task orchestrator inspired by Airflow.
For those who have never heard about Aiflow, it’s a Python-based wor...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself.
My main conc...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixirconf-us
- #ai
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming










Showing Posts 1 to 10- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
sneako
Check out ETS, here’s the elixir school page Erlang Term Storage (ETS) · Elixir School
keathley
Technically speaking ets isn’t equivalent to BoltDB since ets is not persistent. For that you’d have to look at dets or mnesia. If you’re just looking for LMDB then there’s a good nif for it here: GitHub - zambal/elmdb: Erlang NIF driver for LMDB, a fast, compact and transactional key-value data store · GitHub.
Exadra37
While GitHub - LMDB/lmdb: Read-only mirror of official repo on openldap.org. Issues and pull requests here are ignored. Use OpenLDAP ITS for issues. · GitHub seems to be alive the Erlang NIF seems to be dead
Any real world example of projects in Elixir/Erlang using LMDB in production?
keathley
I don’t know of any. I also don’t know that I’d argue that the nif is dead but you’ll have to make that judgement for yourself. As far as other KV stores go I’ve used rocksdb | Hex a ton and really like it. If what you need is “KV Store” and not “LMDB” (which is what boltdb is based on) then I can highly recommend that rocksdb nif.
Exadra37
I am just exploring my way into Elixir world and a lot curious about everything not really on the need of anything in special for now.
Why not Mnesia instead of other KV stores?
PS: nice podcasts
envertech
Thanks for the links. Are there any performance benefits to having a native Elixir implementation vs an NIF? Similar to what Golang has with BoltDB?
keathley
Preference I guess. Mnesia provides more features then either rocksdb or lmdb but also has some issues with file loading times, maximum file sizes, repair times on corrupted files, etc. IIRC Klarna built a backend for mnesia in leveldb (which is what rocksdb is based on) in order to solve those issues. If you just need keys and values on a single file system then rocksdb is what I would use. If you want the extra features of mnesia and you don’t have a ton of data to store then mnesia is probably fine.
Aw thanks! Happy to hear you’re enjoying it.
If you just need a quick lookup for KVs and don’t need persistence then ETS is going to be your best bet. I haven’t benchmarked dets or any other “native” elixir solution vs. the rocksdb nif so I can’t say what the performance implications are. Personally I use rocksdb because its “very fast” and its seen tons of use across many companies and solutions. So I trust it to be reliable.
envertech
We do need persistence. I should of been more specific with the topic title. RocksDB and it’s predecessor LevelDB are fine for smaller database applications but as the database grows into the double digit GB range and above, the performance degradation tends to be quite noticeable.
keathley
Well DETS (which is what mnesia is based on) has a max 2gb file size so you’ll have to use mnesia’s table fragmentation anyway in that case.
I’m assuming you mean read performance here. I’m also assuming you’ve tuned your caches, compaction threads and such for this? In my experience you shouldn’t have that much issue tuning reads in the “double digit GB” order of magnitude but obviously you know your use case more then me
. I’m also not arguing that you wouldn’t get better read performance from LMDB or any other db based on B+trees
.
All of that aside, I don’t know of a KV store written in Elixir that I would trust that hasn’t already been mentioned or isn’t based on an underlying DB engine through NIFs.
OvermindDL1
For local KV storage I tend to use either DETS (single-load use), mnesia (persistant save/load use), or leveldb (for high speed data that might exceed 2 gigs).
Overall I default to mnesia.