martosaur
Creating a process that maintains a state and makes it available for other processes is one of the most common use cases for GenServer. And the very first optimization that is usually done here is using ETS to enable concurrent reads. In this post I show a simple Registry trick that makes it easier to do.
Trending in Blog Posts
Hey everyone! :waving_hand:
I’ve published Part 7 of the Building Distributed Systems in Elixir series, where we build core distributed ...
New
So, instead of wasting my afternoon arguing with anonymous handles on X, I turned to my trusty, soulless assistant and said: “Listen, ple...
New
An educational side project in Elixir, Phoenix, and Tauri. I share what I learned while wiring Automerge into the BEAM, including how I s...
New
New article: Elixir Project Structure — From mix new to a Growing Codebase
I’ve published a new article in my Elixir learning series on d...
New
:pencil: Phoenix’s built-in LiveView test helpers require you to hand-build the form payload and start a fresh pipe after every click. Wo...
New
Wrote about how to safely run a globally unique process in an Elixir cluster, and a scary story from the past!
Learn about :global for r...
New
Process labels are useful for visualization and debugging. Here’s why you should use them.
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 5- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
krasenyp
Short and sweet. Piggy-backing on Registry as a KV store is something I came up on my own and was wondering if it’s well-known.
martosaur
Yep, I love Registry! It was a little hard to grasp at first, but once it clicked… It’s weirdly powerful.
garrison
Concurrent readers on the ets table are fine for single-key reads, but if you want serializable multi-key reads you’ll either have to roll your own concurrency control or go back to the GenServer. Likewise if you’re only performing single-key writes you can allow concurrent writers on the ets table and it will still serialize the operations for you (it has its own locks).
adamu
Nice blog! Does it have an RSS feed?
martosaur
Thanks! No, no RSS yet, I need to look into adding it tho