Building and Operating a Modern Composable Monolith

Rate this content
Bookmark

It all started with the monolith’s fission into microservices. This set logical and physical boundaries, fusing the infrastructure and software dimensions. While microservices simplified how teams develop independently, it added extra complexities around performance, correctness, general management, and ultimately a slower development cycle. In this talk, we will dive deep into how to architect and implement a Fastify-based composable monolith, cross-service network-less communication, and how to handle efficient development across teams while deploying a single artifact in Kubernetes. Does it sound like magic?Let's discover the trick together!

This talk has been presented at DevOps.js Conf 2024, check out the latest edition of this JavaScript Conference.

FAQ

The composable monolith is a modern approach to software development that involves writing monolithic applications modularized into components. These components are bundled into a single deployable unit but are designed to function as if they were independent, allowing for easier versioning and resource management.

Platformatic aims to simplify the development of Node.js applications by using a runtime that supports modular, monolithic applications where each module represents a single feature but is deployed under a single bundle. This approach facilitates easier management and integration of components.

Fastify is favored by the Platformatic team for its ability to elegantly handle the concept of a composable monolith. It supports plugins and routes which can be bundled into a single Fastify application, allowing for organized and structured development within the Node.js ecosystem.

Microservices often lead to complex management, slow development lifecycles, and intricate versioning due to their distributed nature. The composable monolith addresses these issues by centralizing components into a single deployable unit, simplifying management, and reducing the overhead related to maintaining multiple independent services.

Meraki is an Electron app developed by Platformatic that provides a UI-driven experience for building composable monoliths. It enables users to easily assemble and configure modular applications using a wizard-driven interface, promoting creativity and simplifying the development process.

Platformatic Runtime is designed to manage modular monolithic applications by running each module as if it were an independent component. This runtime facilitates the HTTP interface and the management of components, supporting the execution of applications with the efficiency of microservices but with simpler configuration and deployment.

Developers can find resources and contribute to Platformatic projects by visiting their GitHub page. Platformatic encourages contributions such as new features or enhancements through pull requests to their repositories.

Luca Maraschi
Luca Maraschi
19 min
15 Feb, 2024

Comments

Sign in or register to post your comment.
Video Summary and Transcription
In this talk, Luca introduces the concept of the modern composable monolith and discusses the challenges of microservices. He emphasizes the importance of developing modular monoliths and introduces Fastify and the Platformatic Runtime as tools for this approach. The Platformatic Runtime simplifies running modular, monolithic applications, and standardizing interfaces and communication is crucial in this context. Lastly, Luca introduces Meraki as a UI-driven tool for building composable monoliths and invites developers to join their marketplace for revolutionizing the operational experience of microservices.

1. Introduction to the Modern Composable Monolith

Short description:

Hello everyone, I'm Luca, co-founder and CEO of Platformatic. Today we have microservices, but where is the future taking us? In this talk, I will try to trigger your curiosity into a new concept and to sneak peek into some of the material that at Platformatic we already built on this topic. Microservices bridge the logical boundaries with the physical boundaries, bringing a technology, cultural, and people transformation. They bring an insane performance boost and more fault tolerance, but hurt the performance and make correctness harder.

Hello everyone, I'm extremely excited to be here at JS Nation today and to take you on a journey, the journey of the modern composable monolith. Let me start introducing myself, I'm Luca, co-founder and CEO of Platformatic, and together with my friend Matteo Collina and our amazing team, we are on a mission to completely change the world of building Node.js application in modern times.

You can connect with me and please do it on any social media and you can find me under Luca Maraschi, I'm excited to connect with you. But let me start with our journey. My grandmother Piera always told me life is like a spinning wheel and at the time, trust me, I didn't get it. But today I want to show you and prove you that she was right. Let's start.

Like every story that we heard in the past years, especially in Node, is that once upon a time there was the monolith and now microservices. Well, today, let's start from where we left the story. Today we have microservices, but where is the future taking us? In this talk, I will try to trigger your curiosity into a new concept, but especially to sneak peek into some of the material that at Platformatic we already built on this topic and to connect directly to ask any question.

But let's start with where the story ended and was left about microservices. So microservices, they bridge the logical boundaries with the physical boundaries. And what does that mean is that they basically are not only a technology transformation, but also a cultural transformation and a people transformation, like we say in any organization. Microsoft has always, when we think about it, we think about all these hexagons, right? Being composed with each other and then being streamlined into APIs. Because we are in the time of modern APIs and of the API economy, like my friends at Kong always say. And I agree with them.

We are in the midst of the API economy. And on one side, we have been extremely capable and driven by changing the world of APIs. Still, we got a little bit stagnant in how we build the logic that supports all these APIs. The core of everyone's business. And so microservices on one side brought an insane performance boost, right? Because we can scale independently, we think about micro particles of the business logic in a much more isolated way, right? They became more fault tolerance because we don't have these huge transactions that are unified into a single set of business logic, but they are distributed across multiple nodes. And if one node goes down, we can actually restore it because we were told they need to be stateless. So we started creating these abstraction boundaries. We create this facade that allow us to swap in and swap out the different implementations of the service without disrupting clients, right? And this sounds extremely exciting and positive. However, in every good story there is an however, you know, right? This actually hurt the performance because now you have a lot of services that imagine in Kubernetes or in any other system, they are basically distributed across multiple nodes and these nodes needs to communicate. And how they communicate is called the network, right? On the other side, correctness got way harder. It's a distributed system. It's very hard to manage consistent state across all these different services. And especially when I say state, I mean, logical state and physical state. Is everything equally distributed? Is everything developing the same way? And just pin this concept for later.

2. Challenges of Microservices and the Eureka Moment

Short description:

They become extremely hard to manage because they are like a distributed system. It impacts directly developers, making the development lifecycle slower and adding frustrations. We couple our application logic to the network layout, making it hard to untangle. The solution is to look backward at the composable monolith, a concept not new but endorsed by Google in a white paper.

They become extremely hard to manage because we just said it, right? They are like a distributed system. They are all independently developed, independently deployed, independently managed, right? And so, this actually causes a huge freeze in the APIs, right? Because we just said before, the APIs, they are this aggregation of all these microservices. And so, at the end of the day, what happened is that it impacts directly developers. It makes the development lifecycle way slower and it adds frustrations to developers because there are more barriers to overcome before we can get our microservices to production.

But I would say even more, we couple our application logic, our applications to the network layout with a network taxonomy, and these become extremely hard to untangle. And also, it makes versioning extremely complicated because application binaries are released independently. Every single microservice has its own lifecycle. Have you ever wondered which version should this service have? That's actually a very good question. But there was a eureka moment. There was a time that we said, hmm, we saw the light. And that was the time of the composable monolith.

So, what is the solution to all these problems? Well, it's probably to look backward and look where we started, right? We all started the bashing and going that basically the monolith represented Java and .NET, right? And at the end, if you all remember, those technologies were deployed like a tarball that was SFTPs on an application server. And it was working, right? But what actually was not fitting was the development model, how this bundle was actually created. And so, this is not a new concept, right? And I'm not the first one. We are not, like, crazy saying about this composable monolith. But Google actually wrote a white paper saying that the future of modern development in the cloud is with a composable monolith. This is the white paper. I highly recommend you to download it, read it. It's a phenomenal paper. And I personally think it gives a phenomenal view on modern ways of interpreting software development.

Check out more articles and videos

We constantly think of articles and videos that might spark Git people interest / skill us up or help building a stellar career

How to Build CI/CD Pipelines for a Microservices Application
DevOps.js Conf 2021DevOps.js Conf 2021
33 min
How to Build CI/CD Pipelines for a Microservices Application
Top Content
This Talk discusses the benefits of microservices and containers for building CI-CD pipelines. It explains how container technology enables portability and scalability. The challenges of microservices include network communication and testing in isolation. The Talk introduces Tacton, a cloud-native CICD pipeline for Kubernetes, and highlights the use of GitOps and Argo CD. It also discusses the importance of maintaining referential integrity between microservices and the evolving role of operators in the DevOps world.
Micro-scopes – How to Build a Modular Modern App in a Bundled World
JSNation Live 2021JSNation Live 2021
21 min
Micro-scopes – How to Build a Modular Modern App in a Bundled World
This Talk discusses the importance of bundling code in the modern JavaScript world and introduces Webpack as the de facto standard for bundling modules. It explores techniques such as code splitting, multiple entry points, and controlling the build process to optimize code organization and improve performance. The Talk also delves into concepts like Universal Model Definition (UMD) and using externals in Webpack to avoid code duplication. It highlights the benefits of separating and maintaining code in an application, as well as the use of micro-frontends and monorepos for scalability and collaboration. Overall, the Talk emphasizes the significance of code separation, dependency management, and efficient bundling strategies for developing robust and modular applications.
Optimizing Microservice Architecture for High Performance and Resilience
Node Congress 2024Node Congress 2024
24 min
Optimizing Microservice Architecture for High Performance and Resilience
Today's Talk discusses microservices optimization strategies for distributed systems, specifically focusing on implementing casual consistency to ensure data synchronization. Vector clocks are commonly used to track the casual relationship between write events in distributed systems. Casual consistency allows for concurrent and independent operations without synchronization, maximizing parallelism and system resource utilization. It enables effective scalability, better latency, and fault tolerance in distributed systems through coordination, resilience, reconfiguration, recovery, and data replication.

Workshops on related topic

Decomposing Monolith NestJS API into GRPC Microservices
Node Congress 2023Node Congress 2023
119 min
Decomposing Monolith NestJS API into GRPC Microservices
Workshop
Alex Korzhikov
Alex Korzhikov
The workshop focuses on concepts, algorithms, and practices to decompose a monolithic application into GRPC microservices. It overviews architecture principles, design patterns, and technologies used to build microservices. It covers the theory of the GRPC framework and protocol buffers mechanism, as well as techniques and specifics of building isolated TypeScript services in the Node.js stack. The workshop includes a live use case demo of decomposing an API application into a set of microservices. It fits the best architects, tech leads, and developers who want to learn microservices patterns.
Level: AdvancedPatterns: DDD, MicroservicesTechnologies: GRPC, Protocol Buffers, Node.js, TypeScript, NestJS, Express.js, PostgreSQL, TurborepoExample structure: monorepo configuration, packages configuration, common utilities, demo servicePractical exercise: refactor monolith app
Decoupling in Practice
Node Congress 2023Node Congress 2023
102 min
Decoupling in Practice
WorkshopFree
Chad Carlson
Chad Carlson
Deploying decoupled and microservice applications isn't just a problem to be solved on migration day. Moving forward with these architectures depends completely on what your team's workflow experience will look like day-to-day post-migration.
The hardest part of this can often be the number of vendors involved. Some targets are best suited for specific frontend frameworks, while others are more so for CMSs and custom APIs. Unfortunately their assumptions, workflows, APIs, and notions of security can be quite different. While there are certain advantages to relying on a strict contract between apps – where backend and frontend teams work is limited to a single vendor – this isn't always realistic. This could be because you're still experimenting, or simply the size of your organization doesn't allow for this kind of specialization just yet.
In this workshop, you'll have a chance to explore a different, single vendor approach to microservices using Strapi and Next.js as an example. You'll deploy each app individually, establishing a workflow from the start that simplifies customization, introducing new features, investigating performance issues, and even framework interchangeability from the start.
Structure:- Getting started- Overview of Strapi- Overview of Platform.sh workflow- Deploying the project- Switching services- Adding the frontend
Prerequisites:- A Platform.sh trial account created- The Platform.sh CLI installed
How to develop, build, and deploy Node.js microservices with Pulumi and Azure DevOps
DevOps.js Conf 2022DevOps.js Conf 2022
163 min
How to develop, build, and deploy Node.js microservices with Pulumi and Azure DevOps
Workshop
Alex Korzhikov
Andrew Reddikh
2 authors
The workshop gives a practical perspective of key principles needed to develop, build, and maintain a set of microservices in the Node.js stack. It covers specifics of creating isolated TypeScript services using the monorepo approach with lerna and yarn workspaces. The workshop includes an overview and a live exercise to create cloud environment with Pulumi framework and Azure services. The sessions fits the best developers who want to learn and practice build and deploy techniques using Azure stack and Pulumi for Node.js.
How to Convert Crypto Currencies With GRPC Microservices in Node.js
JSNation 2023JSNation 2023
117 min
How to Convert Crypto Currencies With GRPC Microservices in Node.js
Workshop
Alex Korzhikov
Andrew Reddikh
2 authors
The workshop overviews key architecture principles, design patterns, and technologies used to build microservices in the Node.js stack. It covers the theory of the GRPC framework and protocol buffers mechanism, as well as techniques and specifics of building isolated services using the monorepo approach with lerna and yarn workspaces, TypeScript. The workshop includes a live practical assignment to create a currency converter application that follows microservices paradigms. It fits the best developers who want to learn and practice GRPC microservices pattern with the Node.js platform.
Prerequistes:- Good understanding of JavaScript or TypeScript- Experience with Node.js and writing Backend applications- Preinstall Node.js, npm- Preinstall Protocol Buffer Compiler- We prefer to use VSCode for a better experience with JavaScript and TypeScript (other IDEs are also ok)
How to Convert Crypto Currencies with Microservices in Node.js and GRPC
Node Congress 2022Node Congress 2022
162 min
How to Convert Crypto Currencies with Microservices in Node.js and GRPC
Workshop
Alex Korzhikov
Andrew Reddikh
2 authors
The workshop overviews key architecture principles, design patterns, and technologies used to build microservices in the Node.js stack. It covers the theory of the GRPC framework and protocol buffers mechanism, as well as techniques and specifics of building isolated services using the monorepo approach with lerna and yarn workspaces, TypeScript. The workshop includes a live practical assignment to create a currency converter application that follows microservices paradigms. The "Microservices in Node.js with GRPC" workshop fits the best developers who want to learn and practice GRPC microservices pattern with the Node.js platform.