Book: Serverless Patterns Of Modern Application Design

Patterns Of Modern Application Design Using Microservices

Posted by Ryan S. Brown on Wed, Mar 16, 2016
In Book Review
Tags: javascript, nodejs, book, lambda, sns, api gateway

Another week, another installment in my series of book reviews. This week’s target is Serverless: Patterns of Modern Application Design by Obie Fernandez. It’s not officially done - according to Leanpub it’s around the 55% mark, with the last update in February.

It builds on tons of traditional microservice literature, like Eric Evans’ Domain Driven Design (2003) and Martin Fowler’s Patterns of Enterprise Application Architecture (2002). I’ve never read Patterns of Enterprise Applications, but it’s on my list now.

The Good

The book nicely segmented into four parts.

  1. Story - covers overview content, introduces the Serverless framework and Obie’s own Simple AWS (SAWS) framework, and gives context to why you’d want to make the jump from traditional infrastructure.
  2. Case Study - now that you have an overview of how serverless applications are built, it’s time to write code for your startup “FoodButton.”
  3. Patterns - all the patterns from Patterns of Enterprise Application Architecture with handy diagrams and explanations of how you’d implement them in a Lambda/AWS context.
  4. Services - this section covers supporting services like IAM and is arranged as a reference/appendix.

The first two sections are good, and it’s clear the book is aimed at seasoned developers not new programmers. There are plenty of comparisons drawn between monolithic Rails and microservices architectures, and it’s clear the author has deep experience with microservices and has done plenty of reading on the topic.

If, to you, microservices means “lots of things talking over HTTP/RPC” and seems like just another incarnation of SOA, pay special attention to the introduction. It’s also worth putting the book down and reading/watching some of the referenced articles and videos to get a strong feel for message- and event-driven microservices.

The case study is a startup called “FoodButton” that provides a single button, “FOOD” and handles placing an order and having food delivered to you. It’s not a complicated app, but it’s enough to demonstrate an array of problems like idempotence, data storage, and fallback in case of failure.

The writing throughout is clear, and Obie brings a lot of personal experience from ThoughtWorks to this book which is fun to hear about.

The Less Good

Exactly as the homepage says, the book is only 55% done so many of the sections on design patterns are just stubs. If the completed parts are any indication, this book will have a life beyond Lambda’s hype cycle. The patterns covered aren’t just for Lambda, but will apply to other services like OpenWhisk when they mature enough for production use.

My only technical gripe with the book so far is that the example application has all the Lambdas using the same SNS topic as an event source. It’s done in the book for simplicity (which is great) but in a real deployment it would boost costs with lots of unneeded invocations. Every message would trigger all the functions, and then most of them would simply read the message and exit because it’s not a message that affects them.

My recommendation for right now is “hold off, wait for more book to arrive” before picking this one up, but when done it’ll be a must-read.

Overall Review

Serverless Patterns takes home λλ/5 in its current state. That’s 55% of the score I expect when revisiting the completed version. If you do decide to pick up the current revision, have a laugh about the section labeled “Parse” which is just a blank page.

If you’re into book learning, also check out my reviews of A Guide to Serverless Microservices by Matt Fuller and Serverless Single Page Apps by Ben Rady.

Disclosure: I received no compensation for this review, and none of the links in this post are affiliate links.

Tweet this, send to Hackernews, or post on Reddit