Database Systems and Services
Key-value stores, relational, graph, time series and vector databases
The Go standard library package database/sql works with more than sixty SQL database drivers for convenient connection to relational databases. Client database drivers and object-relational mappers (entity frameworks) are available for various database systems. See pg and ent.
The package sqlite with its GitLab repository provides a Go port of the C-language database SQLite.
CockroachDB represents an example of a distributed, scalable, high-performance database. It employs a relational model, with queries compatible with the PostgreSQL implementation of the SQL:2016 standard. It is a Go-based, open-source solution with hundreds of GitHub contributors. Cockroach Labs maintains a collection of tutorials and webinars on its YouTube channel.
Weaviate (formerly SeMI Technologies) offers a vector database, which we can think of as a document and image store indexed with neural network embeddings. It is especially well suited for high-performance traditional and AI-guided search. Weaviate brings machine learning and large language models into the world of databases. It is a Go-based, open-source solution with many GitHub contributors.
milvus offers an open-source vector database designed for AI-guided search. It represents a project of The Linux Foundation. Available for Linux and Mac OS systems, milvus is a Go-based solution with many GitHub contributors.
Additional examples of database systems written in Go include
- etcd provides a distributed key-value store
- Dgraph is a graph database utility
- Prometheus focuses on time series monitoring of information systems
- Thanos provides long-term storage for Prometheus databases
- Grafana Mimir manages time series metrics for visualization
- Dolt is a version-controlled relational database (Git for data)
- LiteFS offers cloud-hosted, distributed SQLite
Backend-as-a-Service Systems #
Frontend developers are more productive when they can focus on the frontend, working with JavaScript/TypeScript and various frontend frameworks. They can do this by using application programming interfaces (REST or GraphQL) to access backend-as-a-service (BaaS) systems, including Firebase on Google Cloud Platform (GCP), Amplify on Amazon Web Services (AWS), the Suprabase commercial system built on PostgreSQL and NodeJS, the 8Base commercial system built on MySQL and NodeJS, or the Appwrite open-source system build on PostgreSQL, TypeScript, and PHP. PocketBase is a high-performance, open-source alternative to other BaaS systems. It is built with Go and uses SQLite as its database engine.
EdgeDB, a graph-relational database built on PostgreSQL, has positioned itself as a BaaS solution with graph, relational, and vector database capabilities. EdgeDB features Go, Python, and TypeScript clients for its query language EdgeQL.
Back to Building Systems and Services
References #
-
Darnell, Ben. 2016. “Lessons from a Large Go Project: CockroachDB—Scalable, Survivable, Consistent SQL.” Presentation for the Association of Computing Machinery available on YouTube.
-
Dilocker, Etienne. 2023, February 6. “Our Mad Journey of Building a Vector Database in Go.” Weaviate at FOSDEM 2023. Available on YouTube.
-
Edwards, Jessica. 2022, July 12. Why Go Was the Right Choice for CockroachDB.
-
Harrison, Guy, Jesse Seldess, and Ben Darnelld. 2022. CockroachDB: The Definitive Guide. Sebastopol, CA: O’Reilly. ISBN-13: 978-1-098-10024-7.
-
Jeffery, Travis. 2021. Distributed Services with Go: Your Guide to Reliable, Scalable, and Maintainable Systems. Raleigh, NC: The Pragmatic Bookshelf. ISBN-13: 978-7-68050-760-7. Includes discussion of the Go implementation of the Raft consensus algorithm, where “Raft” can be thought of as standing for “reliable/replicated/redundant and fault-tolerant.”
-
Pivotto, Julien, and Brian Brazil. 2023. Prometheus Up and Running: Infrastructure and Application Performance Monitoring (second edition). Sebastopol, CA: O’Reilly. [ISBN-13: 978-1098131142]
-
Taft, Rebecca, Irfan Sharif, Andrei Matei, Nathan VanBenschoten, Jordan Lewis, Tobias Grieger, Kai Niemi, Andy Woods, Anne Birzin, Raphael Poss, Paul Bardea, Amruta Ranade, Ben Darnell, Bram Gruneir, Justin Jaffray, Lucy Zhang, and Peter Mattis. 2020, June. “CockroachDB: The Resilient Geo-Distributed SQL Database.” SIGMOD ‘20: Proceedings of the 2020 ACM SIGMOD International Conference on Management of Data, 1493-1509. Abstract and Presentation Video Online
Back to Building Systems and Services