The Patterns Behind Java, Kubernetes and Modern Distributed Systems

Jennifer Riggins
Nov 1 · 5 min read

This post is written about an epic interview of the mind-blowingly knowledgable Cornelia Davis. You should definitely watch the whole interview here.

When The New Stack Editor-in-Chief Alex Williams sat down with Pivotal’s VP of Technology Cornelia Davis at SpringOne Platform in Austin Texas, they had a lot to talk about. Almost 40 years. Davis’s tech career began in aeronautics which could go give years from code written to rocket launched. She has journeyed right alongside as we went from SOA and SOAP to REST to the distributed systems we have today. During her talk and in this conversation, she reflects on the patterns that drove APIs from a RESTful layer toward toward true autonomy, where everything is as loosely coupled as possible, with bounded context.

A chat with Davis feels one third practical computing, one third theoretical mathematical foundations, and a third grammar. To give context to the chat, let’s give some background.

The traditional object-oriented or imperative programming is focused on using statements to change a program’s state. On the other hand,

declarative or functional programming focuses on what the program should accomplish and isn’t worried about how that result is achieved, This is why the first is referred to as stateful programming, while the latter is stateless.

In this conversation, Davis describes functional programming as a statement of relationship between the first part of a problem and the rest of the problem. You trust that the second half of that problem is correct, so all that is important is how you combine these things.

She said, “It’s a shift in APIs for declaring what you want, not the step by step to get there.”

Davis says in the Kubernetes world, this comes in the form of Controllers.

So how did the open source community drive us here?

This truly STEM-oriented brain recognizes a series of patterns that have driven modern computing.

In short, Java has become more than just a language and Kubernetes has become more than just a container orchestrator. These open source tools have become platforms of platforms, which drive patterns that are backing up the new developer experience.

For years, decades even, she said the industry had the “relatively tractable” database tier, services tier, and front-end for a few decades now, but “it was still closer to static than it was highly distributed and constantly changing,” which is the reality we live in today.

Davis marvels at the “extraordinary” success of the Java programming language steering that. She said, if it had continued on its enterprise path, it wouldn’t be that big, but, since it was built on the Spring open-source framework, if allowed it to not only have mainstream adoption but innovation via edge cases.

This allowed for people to build onto the strong Java core allowing extensions that she calls “really relevant” to emerge, including ReactJS.

Davis remarks how it’s impressive that the Java framework has been able to keep up pace because it was logical to predict the popular languages would have to change as a part of that transformation. There are functional programming languages like Scala that are emerging as newer favorites, but many of them are acting as extensions of Java data mining and the Java framework.

Davis says Java and the Spring Platform are coming together with Kubernetes, all in the direction of this flexibility, which has allowed for our incredibly distributed systems today.

This is why, she reasons, massive organizations such as the Netflix suite chose to build their constantly changing and distributed apps around a Java core, as it allows for this sort of flexibility to drive service discovery.

Williams brings up that one of the hot languages that kept comping up at at SpringOne is Kotlin.

Davis explained, “I believe the popularity around Kotlin is that it is a functional programming language first,” continuing that a functional programming language is based on mathematical functions, designed to handle symbolic computation and list processing applications.

She said you could program Kotlin imperatively but she says that’s painful. Going stateless means it is more expressive than prescriptive.

“Language is naturally designed for functional thinking,” she said.

“What is so cool about these functional languages where you are expressing your intent is that you are somewhat ceding some of that control to an entity that’s a whole lot better at managing distributed systems of tens of thousands or hundreds of thousands of nodes than human beings possibly can be.” — Cornelia Davis, Pivotal

Davis says in the world of Kubernetes and distributed systems is strikingly the opposite to her aeronautical past — or even her husband’s aeronautical present. Because Kuberetes is all about autonomy, binding things together as late as possible “usually during runtime.”

Thirty years ago, it was much more solitary and throwing things over the wall. Nowadays, partitioning is still important but in conjunction with team-based goals and collaboration.

DevOps doesn’t mean the impossibility of a full-stack engineer. She says DevOps is about embracing the idea of the full-stack team.

At Pivotal, they have even have two different full-stack teams — a platform team and then a team that builds on top of the platform.

Davis says the shift toward cloud-native applications sees patterns emerging that everyone should be familiar with, namely:

  • Circuit-breaker pattern — wrapping a monitor that tracks a failure
  • Service discovery pattern — automatic detection of services and devices
  • Retry pattern — how many times and how often you can retry after a momentary loss of network

Everything depends on the context. For example, if the whole system is retrying for five seconds and then when it all comes back online, the network could crash under a “Retry Storm,” Davis explained.

She says there are four principles that popular stable bases like Kubernetes, Java and Spring share:

  • Immutability — unmodified or unchangeable
  • Loops — execute part of the program repeatedly based on a given condition
  • Reactive — object-oriented
  • Composition — treating a group of objects in the same way as a single object of the same type

Davis said composition is something we’ve done all along, but the fact that you are programming reactively, instead of request-response, and that you are writing APIs that allow you to declare what you want as opposed to saying step by step what you’re going to do, that has downstream consequences in the way that you actually put things together.

Finally Williams and Davis dive into the next generation of this evolution that sees the independence of HTTP and what she calls a natural response to a request protocol, the new world where machines are declaring to other machines.

Note: I’m publishing this both on Medium and on LinkedIn for two reasons. One, I just want to test which medium does better, and secondly, it’s not my SEO at risk with duplicate content ;) This was originally written in my work for The New Stack, but instead I am publishing it on those two media. Seriously, the podcast is worth a listen! And you should definitely subscribe to The New Stack Makers wherever you listen to podcasts because we rock. :)

Jennifer Riggins

Written by

eBranding Ninja! #Tech #storyteller and #writer, where digital #transformation meets #culture. Eager #branding translator. Proud #WAHM. Oh, and I’m hilarious.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade