Design note: from components to microservices

This note goes with the application section of Structure of EK9. EK9 builds components, applications and dependency injection into the language. That is not an invitation to build one very large application.

Not a monolith

A very large monolithic application leads to:

Once software passes a certain size (and judging it takes rules of thumb and experience), you have to move to microservices, even in a desktop application. Microsoft does it with the Language Server Protocol, and AWS with almost all of its services; it clearly has merit.

But you have to architect the solution, and not leave it too late. Agile is the current practice, but you still must plan an overall design and focus on coupling and cohesion.

When to move

Hedge your bets

Components, packages and module naming together are the key to formalising interfaces that can be turned into microservices. Design with all three in mind and you have hedged your bets if the software starts to get really large.

Back to the car manufacturing analogy: a vehicle designed to standards (bearing sizes, connectors, wiring capacity) can take alternative or additional components, such as bearings with higher performance, more load or higher speeds, or more electrical load for navigation, automation and sensors. Those innovations fit only if the original design envisaged future change.

EK9's service construct is how you build the microservices themselves.