Skip to main content
grasp.study
About
Explore
Pricing
Log in
Try it for free
Back to course
👋
Welcome to a Grasp lesson
Create a free account
to keep studying and create your own study path.
Go advanced projects, Kafka, PostgreSQL
·
Module 6
Designing the Broker's Storage Engine
1
Go Structs for Message Broker Core Components
Define the core Go structs for topics, partitions, and messages in the message broker.
2
Concurrent State Protection with sync.RWMutex
Protect concurrent access to shared broker state (e.g., topic maps) using sync.RWMutex.
Designing a Commit Log Interface
Define a storage interface for the broker's commit log abstracting append, read, and offset operations.
4
Implementing File-Based Append-Only Logs for Partition Storage
Implement the storage interface using a file-based append-only log for each partition.
5
Implementing a PostgreSQL-backed Commit Log
Implement the storage interface using a PostgreSQL-backed commit log, reusing database skills.
6
Creating Topics and Partition Storage
Implement topic creation logic, including the creation of underlying storage for each partition.
7
Implementing Topic Deletion with Storage Cleanup
Implement topic deletion logic, ensuring proper cleanup of associated storage resources.
8
Topic Manager Partition Assignment
Implement partition assignment logic within the topic manager.
Previous module
Building the Broker's Network Layer
Next module
Implementing the Producer API and Write Path