Every text is written to an audience. I have a hard time to see whom Build an Orchestrator in Go (From Scratch) from Manning is for.
To start out with the good parts. The prose is well written. Sentences are well-crafted and readable. Code formatting is very good and the book is legible as an e-book - something that should be minimum standard but unfortunately isn’t. Also the project itself is interesting and fun.
For the pacing, this is a book for beginners. Both in terms of learning about orchestrators but also in terms general technical foundations. This is not a bad thing. There is an audience out there for whom this pacing is ideal. For someone with experience it is not.
Every line of the code is explained in prose, often multiple times. The code is not particularly complex. It is mainly boilerplate code, something you have to write before getting to the interesting parts. Unfortunately the vast majority of the book is about detailing the boilerplate.
In fact, I believe with some experience can just clone the repo, read
through the code in ch8
- why not later ones we’ll come to - and be
done with it in an hour. You won’t miss anything. Half the book is
pretty much building up this code.
The only addition the book provides, that maybe makes it a little easier to navigate and understand the code, is the high-level explanation of the individual modules. If you’re somewhat used to reading through foreign code, a code base this size is a walk in the park either way. You’ve probably read through more complex code than this, with zero documentation or explanation.
I will say that one chapter - chapter 10 - about alternative scheduler implementations is interesting and also has some depth. Some might find chapter 9 about failure scenarios worthwhile too. I think reading through an entire book for one or two marginally interesting topics is not a very good signal to noise ratio however. Again, this is from the perspective of people with some extended technical background already.
Now for the last part and why I said in the beginning I have a hard time to see whom this book is for. It’s a waste of time for experienced people, that’s fine. But it could very well be an excellent resource for beginners. The problem with this is: errors. The book and the accompanying code is chock-full of errors.
The most excusable errors, given that books are just quite static, is that the lastest docker library changed API. So most of the code using the docker library doesn’t work anymore. The needed changes are quite minor however. Also one can just go to the accompanying code repository and use the exact same version like in the book.
There are also some minor imperfections. Go evolved meanwhile and there are some idioms that are recommended now. Interestingly, the Go LSP server warns about these. It’s not a big deal however. Either you apply the LSP suggestions or just live with the warnings. The code works and is not bad per-se.
More problematic is that there was clearly a previous version of the
code. Some code snippets in the book are still written for this
previous version. So there are pieces of code using fields, structures
and methods that are just nowhere to be found. To this day I am
missing HostPorts
. So even if one painstakingly follows the book, it
won’t work.
So ok, you may think, at least I can use the code in the accompanying
repository and ignore the errors in the book code. This works to some
degree although it is annoying. Up to chapter 8 at least the
repository code is consistent and works. From chapter 9 on it also
doesn’t compile anymore. The DockerInspectResponse
is just not
defined. It is defined in the book though. So now the journey begins
of piecing together some parts from the book and some parts from the
code repository so that everything maybe works.
This leaves this book in a very strange place. It is an interesting
and fun side project. However, for experienced developers I recommend
taking a look at ch8
in the
repository as a
starting point and then go your own way. The book is too slow and
shallow to be worth it. For beginners I recommend to look for another
book until the errors are fixed. The errors are gonna throw you off
and leave you puzzled and frustrated for no good reason. You’ll learn
more by just implementing stuff and making your own errors, and
errors you will make plenty enough.