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 5
Building the Broker's Network Layer
1
Multi-Connection TCP Server with net.Listener
Build a TCP server using net.Listener that accepts and manages multiple connections.
2
Concurrent Connection Handling with Graceful Shutdown
Implement concurrent connection handling using a goroutine per connection and sync.WaitGroup for graceful shutdown.
3
Designing a Simple Binary Protocol
Design a simple binary protocol with message types for produce, consume, and acknowledge operations.
4
Length-Prefixed Framing for TCP
Implement length-prefixed binary message framing for reliable TCP communication.
5
Binary Encoding and Decoding with `encoding/binary`
Encode and decode protocol messages using binary serialization with encoding/binary.
6
Connecting & Sending Framed Messages to a TCP Server
Establish a connection to the TCP server and implement a function to send a single framed protocol message.
7
Receiving Framed Messages in TCP Clients
Implement a read loop in the TCP client to receive and decode framed messages from the server.
8
Building a Request-Response Client
Compose the send and receive functions into a client that executes a full request-response cycle.
Previous module
Production Readiness: Testing, Logging, and Shutdown
Next module
Designing the Broker's Storage Engine