- GigaElixir Gazette
- Posts
- 🔄 Drain Your Queue, Save Your Week
🔄 Drain Your Queue, Save Your Week
GenServer migration reality check
Welcome to GigaElixir Gazette, your 5-minute digest of Elixir ecosystem news that actually matters 👋.
. WEEKLY PICKS .
🔄 Migrating GenServers Between Nodes? Drain and Restart Beats Clever Solutions
Alex66 asked how to move running GenServers between nodes without losing data. Running an FBP pipeline where nodes A → B → C → D process on server 1, need to migrate B → C to server 2 while messages flow. Three approaches emerged: blue-green deployment with proxy streaming, hot code reload using code_change/3 callbacks, or drain-and-restart. The pragmatic truth: unless you're running a stock exchange, drain the queue and restart. Five minutes of planned downtime beats three days debugging race conditions in your clever migration code. Let your message broker (Pulsar/Artemis) buffer during cutover.
🏠 Homex Brings Home Assistant Integration to Nerves Without the YAML Hell
Kevin Schweikert's Homex brings first-class Home Assistant integration to Nerves devices without boilerplate. The entire implementation for a switch: use Homex.Entity.Switch, implement handle_on/1 and handle_off/1, done. Twelve lines total versus YAML configs by hand. Homex handles autodiscovery, supervision, automatic reconnection, message deduplication, and timed measurements through MQTT. Your Raspberry Pi now talks to the same platform controlling your Zigbee bulbs, with standard OTP patterns applied to home automation.
Miguel Cobá hit the architectural problem every Phoenix app faces: Phoenix scopes pass authorization context to every function, but Oban workers run later without that request-scoped data. Two options emerged: serialize scope data into job args (verbose but preserves security), or add non-scoped function heads (breaks security completely). The first option is tedious. The second option ships vulnerabilities to production. Choose tedious. Your security model doesn't get to take breaks just because the work happens asynchronously.
⚖️ Tribunal Tests LLM Outputs Like ExUnit Tests Code - Catches Hallucinations in CI
George Guimarães shipped the testing tool RAG pipelines desperately need. Tribunal integrates with ExUnit so you can assert_faithful and refute_hallucination like any other test assertion. Test mode gates deployments (any violation fails the build immediately), evaluation mode runs hundreds of test cases with configurable pass thresholds. The framework handles both deterministic checks (contains, regex, JSON structure, token limits) and LLM-as-judge evaluations (faithful to context, relevant to query, free of bias/toxicity/harm). The red team module generates adversarial attacks automatically - base64 encoding, prompt injection, jailbreak attempts. Everything works with any model via req_llm.

Framework Migrations Are Toil, Not Real Work - Stop Gatekeeping Tedious Tasks
Ricardo García Vega's blog sat dormant for four years. Not because he stopped caring about writing. Because framework migrations are high-friction, low-creativity work that drains energy and delays projects indefinitely. The project that blocked him? Migrating a Next.js blog to Phoenix LiveView. The solution? Letting an AI agent handle it during vacation while he focused on family time.
Here's the mistake developers make: treating mechanical translation work as if it requires deep expertise. Framework migrations, dependency updates, component rewrites - these tasks require attention to detail but zero creative problem-solving. They're pure toil. Yet we gatekeep them as "real programming" that demands our full cognitive load. The usage_rules library changes the equation.
Phoenix, Ecto, and major libraries already support it - meaning your AI agent gets authoritative documentation on how to use your stack correctly, not hallucinated Stack Overflow answers from 2019. Ricardo's migration broke exactly once: the agent tried using Phoenix.HTML.Form helpers that don't exist in LiveView. Took thirty seconds to correct because usage_rules pointed it at the right Phoenix.Component.form documentation.
That's the entire debugging session for a four-year-blocked project. The rest? Tailwind 3-to-4 class name updates, Next.js component translations to Phoenix components, markdown file restructuring. Mechanical work that happened while he was hiking with family. The four-year gap in his writing? That's what happens when we confuse busy work with valuable work. Your brain is wasted on translating component syntax. Let the agent handle dependency churn. You focus on architecture decisions and features that actually matter to users.
Remember:
usage_rules library = agent follows José's docs, not 2019 Stack Overflow
Mechanical translation work doesn't require your expertise - delegate the toil that blocks creative output
Framework migrations are high-friction busy work masquerading as real programming
The project you've avoided for years ships while you're on vacation - if you stop gatekeeping tedious tasks
. TIRED OF DEVOPS HEADACHES? .
Deploy your next Elixir app hassle-free with Gigalixir and focus more on coding, less on ops.
We're specifically designed to support all the features that make Elixir special, so you can keep building amazing things without becoming a DevOps expert.
See you next week,
Michael
P.S. Forward this to a friend who loves Elixir as much as you do 💜