Container is new Class

Ajay Bhosale
ITNEXT
Published in
2 min readFeb 18, 2019

--

In object oriented programming, class is a fundamental unit to solve a problem. The way you design, assign responsibilities, and create a hierarchy of classes to build an maintainable and extendable application is always a fundamental challenge software developer faced for decades. A tons of material, books has written on this subject. Books like Design Patterns by GoF, PoEAA by Martin Fowler have profound impact on software design and architecture.

Patterns like Proxy, Adapter, Mediator, Decorator, and techniques like Aspect Oriented Programming helped to extend the behavior of class, and to manage cross cutting concerns like configuration, logging without polluting your classes.

Over the period of time, this fundamental unit changed from classes to libraries and frameworks providing autonomous independent reusable stuffs to compose your application.

With the emergence of containers and cloud based environments, container is becoming the fundamental unit to think, solve the problem, and compose your distributed systems targeted for cloud. Patterns like sidecar becoming a way to extend the behavior of a container and handling cross cutting concerns. Your application hosted with container don’t need to take dependency on a logging framework, a container attached as sidecar can handle it. Moving such concerns to a container, makes it easy to develop, deploy, configure and update independent of your application container. Kubernetes and services mesh frameworks like Istio taking the sidecar to next level, and providing a much better ways to deploy and manage applications.

“Not only is the container the unit of deployment and the unit of packaging; it is also the unit of reuse, the unit of scaling, and the unit of resource allocation.” John Arundel and Justin Domingus

There are two excellent (free for now) books to explore further on these topics.

  1. Designing Distributed SystemsBy Brendan Burns. This book is like GoF for containers, check this talk by author.
  2. Cloud Native DevOps with KubernetesBy John Arundel and Justin Domingus. Excellent practical advice on managing containers, tools, practices for DevOps

Thanks for reading, and feel free to like, comment, and share.

--

--