From VMs to Containers (and a background of Software)

by | Sep 6, 2020

Containers

In the previous article in this series, I explained concepts such as virtualization, cloud computing, hypervisors, and virtual machines (VMs). Those who missed that article can read it here – and they should, as that article serves as the foundation for this one. In that article, I also explained why VMs are not so efficient for running cloud-native applications. In fact, virtualization and VMs are decades-old technologies and nobody even imagined what the cloud would be like then. Today we have more efficient technology for running cloud-native applications – Containerization. 

Let’s address the “why” part of the question first. Why Containerize? 

Less is more 

In the early days of computing, resources like memory were limited and expensive. Early programmers who coded in assembly language were trained to be frugal with the usage of real estate in computer memory. The best programs were those that had fewer lines of code. I was introduced to computers in 1989. The personal computers then (PC-XTs and PC-ATs) had just 1 MB of RAM. And out of that, only 640 KB was available for user applications. The rest was reserved for system programs (operating system). The legend goes that Bill Gates once famously said, “640K ought to be enough for anybody.” That was at a trade show in 1981. And he was proved so wrong when the GUI (and Windows) came along a few years later. So, back then, applications had to have a small memory footprint – a few KBs (kilobytes) in size. I remember how clever applications like Stacker tried to get around this limitation through file compression and some memory swapping tricks like juggling apps between RAM and hard disk. A small area of the hard disk was reserved to act as an extension of RAM / main memory.  

Cut to today.  

In my last article, you read that VMs are resource hoggers. Every VM that runs in memory must have its own guest OS (Operating System). In addition, there is a hypervisor software required to manage all the VMs. And if you are using a type-2 hypervisor then you also need a host operating system. I explained what are hypervisors in my last article. All this consumes a lot of memory. Therefore, VMs are not the ideal choice for running “cloud-native” applications. We need something “lighter”.  

By “cloud-native” I mean applications that are written to take full advantage of cloud computing features such as scalability and elasticity.  

In my next article, I will compare VMs and Containers, and then you will understand why Containers are more suitable for cloud-native applications. You will clearly see the drawbacks of VMs – that nobody wants to talk about today! 

How software works

A little background about how developers write “code” (that’s short for software programs) might help here. In the early days of programming, an application was developed using one long program with millions of lines of code. There are multiple files required for running the application. This is called the “monolithic” way of writing application code. Obviously, this was not an efficient way to utilize memory resources. It also took a lot of time to develop the program and to fix “bugs” or errors. 

It was also found that certain parts of the application were common among programs. So why write those lines of code every time they are needed? For instance, a routine for printing is common. That’s how the concept of “libraries” emerged. Libraries are reusable pieces of code. A program will just “call” a particular library when it needs that function. So it is like using building blocks to develop a program. A modular way of developing software programs. The software programmer does not need to write the code for that functionality as it already exists. It’s like borrowing a book from the library and then returning it when you finish reading it.

Another concept to be explained here is “dependencies”. When you install programs, they require other programs to work. These other programs are called dependencies.

So an application needs libraries and dependencies for its functioning/execution.

Short pieces of code are called “Scripts” and are written using scripting languages like Java, JavaScript, Python, Ruby, etc. If you want to add a small application for your website for a form, to collect details for user registration, you can write a script for it. A shopping cart on an e-commerce site is also written using JavaScript.

With this background about Software, we can now move on and learn about Containers. 

The third part of this series will explain containers and containerization.

Read the first part of this series on Virtualization and Virtual Machines here.

 

Share This Article!

Brian Pereira
Brian Pereira
Brian Pereira is an Indian journalist and editor based in Mumbai. He founded Digital Creed in 2015. A technology buff, former computer instructor, and software developer, Brian has 29 years of journalism experience (since 1994). Brian is the former Editor of CHIP India, InformationWeek India and CISO Mag. He has served India's leading newspaper groups: The Times of India and The Indian Express. Presently, he serves the Information Security Media Group, as Sr. Director, Editorial. You'll find his most current work on CIO Inc. During his career he wrote (and continues to write) 5000+ technology articles. He conducted more than 450 industry interviews. Brian writes on aviation, drones, cybersecurity, tech startups, cloud, data center, AI/ML/Gen AI, IoT, Blockchain etc. He achieved certifications from the EC-Council (Certified Secure Computer User) and from IBM (Basics of Cloud Computing). Apart from those, he has successfully completed many courses on Content Marketing and Business Writing. He recently achieved a Certificate in Cybersecurity (CC) from the international certification body ISC2. Follow Brian on Twitter (@creed_digital) and LinkedIn. Email Brian at: [email protected]
Recommended Posts
The Rise of AI Agents in Business

AI agents are revolutionizing how businesses operate, innovate, and engage with customers while reshaping workforce dynamics and decision-making processes.

The First 90 Days Are Crucial for the CISO and CIO

This book arms you with insights into crafting a robust 90-day plan, and you’ll be well-equipped to catapult into CIO or CISO roles successfully. Beyond technical proficiency, the book instills survival skills, ensuring longevity and helping you prevent burnout in these pivotal positions.

Similar Articles