DEV Community

Discussion on: Container orchestration tools explained

Collapse
 
chrisco484 profile image
Christopher Colemani • Edited

The idea of abstracting the interface to the environment in which an application runs and calling it a "container" or "application container" is awesome. It means that apps can run universally across all OSes that support the type of container that you are using.

The concept is so awesome that Java web applications became "containerized" with the introduction of the of the Servlet API in 1996 (more than 2 decades ago) and we've been enjoying the benefits of being able to deploy a .war (Web application archive) file to any Servlet API implementing application container (e.g. Tomcat) ever since.

It's important to note that this type of application containerization was not solely due to Java's ability to run the same app on multiple OSes and CPU architectures, a major contributor was the container abstraction layer that the Servlet API provided and it's contribution should not be underestimated.

As Java developers we watched in wonder as the world "discovered" something we have taken for granted in our daily developer lives for more than two decades but "whatevs" ;)

I am saying this a bit "tongue in cheek" as there are some advantages that Docker containerization does have:

  • ability to containerize non Java apps (but in an "all Java" shop there is typically no need for that)
  • the orchestration tooling available (I often wish someone could produce a similar orchestration tool for creation of Servlet API containers on the fly/on demand - that would be awesome!)

I do like the humor in running, say Tomcat (an Servlet API application container) inside a Docker container - so we have a app inside a container inside another container but I can see the advantages of that - mainly, Servlet API based apps can benefit from the orchestration tooling of the Docker world.

What makes me LOL even more is when someone uses Spring boot (which inverts the container world such that a container gets embedded inside an application - yes true!) and runs that inside a docker container such that we have:

A (Servlet API) container running inside an Java application that is running inside a (Docker) container.

The fun never ends with certain technology decisions :)

Collapse
 
scottshipp profile image
scottshipp

Fellow Java dev here. I don't see the comparison. Tomcat did not virtualize the OS. With Tomcat, we still have to install the same OS version, JVM version, and Tomcat version on every host. We have to configure environment variables. We might have to add file systems and file permissions. We have to worry about port conflicts. And a dozen other things.

With Docker and an orchestration tool like Kubernetes, not only do we not have to do any of those things anymore, but we can run 10 or 15 entirely different combinations of JVM and Tomcat on any given host. We can take a fleet of hosts and turn them into an abstract compute layer that can run hundreds or thousands of these entirely different combinations.

And we can create and use file and networking abstractions that end incompatibilities between OSes.