#Elixir
127 notas · última:
Building Distributed Systems in Elixir: Part 9 — Backpressure
The article shows how unbounded BEAM mailboxes can grow into OOM risk, then compares stop-and-wait acknowledgment with demand-driven windowing as two ways to keep producer and consumer in balance.
Building Distributed Systems in Elixir: Part 8 — Publish / Subscribe
The article builds a Pub/Sub broker in Elixir with raw processes, showing how topics, fan-out, subscriptions, and Process.monitor/1 avoid tight coupling and clean up dead subscribers.
Building Distributed Systems in Elixir: Part 7 — Worker Pool
The article builds a worker pool from raw Elixir process primitives to keep concurrency bounded, queue excess jobs, and let workers pull new work only when they become available.
Building Distributed Systems in Elixir: Part 6 — Named Processes
The article shows how named processes give a worker a stable, discoverable address with local registration or `:global`, while supervisors still handle restarts and replacement PIDs.
Building Distributed Systems in Elixir: Part 5 — Supervisor From Scratch
The article builds a manual one-for-one supervisor in Elixir using links, trapped exits, and message passing to restart only a crashed worker while leaving a healthy sibling running.
Building Distributed Systems in Elixir: Part 4 — Process Linking
The article explains how `spawn_link/1` connects two BEAM processes so an abnormal exit in one can terminate the other, and how `Process.flag(:trap_exit, true)` turns that exit into a message.
Building Distributed Systems in Elixir: Part 3 — Process Monitoring
Shows how BEAM process monitoring uses Process.monitor/1 to receive :DOWN messages when a worker stops or crashes, without polling, GenServer, or Supervisor.
Building Distributed Systems with Elixir — 02: Correlated Request–Reply
The article shows how to pair each asynchronous request with a unique reference so a client can match the right reply, even when one process makes several requests.
Building Distributed Systems in Elixir: Part 1 - Building a Stateful Process in Elixir Without GenServer
The article shows how a counter can be built as a BEAM process with private state, message passing, and a recursive receive loop, then contrasts that core model with what GenServer adds.
Pesquisa Viva: Distributed Systems Patterns
General patterns for building distributed systems, one pattern at a time, using krishnadaspc's Elixir series built on raw BEAM primitives as the main thread.
Background jobs with Oban, part 1: stop blocking your LiveView
The post moves preview fetching out of a LiveView into an Oban background job, showing installation, migration, configuration, worker code, and job enqueueing.
Out-of-the-box Elixir telemetry with Phoenix
The article explains Phoenix’s built-in telemetry, how metrics are defined in telemetry.ex, how events feed multiple metrics, and how clustered Elixir lets the dashboard attach to other nodes.
Test async work in Elixir with assert_eventually
The post shows that sleeping in tests is fragile for async Elixir work and presents assert_eventually/1 as a helper that retries an assertion until it succeeds or times out.
Bringing SOLID to Elixir
The article adapts SOLID to Elixir with modules and behaviours, showing how SRP, OCP, LSP, ISP, and DIP can support maintainable, extensible, testable functional code.
Overengineered #001: Hello World
The post rebuilds Hello World as a distributed Elixir app: UDP broadcast finds nodes on startup, and node monitoring triggers greetings when peers join the cluster.
Distributed PubSub in Elixir
The article builds a local PubSub with Registry, then extends it to a clustered setup with pg and libcluster so each node relays messages to local subscribers.
Elixir Makes You Make Good Decisions
The author argues that Elixir, Phoenix, Ecto, and the BEAM helped screen.garden make cleaner architecture, easier authorization, faster file sync, and tests that are pleasant to write.
Data evolution with set-theoretic types
The text proposes using set-theoretic types and revisions in structs to maintain compatibility as data evolves, preserving type safety between old and new versions.
Cross-App Communication with RPC in Elixir
How Gearflow connects two Phoenix apps over distributed Erlang RPC instead of HTTP, and the coupling trade-off they accepted to skip building an internal API.
Elixir's Secret Weapon
Explains Elixir's with special form as the fix for nested case statements when chaining dependent operations that each return a tagged {:ok, _} / {:error, _} tuple.
Leverage Concurrency Efficiently When Managing Multiple Tasks in Elixir
Builds from Task.start and Task.async to Task.async_stream, showing why one process per item breaks at scale and how max_concurrency, ordering, and timeouts trade off against each other.
Did contexts kill Phoenix?
Argues that Phoenix's contexts layer, meant to enforce domain-driven boundaries, raised the barrier to entry enough to slow the framework's adoption relative to Rails.
Beyond Functional Programming with Elixir and Erlang
José Valim argues that functional programming was never the goal of the Erlang VM, only the means to fault-tolerant, concurrent, maintainable distributed systems.
Agent Jido: the Weather Agent example
A worked example shows how Jido, an Elixir agent framework, wires an LLM to a weather API tool through three layers: Actions, an AI Skill that renders prompts, and a signal-routed Agent process.
A Simple Example of Calling an Elixir Library from Gleam
Michael Lynch works through a minimal example of calling an Elixir CSV library from Gleam, wrapping @external attributes and converting Elixir's Enumerable into a Gleam List.
Enhancing Your Elixir Codebase with Gleam
The article shows how to add Gleam to an Elixir/Phoenix project, move core enrollment logic into Gleam, call it from Elixir, and extend the setup to handle a waitlist.
How I Stopped Worrying and Started Loving the Umbrella – TAGBASE
The author explains why Tagbase moved from separate Node.js and Elixir apps to an Elixir umbrella app, focusing on shared code, clearer boundaries, faster local development, and safer separation between portal and back office.
Setup VSCode for Elixir Dev
The page recommends a VS Code setup for Elixir and Phoenix development: ElixirLS and Phoenix Framework as must-have extensions, Elixir Test as a helpful add-on, and Tailwind CSS IntelliSense for Tailwind users.
MQTT for Elixir
The article shows how to use MQTT in an Elixir setup for embedded devices, with a sensor process publishing temperature data and a LiveView dashboard subscribing and sending commands.
Speed up your daily work with Elixir console tricks
The post collects IEx habits that make Elixir work faster: use built-in help, autocomplete, history, multiline input, previous results, recompile, and .iex.exs setup.
Is LiveView Overhyped?
The author argues LiveView is heavily promoted but not technically overhyped. He frames it as a useful, well-chosen trade-off for many web apps, while noting limits around offline use, latency, connectivity, and fallback behavior.
Stop using Behaviour to define interfaces, use Protocol!
The post argues that Behaviour fits impure interfaces with shared logic, while Protocol is the right tool for pure interfaces. It also proposes growing pure interfaces into richer ones and introduces Objext.
Elixir: How to distribute Mnesia between multiple nodes
The article shows how WTTJ uses Mnesiac and Libcluster to sync Mnesia stores across nodes, avoid duplicate background work during blue-green deploys, and keep data available across instances.
Elixir: How to distribute Mnesia between multiple nodes
The article explains how WTTJ used Mnesiac and Libcluster to sync Mnesia stores across nodes, avoid duplicate background work during blue/green deploys, and keep state available in Elixir services.
How LiveView differs from a traditional SPA
The text contrasts traditional SPAs, which split state and code between client and server, with Phoenix LiveView, which keeps state on the server and reduces custom browser-server code.
Building a Real-time Kanban Board with Phoenix LiveView
The post walks through building a minimal Kanban board with Phoenix LiveView, from project setup and Ecto schemas to LiveView events, PubSub broadcasts, and drag-and-drop updates.
Optimizing for Free Hosting — Elixir Deployments
The article lays out a single-server Phoenix deployment on free Google Cloud hardware, using raw Linux tools, Nginx, systemd, releases, and a bash script to achieve simple, low-cost, zero-downtime deploys.
Planetary Scale Rust and Golang by embedding WebAssembly in Elixir
The post describes Assemblex, a toy Elixir platform for deploying and running WebAssembly binaries across nodes, with hot reloads, supervision, and benchmarked execution overhead.
How to Deploy a Phoenix App to Gigalixir in 20 Minutes
Shows the basic steps to create a Phoenix app, adjust production config for Gigalixir, set buildpacks, create a database, and push the app to the host.
How to build a self-healing system using supervision tree in Elixir
Explains how Elixir supervision trees make systems reliable by restarting failed processes, using workers, supervisors, restart strategies, and self-termination to recover from repeated crashes.
