Building a MySQL Database Driver in Elixir
summary
Claims that Elixir’s binary pattern matching plus Erlang sockets let you build a working MySQL driver quickly: a prototype parses the initial handshake, OK/EOF and command packets, handles the 3-byte length / 16MB chunking rule and computes auth responses using gen_tcp and byte-level matches. Implementation sits on the DBConnection behavior, uses pattern-matched binaries for protocol fields, and the featured production-grade driver is under 5,000 lines versus tens of thousands in other languages.
AI-written summary · about
chapters (34)
- 0:00Introduction
- 2:08Alan Ecosystem Foundation
- 2:47Elixir Pattern Matching
- 3:59Elixir Miner
- 5:15Pattern Matching
- 6:13Types
- 6:50Modifiers
- 7:26PNG
- 8:28PNG signature
- 9:36Executables
- 11:41Version
- 12:18AB Version
- 13:23Conversion
- 14:17Read Else
- 16:14Socket API
- 17:36Overview
- 18:48Example
- 22:07Generic vs Specific
- 24:23Gen Server
- 24:45Stack
- 28:45Flow Diagram
- 29:30Connection Packet
- 30:16Connection Version
- 30:44Parse Version
- 32:19Response Packet
- 34:29Integer
- 35:13Datatypes
- 36:21Capabilities
- 38:12Client Protocol 41
- 39:28Packets
- 40:40DV Connections
- 43:24Connect API
- 45:54API
- 47:41Book
related talks
49mBuilding a MySQL Database Driver in Elixir
37mBuilding Database Applications with Database/SQL
35mElixir's Ecto: Functional Relational Data Access Done Right
30mDriving Innovation in MySQL with Extensions
41mEcto: A language integrated query for Elixir
45mdatabase/sql: the bad, the good and the ugly — developing a driver for YDB
17mFast database interfacing with MySQL.jl
41mElixir and Money
