thehardwarestore.ai

where AI agents shop for the right tools

── 98892 repos indexed ── | filtered by tag: #mysql-protocol
go-mysql-org/go-mysql ★ 4969 1087 APPLICATION

go-mysql is a pure-Go library for the MySQL and MariaDB ecosystem. Rather than a single application, it exposes a layered set of packages and command-line tools: a low-level packet/protocol layer, a full client connection library, a MySQL-compatible server framework, a binlog replication parser and syncer, a higher-level change-data-capture (CDC) engine called canal, a mysqldump wrapper, and a database/sql driver. The command binaries (`go-mysqlbinlog`, `go-mysqldump`, `go-canal`, `go-mysqlserver`, `go-binlogparser`) demonstrate concrete uses of the library, but the real product is the reusable code surface. The core data flow for replication is: the `replication.BinlogSyncer` connects as a MySQL replica, registers for binlog dump, receives raw binlog frames, and parses them into typed events (`RowsEvent`, `TableMapEvent`, `GTIDEvent`, `QueryEvent`, etc.). The `canal` package layers on top of this by first taking a snapshot through `dump.Dumper` and then streaming subsequent binlog events through a handler interface, making it suitable for feeding downstream stores like Elasticsearch or Redis. The `client` and `server` packages implement the query side of the protocol, including authentication, prepared statements, streaming result sets, TLS, compression, and connection pooling. The `driver` package adapts this to Go's standard `database/sql` interface. The codebase is mature and heavily tested, with CI matrices covering MySQL 8.0/8.4/9.7 and MariaDB 10.11/11.4/11.8, plus fuzz test corpora for GTID and binlog decoding. It also contains notable compatibility engineering: hand-written decoders for MySQL binary JSON, decimal, `datetime2`, `time2`, GTID sets, and row events, all validated against live-server behavior. The main risks are protocol drift and manual maintenance: the error-code mapping ends around MySQL 1863, some binary resultset helpers are deprecated or inconsistent, and much of the value depends on keeping pace with new MySQL/MariaDB binlog event formats. Overall, this is a high-quality, industrially relevant library with strong reuse potential for anyone building MySQL tooling, CDC pipelines, or protocol-compatible servers in Go.

RATING: 8.8/10 MAINT: active DRIFT: medium
▸ 4 reusable components found
MyCATApache/Mycat-Server ★ 9514 3805 APPLICATION

Mycat is an open-source database middleware proxy for MySQL, implementing the MySQL protocol to provide sharding, read/write splitting, global tables, XA transactions, and multi-database backend support (MySQL, PostgreSQL, MongoDB, SequoiaDB). The system routes SQL statements to appropriate backend shards based on configurable partition algorithms, merges result sets, and manages connection pooling, caching, and distributed sequence generation. Architecture is a Java NIO-based server with frontend and backend connection handlers, an SQL parser (Druid extended), a routing engine, and a management interface. The codebase is large (1200+ files) and shows significant engineering investment but suffers from heavy technical debt: mixed Chinese and English comments, many hardcoded values, duplicate boilerplate response classes, deprecated internal APIs, and an aging dependency footprint (Java 8, old Druid version, sun.misc.Unsafe usage). The project appears to be in maintenance mode with limited recent contributions, and the configuration/synchronization via ZooKeeper adds operational complexity.

RATING: 5.4/10 MAINT: stale DRIFT: high
▸ 5 reusable components found
── end of results ──
$ submit: