A 7-day tutorial on implementing an RPC framework in Go/golang from scratch (7 days implement golang remote procedure call framework from scratch tutorial). Build an RPC framework modeled after the implementation of the golang standard library net/rpc, covering the server, an asynchronous and concurrent client, message encoding and decoding, service registration, and multiple transport protocols including TCP/Unix/HTTP. On Day 1, we implement a simple server along with message encoding and decoding.
A 7-day tutorial on implementing an RPC framework in Go/golang from scratch (7 days implement golang remote procedure call framework from scratch tutorial). Build an RPC framework modeled after the implementation of the golang standard library net/rpc, covering the server, an asynchronous and concurrent client, message encoding and decoding, service registration, and multiple transport protocols including TCP/Unix/HTTP. On top of that, it adds features such as protocol exchange, a registry, service discovery, load balancing, and timeout processing.
WaitGroup and channels are two common ways to control concurrency, but for complex scenarios Context is a more elegant mechanism. Context provides four control mechanisms: WithCancel, WithValue, WithTimeout and WithDeadline.
mmap maps a file or device into memory — a one-to-one mapping between the file's on-disk address and a range of the process's virtual address space. Reading or writing that mapped memory reads or writes the file at the corresponding position. This tutorial shows how to use mmap in Go.
A 7-day tutorial on implementing an ORM framework GeeORM in Go/golang from scratch (7 days implement golang object relational mapping framework from scratch tutorial). Build an ORM framework modeled after the implementations of gorm and xorm. When a struct changes, the fields of the database table are migrated automatically; only adding and deleting fields is supported, changing field types is not.
A 7-day tutorial on implementing an ORM framework GeeORM in Go/golang from scratch (7 days implement golang object relational mapping framework from scratch tutorial). Build an ORM framework modeled after the implementations of gorm and xorm. Introduces transactions in databases; wraps transactions, using user-defined callback functions to implement atomic operations.