Decomposing Monolith NestJS API into GRPC Microservices

certificate
Recording and certification are available to Multipass and Full ticket holders only
Please login if you have one.
Rate this content
Bookmark
Project website

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: Advanced

Patterns: DDD, Microservices

Technologies: GRPC, Protocol Buffers, Node.js, TypeScript, NestJS, Express.js, PostgreSQL, Turborepo

Example structure: monorepo configuration, packages configuration, common utilities, demo service

Practical exercise: refactor monolith app

This workshop has been presented at Node Congress 2023, check out the latest edition of this Tech Conference.

FAQ

The workshop is focused on how to decompose a monolithic API into microservices.

The presenters are Alex, a software engineer with experience in frontend, DevOps, and backend technologies, and Andrew, a software engineer with experience in multiple technologies including C#, .NET, Node.js, and TypeScript.

To run the workshop locally, you need to install Node.js, NPM, Docker, Docker Compose, Protocol Buffer, and Protocol Buffer Compiler.

The agenda includes an introduction to the project's ecosystem, exploring the use case, discussing the theory and patterns of monolith and microservices, demonstrating the transformation from monolith to microservices, and summarizing the workshop.

The workshop highlights technologies such as Node.js, NestJS, gRPC, and Protocol Buffers.

The purpose of using gRPC is to demonstrate an efficient way of communication between microservices, leveraging Protocol Buffers for data serialization.

Benefits include easier deployment, independent iteration and evolution of services, technology diversity, improved scalability, and simplified onboarding for new developers.

The Strangler Fig pattern is a method for gradually refactoring a monolithic system into microservices by incrementally replacing parts of the monolith with new services until the monolith is fully replaced.

Challenges include managing dependencies, ensuring data consistency, maintaining performance, and handling the complexity of distributed systems.

You can monitor and ensure integrity by using CI/CD pipelines, automated tests, proper monitoring, and having a well-defined communication protocol between services.

Alex Korzhikov
Alex Korzhikov
119 min
18 Apr, 2023

Comments

Sign in or register to post your comment.

Video Summary and Transcription

The workshop focused on decomposing a monolithic API into microservices using NestJS and gRPC. The speaker discussed the benefits and drawbacks of monoliths and microservices, as well as principles and architecture patterns for microservices. The process of decomposing the monolith involved refactoring the code, introducing gRPC for communication, and gradually moving parts of the monolith to separate services. The workshop also highlighted the importance of testing, CI/CD pipelines, and database decomposition. Overall, the workshop emphasized the need for careful planning and testing when decomposing a monolith into microservices.
Video transcription and chapters available for users with access.

Watch more workshops on topic

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.

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.
Building and Operating a Modern Composable Monolith
DevOps.js Conf 2024DevOps.js Conf 2024
19 min
Building and Operating a Modern Composable Monolith
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.