ets and dets #1717
Replies: 3 comments 1 reply
-
I'd suggest an opaque type either for key/value or for a whole record. Here it is not persisted https://github.com/inoas/gleam-elixir-phoenix-liveview-counter/blob/main/src/counter.gleam but every increment/decrement/set_value/get_value could instead read from ets via FFI: https://gleam.run/book/tour/external-functions.html Here is some example from stdlib for FFI: |
Beta Was this translation helpful? Give feedback.
-
Hello! You would need to design and implement API bindings for ETS and DETS using external functions, none currently exist for Gleam. If I wanted to store small volumes of data like that I would consider Khepri over DETS, it is more modern and in my opinion has a nicer interface. |
Beta Was this translation helpful? Give feedback.
-
Thanks, right now I'm creating my own ffi bindings, it's been relatively easy, really liking the language so far. |
Beta Was this translation helpful? Give feedback.
-
Hi, I'm new to gleam and wanted to know how could I use ets and dets from it, I want to implement a little service and store low data volumes with it.
Beta Was this translation helpful? Give feedback.
All reactions