Saturday, February 6, 2016

Is Container a new -aaS? Container Technology in a nutshell

Introduction
---
Three cloud computing models have been emerged so far: SaaS, PaaS and IaaS. For the sake of brevity, lets focus on the latter two. When cloud computing first emerged, Infrastructure as a Service (IaaS) was the main driver of cloud computing business. Amazon Web Services (AWS) started its business by selling virtual machinesThe problem with IaaS is developers have to manage all the details including which operating system to install, keeping installed softwares up to date in addition to developing and deploying applications. Too much burden... As a res
ult Platform as a Service (PaaS) emerged. In PaaS, developers only need to care about developing their applications without worrying about infrastructure level issues such as the latest security patches for the operating system or figuring out the right firewall rules. The PaaS model has made all of these easier for developers. Cloud Foundry (CF) has emerged as one of the widest deployment of PaaS so far. IBM, HP, Pivotal and others has already embraced and been using cf in their offerings.

So far so good except that we have started to see a kind of new model in application development, i.e. containers. So the question arises, wasn't it everything great, what the hack containers are? Although there is no simple answer for the question, looks like, not everything was perfect, at least from the developersperspective. So what's a container? Container technology basically an extension of linux containers which was first released in 2008 (https://en.wikipedia.org/wiki/LXC)Containers provide isolation in the operating system level. Probably at this moment, you are wondering what containers offer that PaaS or IaaS don't. There are several aspects which I will try to examine below:

Portability
---
I think Portability is the most compelling reason for the emergence of containers. Virtual machines typically is not considered to be portable considering the size and all the other burdens. Moreover, consider a typical application development in PaaS. Take cloud foundry as an example... You choose a runtime (Node.js) and couple of services (which runs independently outside or inside of the platform) and run your application. Now in future if you change your mind and try to move to IaaS, you will need to do a lot of tasks including installing your own Node.js runtime and database services etc. Moving into another PaaS solution is another headache with all the different capabilities and settings unless they are all compatible which sounds like a myth for me. On the other hand, containers promise portability, you package your application by telling which software to install and how to initiate/start them. Rest is taken care of the container engine (for docker it's docker engine) by running them as linux containers inside a linux machine. If you later decide to move from your original machine and go somewhere else, you will still be able to do it easily without worrying about the size and compatibility.

Microservice Model
---
In software development, especially in recent years, there is an obvious tendency to develop application as microservices instead of monolithic model. Especially with multiple teams working on different parts of the application, microservices offer the right model to go for as development and deployment of each microservices will be independent from each other. As a result, there will be less risk of failures during the development and deployment. In microservice model, everyone is responsible for their own service. If you are an owner of the database service then you need to provide that database service as robust and solid as possible. As a result of reducing the dependency of teams, deployment will be fastereasier, less prone to errors.

Now lets think about the containers for a secondIn a nutshell, if you develop your service as a container, your service will get the benefit of containers by providing an isolation of a service from the other services. Each service of the application will be deployed as an independent container and as a result each will be able to work independently and deploy independently. If you try to do the same in cloud foundry then you need to create a separate application for microservice that you want to develop (aside from the available services in the catalog that can be directly bound to the application). It does not sound like a good model both in terms portability and maintainability.

Flexibility
---
This might be a little biased and subjective perspective but if you ask me, developers love hacking things and then fixing them upLike it or not, this is a given characteristic of today's developers. As a result quarantined infrastructure environments don't work for them. They want more power and flexibility in terms of controlling the environment and I believe that the PaaS models lack of this flexibility. Containers provide a tier above VMs and therefore give developers a feel of control without dealing with all the burdens of managing a VM.

No comments:

Post a Comment