The field guide / Before you begin
Building a Storage Network
A practical, illustrated journey through Go and distributed systems. Start with an empty directory. Finish with a system you understand well enough to change.
Tests and unfinished exercises for your own project. Extract the ZIP into a new folder and make it your own repository.
A file disappears from a laptop. Somewhere else, a little machine on somebody's shelf still has enough information to bring it back. That is the appealing version of distributed storage. The interesting version begins when the shelf machine is asleep, another machine lies about what it has, and your laptop loses its connection just after asking whether the backup succeeded.
This book is about that interesting version.
You will build a small storage network in Go. You will decide what a successful write means, turn a byte stream into a protocol, scatter recoverable pieces across machines, encrypt data before it leaves the owner, and teach the network to repair itself. The network is the project. Learning how to think about a system whose parts can fail independently is the lasting result.

What you will build
This course teaches Go and distributed systems through one practical project: a storage network built from first principles. You write the core yourself, guided by behavioural contracts, explanations, diagrams and pseudocode. The page does not hand you a finished function and ask you to retype it. Optional hints and worked designs sit behind disclosure controls. A small companion workshop contains runnable Go exercises and reference solutions to selected mechanisms. The final chapters deliberately leave more of the design to you.
The target is a personal network of cooperative, admitted machines. Start with separate processes on one computer; later use your own machines connected through Tailscale. Storage nodes hold other people's encrypted bytes. Each owner keeps their own recovery material. The book develops a 2-data + 1-parity erasure-coded core, then explains how a general Reed–Solomon configuration changes the trade-offs. This is enough to make repair and failure-domain placement real without hiding them behind a giant library.
There is also an existing project, MeshVault, with Mac and iPhone interfaces. Its supplied source is a separate comparison implementation: it uses full encrypted mirroring and an HTTP protocol. It is not the answer key for this course's TCP and erasure-coded system. Chapter 22 gives you the precise integration exercise. The book does not assume that a UI written for one protocol will magically work with another.
Read the archipelago
The map grows with the lessons. Its five settlements have different roles:
| Island | Its role in the illustrations |
|---|---|
| Home Harbour | The first file store and the owner's starting point. Files are prepared, protected and restored here. |
| Garden Village | The first remote storage partner. Its courtyard provides a place to picture sorting cargo and keeping records. |
| The Citadel | A third storage location, used to explore redundancy, temporary outages and repair. |
| Harbour City | The people and applications using the engine, followed by the storage-credit experiment. |
| Pirate Cove | Untrusted participants who may intercept cargo or make dishonest claims. |
These are teaching roles. Three storage destinations illustrate a 2+1 stripe; five settlements on the map do not mean five independent storage nodes. The code examples keep generic node names because a real deployment can have different participants and failure domains.
Ships carry pieces of a file, harbour signals suggest communication, and fog represents lost contact. A pirate's failed reading attempt after encryption means the cargo remains confidential; encryption alone does not prevent theft, deletion or disruption. The market is an accounting experiment, not proof of a trustworthy open economy.
How to spend an evening here
Read a chapter once without opening the solutions. When you reach a prediction, actually make one: on paper, in a note, or aloud. A mistaken prediction that you can explain afterwards is unusually valuable. Then sketch your approach before opening your editor.
Each chapter has a build contract, acceptance scenarios and an exit question. The contract says what must become true. It is deliberately more precise than “add networking” and less prescriptive than a list of functions to copy. The acceptance scenarios are tests you can implement through your own public boundary. Where the workshop provides executable tests, the chapter says so explicitly; the other scenarios are specifications, not a claim that a hidden test runner already exists.
Reading estimates count explanatory text, including hidden material, at a leisurely pace. Building takes longer: a short chapter may lead to several evenings of experiments. Stop at a checkpoint with one sentence describing the next observable behaviour you want. Returning tomorrow to “make duplicate uploads preserve quota” is much easier than returning to “finish distributed systems”.
Who owns this state? What does success promise? What can happen twice? What survives a restart? What evidence would prove me wrong?
The route through the book
The ordering is intentional. You encounter a small, concrete problem before its larger theory. We discuss consistency after there are two plausible versions of a file. We discuss backpressure after there is a queue that can grow. You will revisit earlier decisions; a design that made sense for one process may become a bottleneck for six machines. Revising it is part of the work.
What you need to know already
You should be comfortable writing small programs: functions, loops, records or structs, and simple tests. The book assumes you can look up a Go syntax detail. It explains the Go habits that matter when the project grows: small interfaces, slice ownership, error chains, cancellation, bounded concurrency and package boundaries. Appendix A is a compact language bridge if you are coming from C# or another object-oriented language.
Reading requires only a browser. This website has no remote fonts, runtime libraries, account, server or internet dependency. Double-click index.html, then bookmark the address in the browser's address bar. It will start with file:///. A local path belongs in that address bar, not in a Google search. You can also bookmark a chapter: its address ends with a readable fragment such as #erasure.
Keep the course folder together if you move it. The HTML contains the lessons, diagrams and reading controls; the assets and companion folders contain the illustrations and workshop. A new location needs a new bookmark. Reading preferences last for the current page session; the browser bookmark is your reliable place marker. The chapter menu can record chapters you mark as read in this browser when local storage is available. The islands follow the lesson and illustrate its ideas; they do not inspect your code or mark exercises as passing. “Print chapter” prints the current lesson; “Print book” prints the complete book with solutions closed.
Building the Go project does require a Go installation and, eventually, running your own node processes. That requirement belongs to the programming exercises. It has nothing to do with opening or reading this book. The companion targets Go 1.24 or later; the separately supplied MeshVault prototype declares its own Go version.
Your working arrangement
Use Download starter files to get the tests and unfinished exercise functions, then extract the ZIP into a new folder such as my-storage-network. The download contains no completed solutions, app source or Git history. Initialise your own repository in that folder and keep the course repository as reading material. Appendix B explains the exercises and test commands. Version control is useful even when you are the only person working. Commit a passing milestone, then let the next chapter challenge it.
Do not begin by copying the whole reference architecture. Chapter 1 needs a tiny command, not a package for every noun in the table of contents. New boundaries should arrive with a reason. A local byte store, a network client and an erasure codec are useful distinctions because their responsibilities and failure modes differ.
By the end, you should be able to explain the consistency you offer, identify the recovery root, calculate the failure budget, trace a cancelled request, and design a test that demonstrates a specific limitation. You will also have a foundation for future features: phone photo backup, richer discovery, capacity credits and more advanced placement. You will not have learned every corner of distributed systems. You will have learned how to keep learning without somebody choosing every step for you.
Turn the page. Our first network has no network in it.
