Cloud Foundry sponsored this post.
I’m often asked about the difference between using a platform as a service (PaaS) vs. a containers-as-a-service (CaaS) approach to developing cloud applications. When does it makes sense to choose one or the other? One way to describe the difference and how it affects your development time and resources is to look at it like the process of baking a pie.
You’ve got to have a great crust to have a great pie — but what actually differentiates a pie is its filling. Still, you might like making pie crust and prefer to do it yourself. If you have the time, you’ll bust out your “Joy of Cooking,” mix the dough, roll it out and cut it to size. And this is just the pie crust portion of the adventure — you haven’t even gotten to the filling yet!
Now imagine you’ve committed to bringing ten pies to a gathering. Suddenly, the slower artisanal approach looks way less attractive. Even though you regularly make homemade dough and you take pride in doing it well, others are skilled in making dough from scratch too. And of course, there are those who do such a great job preparing pie crust that they sell them by the dozen in the frozen food section of your local supermarket.
Baking a Pie with CaaS vs. PaaS
With a CaaS platform approach to making pie, you’d not only whip up your own filling, but you’d make the crust that contains it from scratch. You’d have to go through the process of mixing the dough, rolling out the crust and cutting it to fit the pan before you could add your homemade filling.
With a multi-cloud application platform approach like Cloud Foundry’s, you can skip the homemade dough and focus your energy on the filling — the content that really differentiates your pie from another.
A frozen pie crust can actually be pretty good, and a good dough manufacturer takes pride in delivering consistent, quality crust. Skipping that time-consuming step can help you bake your pie much faster.
Of Pies and Platforms
Let’s get a little more specific about the difference between writing apps using a CaaS platform vs. a platform like Cloud Foundry.
Say you’re writing a web-based app in your favorite language — Java or Python or Ruby, for example. As a developer using CaaS, you take the extra steps to create a new empty container image, with a base file system, and you move code into the container locally. You might run the compile step, and then download a lot of dependencies in the compile process, then create a Docker container image. Once you have the container image, you can push it to the CaaS platform.
What a platform like Cloud Foundry does for you is to take care of the crust. It doesn’t require that you package your software. It does it for you.
Cloud Foundry uses Linux container technology, and with a simple CF Push command, the platform will create the container for you. With Cloud Foundry, you can focus on writing your code while the platform creates the containers.
There’s another part to this story. Besides handling details like creating containers, a good PaaS does a number of things to make it easier to operate your software once it’s out there.
There are ways you can use a container platform and make log aggregation happen. But with a system like Cloud Foundry, it’s incredibly simple — just print to the console, and the platform captures your text and automatically pulls it into a shared logging system, where you can see what logs look like in all the instances of your app, or even across multiple apps.
The PaaS framework is about enabling developers to focus on writing code, or the business logic, while it takes care of details like plumbing. You don’t have to worry about creating your container or how to do log aggregation. Cloud Foundry simplifies much of the setup and management of your software once it’s in the environment.
Some enterprise developers want to figure out how to do the plumbing part of their applications. I understand the value of and interest in doing that. Yet some developers would rather focus on solving business problems, or writing a new app for a startup. A lot of the underlying plumbing is less important than the part of the app that is actually going to touch the customer.
Choosing CaaS over PaaS platform, you’re trading velocity for control. With either approach, you can produce a great app. The CaaS approach is just going to take a bit more work — just like mixing ten pie crusts from scratch will be a lot more work than buying ten delicious ready-made crusts so you can focus on the filling.
Editor’s note: Listen to our interview with Chip Childers for more of his insight on PaaS vs. CaaS:
The New Stack is a wholly owned subsidiary of Insight Partners, an investor in the following companies mentioned in this article: Docker.