~/talk

What you can learn from Elixirs HTTP Middleware Plug?

Talkat code.talks 2022 · 2022-09-15..09-16· [elixir-and-erlang, web-platform]
slides:none on file

Built a tiny Elixir HTTP server called Stupify that accepts one request at a time using :gen_tcp line mode, parses status line and headers, and maps them into a Plug.Conn struct (27 fields) so any Plug can be invoked. Implementation shows the adapter contract: implement send_resp, send_file, send_chunked, read_body and multipart support (six callbacks total) and return a payload. Demo proves it works end-to-end with Phoenix-compatible plugs and Cowboy adapters optional.

AI-written summary · about

  1. 0:00Introduction
  2. 1:24Elixir and Plug basics
  3. 3:11Plug as HTTP interface
  4. 6:22Minimal web server with Plug
  5. 11:39TCP listener and acceptor loop
  6. 14:11HTTP request parsing
  7. 16:43Web server to Plug connection
  8. 21:22Plug connection struct
  9. 24:35Plug adapters and responses
  10. 28:30Plug-compatible callbacks
  11. 30:16Key learnings from Plug
  12. 32:22Live demo: Stupify
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.