Microservices via Containers

According to Wikipedia [1], “The term “Micro-Web-Services” was first introduced during a presentation at CloudComputing Expo in 2005 by Dr. Peter Rodgers.” The article goes on to say that “Juval Lowry also had similar precursor type of thinking about classes being granular services, as the next evolution of Microsoft architecture. Services are composed using Unix-like pipelines (the Web meets Unix = true loose-coupling).”

The microservices architectural style is also described as a pattern. [2]

Martin Fowler [3], adds that “While there is no precise definition of this architectural style, there are certain common characteristics around organization around business capability, automated deployment, intelligence in the endpoints, and decentralized control of languages and data.”

His observation is readily apparent in the various forums discussing the topic. What constitutes the architectural style known by convention as microservices? The most basic of survey into the topic will show the challenges people have in answering that question.

Tom Huston from Smartbear.com [4] writes “To begin to understand microservices architecture, it helps to consider its opposite: the monolithic architectural style.”


Diagram: pwc.com

Vijay Alagarasan via InfoQ.com [5] writes “The goal of microservices is to solve the three most common problems i.e. improve customer experience, highly agile to the new requirements and drive down cost by delivering the business functions as fine grained services. This is not a silver bullet and requires a disciplined platform, where delivering the services in an agile fashion with high quality is possible.”

Chris Richardson at NGiNX [6] writes “Like every other technology, the Microservice architecture has drawbacks. One drawback is the name itself. The term microservice places excessive emphasis on service size.”

Vivek Juneja via The NewStack.com [7] offers “Microservices: Four Essential Checklists when Getting Started”


Diagram: martinfowler.com

The papers referenced above are just a small sample of available material. But most compare microservices to SOA in one sense or another. It seems to me, however, that these styles are compatible – SOA can be accomplished via microservices.

Of course, these are broad reaching lines of thinking that has led to multiple potential definitions of the architectural style – one of which is that of the application or component container.

Application Containers

An application container virtualizes an execution context within a host. It shares the resources of the host with other containers on that host. It can expose or consume resources such as:

  • Storage
  • Network(s)
  • Service Ports


Diagram: Docker via rightscale.com

The benefit of application containers are minimalist, fine-grained services that can be developed, versioned, deployed independently of one another. Depending on the orchestration ecosystem employed these services are easily scaled across many hosts. And tend to enable continuous deployment.

When clustered, hosts can be grouped into ecosystems in which containers may be deployed. Systems such as Docker Swarm support features such as private networks, shared data volumes, multi-host networks, service discovery and resilient scheduling.


Diagram: docker.com

Docker relies on a sandboxing method known as containerization. Unlike traditional virtualization, containerization takes place at the kernel level. Most modern operating system kernels now support the primitives necessary for containerization, including Linux with openvzvserver and more recently lxc, Solaris with zones, and FreeBSD with Jails.

From https://github.com/docker/docker

Container Ecosystems

As can be imagined, many ecosystems have appeared in which to run containers. Here are just a few.

Technology Company URL
Docker Amazon http://aws.amazon.com/ecs/
Docker Google https://cloud.google.com/container-engine/
Docker HP http://www.eweek.com/enterprise-apps/hewlett-packard-enterprise-embraces-docker.html
Docker IBM

https://www.docker.com/IBM

http://www.ibm.com/cloud-computing/bluemix/solutions/open-architecture/

Docker Microsoft

https://www.docker.com/microsoft

https://azure.microsoft.com/en-us/services/service-fabric/

Docker VMWare

https://blogs.vmware.com/cto/vmware-docker-better-together/

https://docs.docker.com/machine/drivers/vsphere/

https://docs.docker.com/machine/drivers/vm-fusion/

https://vmware.github.io/photon/

PaaSTA Yelp

http://readwrite.com/2015/11/10/paas-yelp-cloud

https://github.com/Yelp/paasta/

http://paasta.readthedocs.org/en/latest/

Rocket CoreOS

https://coreos.com/blog/rocket/

https://coreos.com/rkt/docs/latest/

Docker CoreOS https://coreos.com/using-coreos/
LXD Canonical https://linuxcontainers.org/lxd/
lmctfy Google http://lmctfy.io/
Garden Cloud Foundary https://www.cloudfoundry.org/garden-and-runc/
systemd-nspawn http://lwn.net/Articles/572957/

The Docker ecosystem is fast becoming a de facto standard.

Diagram: docker.com

Summary

The use of containers allows us to compose solutions from reusable components. Need a web server? No problem! Simply start a container, map the app location, map the internal port 80 to an appropriate external port and use it. No more installing web servers or requiring a centralized farm of web servers to be used.

While containers have been around for a few years now, the technology is very much in its infancy. This is evidenced by the constant maneuvering by various companies involved. See [9] and [10] for examples of this.

The benefits are, however, being felt in the wild and as such container-based computing as an expression of the microservices architectural style is attracting a lot of attention. In this age of cloud computing some mechanism for delivering and discovering services in a cluster of nodes was inevitable.

However, as described in “Microservices – not a Free Lunch” [8] – “a lot of complexity exists at a higher level in terms of managing these services and orchestrating business processes throughout them” – it remains to be seen as to whether the current definition of application containers delivers the promised benefits.

Next

In the next few posts I will describe some Docker basics and how I solve for a specific use case. Stay tuned …

References

[1] https://en.wikipedia.org/wiki/Microservices

[2] http://microservices.io/patterns/microservices.html

[3] http://martinfowler.com/articles/microservices.html

[4] http://smartbear.com/resources/articles/what-is-microservices-architecture/

[5] http://www.infoq.com/articles/seven-uservices-antipatterns

[6] https://www.nginx.com/blog/introduction-to-microservices/

[7] http://thenewstack.io/microservices-four-essential-checklists-getting-started/

[8] http://highscalability.com/blog/2014/4/8/microservices-not-a-free-lunch.html

[9] http://www.infoworld.com/article/2917589/application-virtualization/coreoss-docker-rival-gets-support-from-google-and-other-container-mavens.html

[10] http://blog.odin.com/serviceprovider/2014/12/12/parallels-containers-and-the-dockerrocket-conundrum

Leave a Reply

Your email address will not be published. Required fields are marked *