- Front Matter
- Standing Boundary and Copyright Note
- Contents
- Preface
- How to Read This Book (and the Trilogy Map)
- Part I — The Harness
- 1 · The Seam, Inherited
- 2 · A Real Database, Disposable
- 3 · The API In Process
- 4 · The Choreographed Night, Under Load
- 5 · Proving the Refusals
- Part II — The Dispatcher
- 6 · The Hosted Worker
- 7 · Delivery, With Backoff
- 8 · The Wiring Completed
- 9 · At-Least-Once, Made Once
- Part III — Observability
- 10 · Structured Logging with Serilog
- 11 · The Correlation Thread
- 12 · What Was Refused, and Why
- 13 · Health, Readiness, Liveness
- Part IV — Configuration & the Container
- 14 · Environments and Secrets
- 15 · The Dockerfile
- 16 · The Gate
- 17 · Deployed, and Probed
- Back Matter
- Epilogue: The Honest Boundary of the Trilogy
- Appendix A · Installation & Run Guide
- Appendix B · The Full Volume-III Solution Skeleton
- Appendix C · Tools and Packages
- Appendix D · The Outbox → Subscriber → Reaction Map
- Appendix E · Configuration & Secrets Matrix
- Source References
- Glossary
- Index
From Contract to Container
Ship the NEXUS-1 backend for real: a genuine SQL Server on every test run, a dispatcher proven under a killed process, structured logs with a correlation id, and a CI gate that will not package a red build. Two hundred tests, one Dockerfile, one honest boundary.
Minimum price
$78.98
$99.99
You pay
Author earns
About
About the Book
Most books that teach deployment show you a green checkmark and ask you to trust it. From Contract to Container shows you the checkmark, then makes you prove what's behind it — a real database, a real container, and a gate that will not lie.
This is the third and closing volume of the backend trilogy that builds NEXUS-1, a fictional Phase-0 nuclear-plant digital twin, from a proven Domain and Application core (Volume I) through a real Infrastructure and API layer (Volume II) to a system that ships. Seventeen chapters take the codebase from two hundred tests to a running container answering its own health probes — without a mock standing in for the database, without an assumption standing in for a real failure, and without a claim that outruns what the suite actually proves. By the last chapter, a real SQL Server has been stood up and torn down on every single test run, a dispatcher delivers at-least-once and turns that into an exactly-once effect, every refusal the system can produce carries a correlation id, and a CI gate will not package an image unless the entire suite is green.
That absence of shortcuts is not caution for its own sake. It's the argument. A system that "works" against a fake database or a stubbed dependency hasn't been proven — it has been rehearsed. This volume's whole discipline is refusing that substitute: the harness in Part I runs every integration test against a disposable, genuine SQL Server; the dispatcher in Part II is watched failing under a killed process before it is trusted to recover; the observability in Part III is proven by triggering the exact failure it claims to report; and the container in Part IV is shipped only once a gate — not a developer's judgment — has verified it.
What Makes This Book Different
It tests against the real thing, not a stand-in. Every integration test in this book runs against a genuine, disposable SQL Server under Testcontainers — never a mock, never an in-memory substitute. If a query is wrong, the test finds out the way production would.
It watches its own promises fail. Every invariant this book claims — a retry budget, a health probe, a refusal shape — is demonstrated twice: once holding, and once deliberately broken in a test and watched to fail. A guarantee that has never been watched failing is not yet a guarantee.
It closes its own debts in writing, and updates them when it can't. Chapter 1 opens by reading Volume II's debt ledger back as a promise, chapter by chapter. The closing Epilogue reads that promise back a second time — and when one row can no longer be kept as written, the book corrects it on the page rather than letting it quietly disappear.
It audits itself across chapters, not only within them. The back matter doesn't just summarize what earlier chapters built — it cross-checks them against each other, and names what it finds, including a real wiring gap between the CI pipeline and the Dockerfile that no single chapter, read alone, would have caught.
It knows exactly what it hasn't built yet. The trilogy closes on an Epilogue titled The Honest Boundary of the Trilogy — a final, itemized account of everything three volumes still do not do, with nothing deferred to a future book that does not exist.
What's Inside
- Part I — The Harness. The seam inherited from Volume II, a real disposable database, the API exercised in process, a full choreographed night proven under load, and every refusal the system can produce asserted over the wire.
- Part II — The Dispatcher. A hosted worker that drains an outbox table, delivery with exponential backoff and quarantine for the message that can't be delivered, the wiring that finally activates two reactions Volume I could only describe, and the inbox pattern that turns at-least-once delivery into an exactly-once effect.
- Part III — Observability. Structured logging with Serilog, a correlation id threaded through an entire request, a refusal that is counted and explained rather than merely returned, and the liveness/readiness split that lets an orchestrator drain traffic without restarting a healthy process.
- Part IV — Configuration & the Container. Layered configuration and secret rotation, a multi-stage Dockerfile that ships one image to every environment, a CI gate that will not package a red build, and a deployed container proven against a killed database.
- Six back-matter chapters — an Epilogue that closes the trilogy's own debt ledger, an installation and run guide, the full solution skeleton, the tools-and-packages manifest, the outbox-to-reaction map, and the complete configuration and secrets matrix, plus source references, a glossary, and a page-verified index.
Who This Book Is For
Developers who have built (or read) a clean, layered backend and want to see it proven against real infrastructure and actually shipped — not just described as production-ready. Engineers who want a worked, honest example of a CI gate, a retry-and-quarantine dispatcher, and a health-probe contract, built end to end rather than assembled from framework defaults. And anyone who has finished an architecture book with a working core and wondered what it actually takes to trust that core outside a debugger.
Volumes I and II are companions, not prerequisites for the code in this book — every class this volume builds on is named and explained where it first matters. But the trilogy's ledger, and the weight of what gets closed here, land hardest if you've read the debt this volume was written to repay.
About the NEXUS-1 Companion Series
From Contract to Container is the closing volume of the NEXUS-1 backend trilogy, part of the wider NEXUS-1 Companion Series — a set of books that teach software architecture, data design, and applied AI through one consistent fictional demonstrator: a Phase-0 digital twin of a nuclear power plant. Every volume shares the same standing boundary — NEXUS-1 is a teaching platform, never operational guidance, and nothing in the series claims authority over a real facility. This volume completes the backend, begun in From Blueprint to Core (Domain and Application) and continued in From Core to Contract (Infrastructure and the API); the trilogy closes with a Phase-0 demonstrator, proven and shipped, and an honest account of everything it still does not do.
Author: Grigorios Kyriakos Agathangelidis
Greek name: Γρηγόριος Κυριάκος Αγαθαγγελίδης
Also searchable as: Αγαθαγγελίδης Γρηγόριος, Αγαθαγγελιδης Γρηγοριος, Grigorios Agathangelidis.
Bundle
Bundles that include this book
- Pricing
$399
Minimum priceBought separately$1799.84Suggested price$599
Author
About the Author
Grigorios Agathangelidis is not a nuclear physicist, a nuclear engineer, or a power-plant specialist of any kind. His background is in Electrical Engineering and Software Engineering, and NEXUS-1 began as a personal project built on that background: an attempt to immerse himself in the nuclear-energy domain, study it as thoroughly as a software engineer reasonably can, and then combine what he learned with years of enterprise-software experience. The goal was never to speak as a nuclear-industry authority — it was to explore a genuinely fascinating domain and apply his own skills in software architecture, testing, observability, and systems design against a subject substantial enough to make those skills count.
That same discipline is why the series doesn't stop at shipping. A dedicated retrospective volume, From Certainty to Calibration, goes back through the published books and audits their own earlier decisions against evidence that didn't exist when those decisions were made — not as an apology, but as the same audit discipline the series applies to reactor telemetry and alarm floods, turned on itself. From Contract to Container closes the backend trilogy by applying that same lesson at the smallest possible scale: its own Epilogue re-reads a promise the trilogy made about itself in Chapter 1, finds one line it could no longer keep exactly as written, and corrects it in place rather than letting it quietly age out. The back matter goes further still, cross-checking one chapter's build pipeline against another's Dockerfile and naming the gap it finds between them. A book that asks its code to be watched failing on purpose should be willing to watch itself the same way.
Grigorios writes the NEXUS-1 Companion Series from Edessa, Greece, building each volume as a fully worked, independently verifiable software project rather than a collection of snippets — code that compiles, tests that run, and a container that ships, with an honest account, at the close of each volume, of exactly what still does not.
Author: Grigorios Kyriakos Agathangelidis
Greek name: Γρηγόριος Κυριάκος Αγαθαγγελίδης
Also searchable as: Αγαθαγγελίδης Γρηγόριος, Αγαθαγγελιδης Γρηγοριος, Grigorios Agathangelidis.
Contents
Table of Contents
Get the free sample chapters
Click the buttons to get the free sample in PDF or EPUB, or read the sample online here
The Leanpub 60 Day 100% Happiness Guarantee
Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
See full terms...
Earn $8 on a $10 Purchase, and $16 on a $20 Purchase
We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.
(Yes, some authors have already earned much more than that on Leanpub.)
In fact, authors have earned over $15 million writing, publishing and selling on Leanpub.
Learn more about writing on Leanpub
Free Updates. DRM Free.
If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).
Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.
Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.
Learn more about Leanpub's ebook formats and where to read them
Write and Publish on Leanpub
You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!
Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.
Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.
