Content from 2016-11

ZooKeeper, Distributed Process Coordination

posted on

ZooKeeper is a component that facilitates building distributed applications. It is:

The data managed by ZooKeeper is presented in a file system like manner with directories and files whose names get separated by slashes (/). The difference to a file system is, that you can store information in the directories as well. Or seen differently: directories are files at the same time. Based on this simple abstraction, users of ZooKeeper can implement things like leader election in a cluster of software instances.

The book by Flavio Junqueira and Benjamin Reed

The book is written by two experts of ZooKeeper, that know how it works internally and what are the pitfalls in which the users can trap. Flavio Junqueria is one of the ZooKeeper's contributors. Benjamin Reed helped to start ZooKeeper.

I was reading the book, because I is the basis for other distributed software systems I made myself familiar with the last months, including Akka and Mesos. I always think, that it's a good idea to know at least one layer below the layer I am actually using. I allows me to understand better what I'm doing and how to do it right.

The book starts by giving an overview of the concepts and basics used by ZooKeeper. It introduces an example master-worker application, that is implemented using different languages afterwards:

Other topics discussed in the book are:

I think, that this book is a highly valuable resource for anybody working with ZooKeeper either directly or indirectly by using some other software, that uses it.

Links to the book

Microservice Architecture, anligning principles, practices, and culture

posted on

To stay on the right track with microservices, I wanted to revisit the philosophy and organizational recomendations on how to do them right. After reading Building Microservices in april this year, I got Microservice Architecture, aligning principles, practices, and culture by Irakli Nadareishvili et al.; O'Reilly Media, Inc., 2016.

The book can be read on one week-end as the content is very well condensed to 118 pages.

What did I get from the book?

The book provides a lot of information on the culture and organizational requirements to successfully implement a microservice architecture.

[C]ulture is perhaps the most intangible [domain] yet may also be the most important. We can broadly define culture as a set of values, briefs, or ideals that are shared by all of the workers.

Microservice Architecture, page 29

It was very interesting to me to compare the presented observations with how we are doing microservices at work. One thing was especially interesting for me, as I did not read of this before, was the mention of the paper The Social Brain Hypothesis, 1998 in which Robin Dunbar writes about observations that there are several sizes of groups, that work better then others.

[T]he various human groups that can be identified in any society seem to cluster rather tightly around a series of values (5, 12, 35, 150, 500, and 2,000).

The Social Brain Hypothesis, Robin I. M. Dunbar, 1998

I can definetly recommend this book to everyone that already does microservices, or that plans to implement them. It does not present nor recommend any specific software product, but talks about the social and organizational requirements to succeed with this type of architecture. And it notes that they are not always the right way to go. In the book there is also a detailed list of further sources to deepen on various aspects of the topic.

Links to the book

Developing Web Components, UI from JQuery to Polymer

posted on

It's hard to find sources how to do front-end micro-services in a single page application (SPA). Having a single front-end that faces the user makes it hard to impossible to exploid the full power of going micro-services in the back-end. For every new function you cannot just deploy the corresponding service, but you have the dependency to update and redeploy the service as well.

So I was looking around how to go micro in an SPA. One of the ideas I found on the web was to do so using web components. To evaluate this idea as someone working mainly on the backend I thought I should get some literature and bought the book Developing Web Components by Jarrod Overson and Jason Strimpel, O'Reilly Media, Inc., 2015.

What did I get from the book?

The end-to-end theme of the book is to develop a dialog box web component. As a familar entry to the component it starts doing so in JQuery. Afterwards the component gets ported to using plain HTML5 APIs (templates, shadow DOM, custom elements, and imports). In the last part of the book, it gets converted to using Polymer. This makes the implementation much cleaner and easier to do.

As I don't do much front-end development it was very interesting to see what is possible in modern browsers by now. I like how web components bring back some of the strengts of HTML: marking the structure and semantics of a text instead of building interfaces by just styling a bunch of <div/>s. I like to see hightly semantic pages on the web. But I see so many web developers only taking care of the visual impression in a browser. Therefore it's always a requirement, that the way to get there also results in the work being done easier. The ease of using components built with polymer may achieve this goal.

But pertaining to my initial motivation to read the book, I have to say, that I didn't find a good match for doing micro-services in using web components.

Recommended links

Unless otherwise credited all material Creative Commons License by Matthias Wimmer