Pure Functional Database Programming‚ without JDBC
summary
Builds a new Postgres client called Skunk that speaks Postgres wire protocol directly (no JDBC), uses fs2 sockets, cats‑effect Resource/IO and scodec bit‑vectors, and implements the 53 low‑level message types the server expects. Shows concrete encoders/decoders, a non‑blocking message socket, prepared statements that stream results, async notifications via LISTEN/NOTIFY, connection pooling, and improved error reports with exact position and SQLSTATE — demos run queries and notifications successfully.
AI-written summary · about
chapters (18)
- 0:00Introduction
- 8:58Talking to Postgres
- 10:00Scala Socket Interface
- 18:04BitVector Socket
- 21:03utf8 Socket
- 21:14Startup Message
- 27:17Message Socket
- 33:33The Stack
- 33:49Buffered Message Socket
- 34:19Protocol Layer
- 35:19End User API
- 37:07Testing
- 37:51Codec
- 39:02Select
- 40:55Postgres Channels
- 41:50Notify
- 42:56Error Handling
- 46:28Contact Information
related talks
36mScale By The Bay 2018 Unconference: Rob Norris
24mRex "Doobie": A Functional JDBC That Doesn't Hide SQL
52mPostgreSQL and Java: Best Practices
29mPostgres Demystified
42mMiddleware is Dead!
55mHow Akiban Implemented a New Database Compatible with the PostgreSQL Protocol
30mPrograms as Values Pure Composable Database Access in Scala
47mThe PostgreSQL Protocol: The Good, the Bad and the Future
