Wojtek Mach // Library Client/Server Simmetry
Contributors
Category
Wojtek Mach from Dashbit explored an overlooked opportunity in Elixir’s HTTP handling at Alchemy Conf 2025.
The HTTP protocol is symmetrical, which means data flows in both directions. But Elixir’s client libraries (Req) and server libraries (Plug) use completely different designs. Mach argues these differences make sense at the high level, but something interesting is happening at a lower abstraction layer.
At the socket level with gen_tcp, the API is perfectly symmetrical. The “gen” prefix is meaningful—it’s generic, not specific to clients or servers. Mach sees a similar opportunity for HTTP.
The talk references Mint, a low-level HTTP client that was initially considered for Elixir’s standard library under a different name. It also compares Elixir’s current approach to JavaScript’s Fetch API, where something works very differently.
Mach makes the case for where symmetry could exist in Elixir’s HTTP stack and the benefits it might unlock for the entire ecosystem. The argument involves rethinking what operations belong at which abstraction levels.
One principle emerges: network protocols are symmetrical by definition. The question is whether our libraries should reflect that, and if so, where.