Monday 23 November 2015

Book Review: Building Microservices

Continuing my up-skilling on cloud security, I wanted to get a better handle on application architectures that map into cloud computing patterns and while micro services aren’t a cloud specific architecture, the key goals of loose coupling, high scalability, etc align well to a cloud environment so I figured this would be a good book to have a a read through.

The first two chapters are very easy reads, covering an introduction to micro services and their benefits, mapping strategic goals to principles and practices.

The next chapter introduces the fictional MusicCorp organisation and application that is used throughout the remainder of the book, demonstrating the concept of bounded contexts and how to apply it to a monolithic application. At this point the book really gets into more detailed discussions on the topics, with each of the further few chapters being pretty meaty in comparison to the earlier chapters. The rest of the chapter covers some of the key technologies that can be used to facilitate micro services (RPC, SOAP, REST, XML, JSON, message queues, etc) touching on both the positives and negatives of each and also covers area like versioning, choreography/orchestration and integration with COTS.

The author then expands on the MusicCorp example and uses it to demonstrate how to split out the application into multiple micro services, before moving on to CI topics like deployment and testing and a further short chapter on monitoring. For me the chapter on breaking a monolithic application into micro services wasn’t as relevant for what I was looking for, but it some of the high level approaches were interesting to understand how it may be tackled.

Security is touched on next but as the author mentions early on in the book, he’s not a security specialist so this is a fairly light chapter covering authn/authz and SSO, touching on OpenID Connect and SAML One nice thing to see in this chapter was a call to be frugal with data storage in light of potential data loss events, particularly where personally identifiable information may be in play. Nice touch!

The last main two  chapters cover system/organisational design and micro services at scale, both of which I thought were great introduction on the topics.  Too many organisations think concepts such as devops or micro services can simply be tacked on to their exist structure, but this chapter does a nice job of dispelling this myth. Chirstian Posta wrote a really good blog post on this specifically related to micro services and I'd also recommend Mike Cohn's chapter on team structure from his Succeeding with Agile book.

One aspect of the book that I really liked was the liberal use of links to other material and books when further more detailed explanations are merited. This avoids the author going off on tangents, which I often find many authors doing (sometimes as a necessity to explain a concept… and sometimes just to pad the book).

I’m not a developer or application architect so at times the book goes slightly into too much detail for what I needed, but to be fair this only rarely happens and so doesn’t detract from the overall flow. Of course that probably means for someone who is a developer or application architect that it won’t go into enough detail, which sometime that is held out by other reviewers.

From a security perspective, I’d highly recommend this book as a great way to get up to speed on how applications should/will be deployed in the cloud and microservices in general. Additionally, if you're still working in a very specialised/siloed organisation, this should be up there to read to understand how things may change. Ultimately, if your organisation isn’t doing something in this space now, then they will soon and you may as well be up to speed!

Links:
Amazon: http://www.amazon.com/Building-Microservices-Sam-Newman/dp/1491950358
Safari: https://www.safaribooksonline.com/library/view/building-microservices/9781491950340/

Wednesday 4 November 2015

Book Review: Python And AWS Cookbook

I’ve been playing around with AWS properly for the last couple of months and had mainly been getting myself up to speed with the key security considerations, the console, the various services AWS provides, while playing around with setting up an ELK stack in AWS.

I’ve also been interested in playing around more with Python so figured this would be a good opportunity to combine both and get a better understanding of AWS and Python at the same time.

This book introduces you to the Boto Python interface to AWS and walks you through a series of very simple examples of how to use it.

The book is primarily split into two section; one covering EC2 and the other S3. Both sections cover all the basics that you could look for, including how to enumerate the EC2 instances/S3 buckets in your account, how to loop through regions (if needed), how to create new instances or buckets and how to edit tag, metadata and such. The book also covers some basics of ELBs, security groups and S3 permissions so basically, most of what you’d need to do some basic scripting of EC2 and S3.

The book briefly touches on CloudWatch and SNS but nothing too in-depth, nor does it cover any of the other AWS services Boto current supports (See here for the current list).

A lot of people have criticized this book as only touching the surface of AWS, and that's definitely true.. you can know nothing about Boto at the start and get through this book in around eight hours (probably much less if you know Python beforehand.. which I didn’t). However, at the end you’ll know enough to get and running and can then loop back to either the Boto or AWS documentation to fill in any more gaps.

If you’ve just used the AWS console and haven’t tried you hand at the API, then this is a perfect intro to the nuances that exist with the APIs and ultimately you’ll learn way more about AWS because you’ll start seeing options or constraints in the API calls that you may not even realize exist (or at least I know I did!).

While there’s nothing much here that you can’t get directly from the Boto documentation, I always like following a book along as opposed to jumping around read-me docs so if you’re similar, and looking for a book to kickstart your understanding of Boto and to help you put together some basic scripts for AWS, I really recommend this.

I'd love to see an updated edition of this book, as it was released in 2011 and things around moving so quickly on AWS, it would benefit from a refresh and also some more examples added.

Links:
Amazon http://www.amazon.com/Python-AWS-Cookbook-Mitch-Garnaat/dp/144930544X/
Safari https://www.safaribooksonline.com/library/view/python-and-aws/9781449308100/