Build Datastores From Scratch

Learn how to build datastores from scratch with your favorite programming language! We'll cover how one might implement primitive versions of PostgreSQL, Redis, MongoDB, ElasticSearch, etc. using primitives of the language. You will start with a basic data structure, wrap it with utilities, and continue to expand until we've achieved "feature parity". Students will get to understand how these technologies are working under the hood, and be more confident when using the real versions.

Course Curriculum

Section 1. Build Datastores From Scratch

1. LESSON

Lesson 1: Introduction to Datastores

Learn the basic concept of datastores and their importance in software development. We will cover the different types of datastores, the key features they provide, and their use cases. By the end of this lesson, you will have a clear understanding of the role of datastores in building applications....

2. LESSON

Lesson 2: Building a Basic Key-Value Store

Learn how to build a basic key-value store from scratch using your favorite programming language. We will cover the underlying data structure, the methods to add, retrieve, and delete key-value pairs, and the storage mechanisms. By the end of this lesson, you will be able to implement a simple key-value store....

3. LESSON

Lesson 3: Adding Persistence to the Key-Value Store

Learn how to add persistence to the key-value store to make the data durable. We will cover techniques such as file-based storage, serialization, and deserialization. By the end of this lesson, you will be able to persist data in the key-value store across multiple sessions....

4. LESSON

Lesson 4: Implementing Indexing and Searching

Learn how to implement indexing and searching functionality in the key-value store. We will cover different indexing techniques, such as hash indexes and B-tree indexes, and how to efficiently search for values using these indexes. By the end of this lesson, you will understand the importance of indexing and be able to implement it in the key-value store....

5. LESSON

Lesson 5: Scaling and Replication

Learn how to scale the key-value store and handle replication for high availability. We will cover techniques like sharding, partitioning, and replication protocols. By the end of this lesson, you will be able to design and implement a scalable and highly available key-value store....

6. LESSON

Lesson 6: Advanced Features and Optimizations

Learn about advanced features and optimizations in datastores. We will cover topics like caching, transaction management, concurrency control, and query optimization. By the end of this lesson, you will have a deep understanding of the advanced concepts and be able to apply them in your datastore implementation....