Improving Database Protocols: A Developer Experience Perspective
This article discusses shortcomings in SQL database client protocols, specifically MySQL and PostgreSQL. The author points out issues with connection management, error recovery, and prepared statements, leading to increased development complexity. For example, mutable connection state makes error recovery difficult, while the session-scoped nature of prepared statements limits their use in connection pools. The author proposes improvements borrowing from the Redis protocol, such as an explicit configuration phase, idempotency keys, and globally scoped prepared statement identifiers. These changes would simplify development workflows and improve the reliability of database clients, resulting in a better developer experience and more user-friendly databases.