Navigating the Docker Ecosystem

This article is based on part of the talk I gave at Pycon PL October 15th 2015. All graphics in this presentation were originally slides in my slide deck of that talk. Don't let the apparent length of this post scare you off — it's mostly pictures.

Today, I'd like to talk about something close to my heart.

That's right: me.

Unless you're Dutch or just familiar with Dutch names, you may not realize that my name — Zef Hemel — is not a very common one, even in The Netherlands. My last name, which means “sky” or “heaven” (yes, hilarious, I know) is very uncommon, and my first name is as well. My first name, in fact, is the first case in my family where a common first name in our family “Jan-Jozef” is officially shortened its informal shortened version: Zef.

Due to my fairly unique name, I was unchallenged on the Internet for a long time, even at a first-name level. This is how I was able to get domains like zef.me, and my @zef twitter handle.

However, as Bob Dylan famously said: the times, they're a changin'. This is what you see when you Google my name today:

That's right. There's another one. Another “Zef Hemel.” So, who is this other dude? Well, as it turns out, he's my uncle, and he's online now too. And guess whose website is ranked at the top? That's right. My uncle's. Those pictures? My uncle.

What is going on? Why is this other “Zef Hemel” so Google famous now?

As it turns out, he's a professor. A professor of Urban Planning at the University of Amsterdam. And supposedly he's a big deal. And here I sit with my insignificant little PhD.

For those that aren't familiar with the Urban Planning field, here's how Wikipedia defines it:

Urban planning is a technical and political process concerned with the use of land, protection and use of the environment, public welfare, and the design of the urban environment, including air, water, and the infrastructure passing into and out of urban areas such as transportation, communications, and distribution networks.
— Wikipedia

Cool stuff.

So, I've been thinking. What can I do to beat this guy? What can I do to get myself up there again? Up in the Googles?

After some thought and soul searching, I figured it out: I'm going to beat this guy at his own game.

I'm going to reinvent urban planning.

And I shall call it...

That's right, y'all.

Urban planning 2.0.

What is Urban Planning 2.0? I will tell you in a minute — or more realistically in about 10 — but first I want to give you some back story, because I'm sure that by now you're not at all like “where the hell is this going?”

I briefly alluded to my PhD. I got this PhD in Delft, a city in The Netherlands that lies in between The Hague and Rotterdam:

The university where I wrote it (Delft University of Technology) has a campus that looks as shown on the map below. I spent four years of my life in building marked with a red circle.

Here's how that building looks from the side, I had an office on the 8th floor:

“Cool story bro',” you'll say, “how is any of this relevant to UP2.0?”

Good question! From my window I had a view on some other buildings, circled in red here:

And this is where the story starts. This is what those building looked (and still look) like:

That's right. They're a bunch of stacked containers.

Why is that? Why have these containers sit on a university campus? What are they for?

For that we have to enter a second level of background information, this time on the student housing issue that many universities in The Netherlands face yearly, which is in fact pretty simple to summarize: there's not enough of it. Well, eventually there is, but when the academic year starts in September, the dust hasn't settled. Not all students have found places yet, and it takes a month or two, three for this to resolve itself.

So what happened, for instance at a university close to where I grew up is that students stayed in tents on campings for weeks or even months.

But sadly, this is not what those tent camps look like.

They look more like this:

And, let's face it. That's just sad.

So, the government, or universities, or whoever, came up with this clever idea of housing containers.

Cool right?

Here's how such containers are organized, more or less:

As you can tell, you got more or less everything you need in there: a bedroom with a bed, a cupboard, shower, little kitchen and living room. It's not fancy, but it's practical.

Very practical, in fact.

Moving these containers is relatively easy and it's easy to respond to changes in demand. If more students need housing, you simple stack up more of those containers. If there's too many, you can just load them on a truck and get rid of them again. Transportation is relatively simple. In fact, containers are super, super practical:

  • Uniform: easy to stack & place
  • Cheap to build
  • Cheap to distribute

I like it.

Can we push this idea further?

Yes we can. As it turns out, a lot of grunt work has already been done. If you look for it, many structures have already been reinvented in container form. For instance, restaurants:

In fact, even in the town where I live now – Poznań – has an art gallery – kontenerART – built entirely from containers:

But there's more. There are also shopping centers built entirely from containers:

And there you have it.

Urban Planning 2.0

So... what's next? Let's iron out some minor details.

  • Infrastructure
  • Composition
  • Maintenance
  • Scaling
  • Distribution
  • Manufacturing

Infrastructure

What if instead of this:

That is: a bunch of infrastructure, tied up with buildings, and then some small area for containers — we wipe the slate clean. We build areas with just the bare minimum infrastructure:

  • Roads
  • Water
  • Electricity
  • Sanitary

And the rest: containers.

So, instead we would get something like this:

We can go more radical. What if certain companies buy up large quantities of land, put in the infrastructure and start selling it. Or better yet: renting it out, piece by piece?

So, here's how that would work: Let's say you want to start or expand your company's offices. Rather than paying or renting an office building, you design the office you need as a set of containers (we'll get to the design part later on), e.g. with one office per container. Then, you pay one of these providers for hosting, say 20 slots to install those containers. You can easily get rid of your containers if you no longer need them, or rent more space if you temporarily need more of it.

Simple, right?

This brings up the topic of best practices for the design of such containers.

Composition

How do you decide what to put in a container? Do you put everything into one, or split things up? Your initial intuition may be to do something like this:

That is: put everything into one space. Home, work, entertainment, shopping. A bit tight, but practical right? Why not? Makes it easy to replicate, too. What more do you need?

But what if the shop part no longer fulfills needs, either it falls in disrepair or is too small? Can you easily “scale it up”? Not really. Therefore, it proves more effective to put each of these things in separate containers that are interconnected (e.g. with roads):

This idea kind of reminds me of my playing of Sim City back in the day.

Sure, I've played some of the newer versions of Sim City, but I childhood memories to Simcity 1.

Here's roughly what my Sim City strategy looked like: figure out the right combination of number of housing blocks, a power plant, shopping areas and factories and other required facilities. One that keeps everybody happy. Then replicate that setup over and over again.

Sadly, in Sim City this was pretty much hand work, but I'm tools can be built to do similar things in real life, so we can set up these types of “container compositions,” if you will, easily.

Maintenance

On to real-world issues. What if one of your containers — a Porchetta restaurant, let's say — is getting outdated. It sells pasta, while the world has moved on to pizza now. Or, it just got dirty and old and need to be replaced. How do we handle that scenario?

Step 1: we build another container with the new and improved version next door, for instance this awesome Resto restaurant:

Step 2: we walk into the old Porchetta restaurant and kindly, but urgently, ask people to move to the new and improved Resto restaurant next door.

Step 3: After everybody took their plates and moved over, we set the place on fire.

Boom.

We dust out the ashes, and use the area for some other container in the future.

Dun, dun, done.

Scaling

So, what if our restaurant gets too popular and it can no longer fit all customers? Easy, we build more of them! Then, we set up fencing in front to enforce some sort of queue that encourages people to spread across all our restaurant containers.

Got even more customers? Add more replicas.

Get less? Burn those suckers down!

Distribution

Imagine this. You're a small company, or even individual, and you have some idea of something you want to build into a container. Perhaps a new type of studio apartment that's really just a bedroom, or a restaurant with just one giant table. Whatever. What if you can have this built quite cheaply, have a few of them constructed and have them stored somewhere on some strategically located location, with free guided tours so that people can check them out. From here, anybody interested in your container idea can just buy one, have it shipped, and try it out. 

If you have a few of these hubs strategically distributed across the globe. Probably near big ports. Transportation is relatively cheap, and everybody will have access to your containers.

However, for some institutions, such a public hub may be too risky. They want some other, more private, place. Of course, this is an option too. Companies may offer, or just create their own private areas on existing ports, or even private ports where such containers can be stored.

From one of these hubs, whether public or private, containers can be transport either by truck or by ship:

Meh. No, let's assume this type of ship:

Again, you see the practicality of the container idea here: highly stackable, and if this is enough of an industry, you can custom build ships that are purpose built just to do that one thing: transport containers.

Manufacturing

So, this leaves just one aspect: how do you design and construct these things cheaply and efficiently?

The answer here, too, is simple:

  1. come up with an idea
  2. design how it should look and work
  3. prepare instructions on how to build one from scratch
  4. have 'em built

All that's left is the place to actually build these things. This is what the discipline of manufacturing was invented for: tell factories what to build, and they can produce lots of replicas cheaply.

But in this day and age, let's dream a little bit. What about 3D printers?

At this point you may think, “but Zef, I was with you this far, but now you're talking crazy! Build a container fully automatically using a 3D printer?”

Not that crazy at all, as it turns out. These guys in Amsterdam are 3D printing an Amsterdam Canal house.

But then again. Dutch people. They're crazy.

So there you have it. Urban Planning 2.0. It's the future, I'm telling ya.