A couple of weeks ago I signed a contract to write a book for Manning Publications. I’m excited and anxious, to say the least.

The book is about orchestration systems, like Google’s Borg or Kubernetes or Nomad. Except, instead of a dry book about the theory of orchestration and scheduling and how such things are implemented in existing orchestrators, it’s a practical book that walks the reader through the implementation of an orchestrator, from scratch.

I wish I could say the idea for this book was all mine, that I came upon the idea in a moment of brilliance. Of course, that’s not how it happened. Not even close.

The idea actually came to me a little more than a year ago. I had just discovered Thorsten Ball’s book Writing an Interpreter in Go. As soon as it arrived in the mail, I devoured it. I was just starting to dive back into Go, so I thought it’d be a fun way to re-learn Go.

The book surprised me on two fronts. First, I quickly ramped up my understanding of Go. After not touching it for more than three years–and I hadn’t used Go for anything serious–I was amazed that I understood the code. Structs, method receivers, pointers, slices–these made sense to me. Even when the code broke–which was always my own fault– I could quickly identify the problem and fix it. Had I suddenly woke up one day with supernatural powers? Had the coding gods visited me at night and touched my head, bestowing upon me missing knowledge?

Second, the code actually worked. I had a working interpreter at the end of the book. (Actually, the interpreter worked after a couple of chapters.) Granted, the interpreter and the language it interpreted weren’t going to replace my use of Python or any other language, for that matter. But, that wasn’t the point. The point was that I learned about abstract syntax trees and parsing and lexing, at a very practical level.

Fast forward to last summer. After several months of being homebound due to the Covid-19 pandemic, I started looking around for a project. I wasn’t commuting to the office, so I had extra time on my hands.

One day I realized that it might be interesting to implement a clone of HashiCorp’s Nomad. At my day job, we were managing Nomad clusters, and I liked its simple design. In many ways, it reminded me of Borg. And, in between working with Borg and Nomad, I had spent a couple of years working with Kubernetes. Having the experience of being a user of these systems, wouldn’t it be an interesting exercise to implement such a system from scratch to gain a better understanding of how, in general, they work?

Over the course of the next three to four months, I implemented my clone, using Go, of course. Like Thorsten Ball’s interpreter, my clone isn’t going to replace any of these production-grade orchestrators. But, it was a good learning experience.

Shortly after getting the code into a working state, it dawned on me that using the experience as the basis for a book might be interesting. My first thought was to publish it myself, similar to how Ball self-published Writing an Interpreter in Go. But, I didn’t trust myself to follow through with the idea if I were to take that route. Moreover, I wasn’t interested in the least in dealing with the publishing process. Call me lazy!

I looked around at a couple publishers before decided to send my idea to Manning. In addition to Manning, I considered Newline, the publisher of the Fullstack series. I had bought a couple of their titles in the past and liked the content and the quality of the final publication. In scanning their site, however, it seemed like they were leaning more heavily towards digital publishing. None of their titles seemed to be available as a physical book. I know it seems old-fashioned, but the option to buy a physical copy of my book was important to me. Part of the reason for wanting a physical copy is vanity: I would be able to display a copy on my bookshelf as I participate in online meetings. But, I also prefer reading physical books. I’ve tried for the last decade to transition to reading digital books, and every attempt has failed.

I briefly considered reaching out to No Starch Press. They’ve published titles such as Automate the Boring Stuff with Python and Think Like a Programmer. I also considered O’Reilly–for a nanosecond. I realized I’d just be another writer in their stable. Given I’m not Kelsey Hightower or Ray Kurzweil or some other famous computer scientist, I figured I wouldn’t get much support.

I chose Manning because I’ve bought several of their books and have liked them. They also have something called MEAP, or Manning Early Access Program. MEAP makes chapters of a book available online as the author writes it. I’ve bought several MEAPs, because it gave me early access to the content and then the finished, printed book. Honestly, I made the decision to go with Manning because it felt like the best choice.

So, now comes the hard part, actually writing the book.