
Verify Node.js is installed on your machine by checking the version in the terminal, then choose an editor you like (code or vim) and install it before the next lecture.
Understand monolithic applications as a single, all-in-one program that blends UI, data access, and services, and see how microservices enable scalable, horizontal deployment by separating components like the database connector.
Learn how microservices isolate functionality so a single failure won't crash the whole application. Balance cross-service communication, deployment order, and end-to-end testing through careful design and coordination.
Build a basic node monolith with express, create an entry point, define a get / route that returns hello world, and run on port 3000 to test with curl.
Build a monolith node server with nodemon for auto-restart, define a get handler, and simulate a database by exporting a function that returns an array of post objects.
Explore how a monolith can crash when a single database module fails, and how coupling causes the whole app to go down, underscoring the need for separate services.
Explore microservices and API gateway to prevent single-point failures in a monolith by routing requests to a dedicated database connector service.
Refactor to microservices by exposing a database connector as a REST API via Express and routing it through an API gateway, improving reliability when a single service fails.
Pronto introduces moving from a monolithic application to a service architecture using a Microsoft approach, delivering a production-ready solution and outlining benefits for future microservices.
Isolate each function behind its own API and deploy microservices independently, not bound to a single process or server, enabling specialized teams, faster development, and maintainability.
Explore the drawbacks of microservices, including complex cross-service communication, deployment order challenges, and testing difficulty, while discussing strategies to plan and isolate services for scalable, maintainable apps.
Compare monolithic apps with the microservices pattern to see why large, evolving projects benefit from distributed architectures. Learn to tackle implementation challenges and build your first distributed system using Nocera.
Explore building a mailing service and an API gateway on Express, using REST and a message queue with a database service, all in Node.js microservices accessible via Graffanino.
Clone the course repository using https or ssh, pick the lecture-specific branch, and set it up on your local machine via the terminal to begin coding.
Install lerna globally with npm install -g lerna, then manage multiple packages in the current repository to enable scalable, independently deployed packages.
Kickstart your Lerna monorepo by initializing it, creating a packages folder, inspecting package.json and dependencies, and preparing to create your first package.
Understand why an API gateway serves as the central entry point, routing client requests to distributed microservices and simplifying multiple fetches.
This lecture explains how an api gateway bundles requests to multiple services, letting the client fetch resources through a single gateway without managing multiple connections.
Compare REST and GraphQL APIs, highlighting resources, endpoints, queries, and mutations, and show how GraphQL fetches only requested data across services via a single endpoint to reduce overhead.
Set up the api gateway as your first microservice by initializing npm in a gateway folder and installing express, body-parser, GraphQL tools, and Apollo server express.
Start the api gateway by configuring express in server.js, test the server listening on port 40000, and apply body-parser json to parse request bodies.
Learn to turn a plain Express server into a GraphQL gateway by using Express middleware, defining a GraphQL endpoint, and mocking a schema to test the gateway.
Define a GraphQL schema with a type Query and resolvers, then combine them into an executable schema using makeExecutableSchema, and expose a GraphQL interface to run queries against the gateway.
Configure a centralized config folder for a Node.js microservice, exporting environment-based settings to switch between development and production, including port configuration for the gateway.
Build a data layer for the gateway by adding data/schema.js and resolvers, define type definitions for queries and mutations, and assemble an executable schema with makeExecutableSchema.
Define gateway schema types and implement a GraphQL query core for emails, fetching mails or a mail by subject and receiver, then mutate to store in database and send.
Define GraphQL query and mutation types and a custom mail type in a Node.js microservice, with required subject, receiver, and content, and prepare to add resolvers and test.
Implement resolvers for the it type definitions, returning an in-memory array of mails with subject, receiver, and content; wire up query and mutation to handle mocked data.
Explore the database service: a single-function microservice with a mongoose model and express REST API that connects to MongoDB (mlab), using a few simple routes and avoiding GraphQL.
Create a new database and user in mLab via the AWS sandbox with 500 MB of free storage, then connect to it using mongoose for your node.js microservices.
Set up a database service that connects to the database and serves data to the gateway, wiring express and mongoose with a config-driven port.
Set up get routes for the database service, expose a root endpoint returning hello from the database, and test locally on port 4000.
Set up a Node.js microservice to connect to MongoDB with mongoose, configure the MongoDB connection string and credentials, and validate the connection during server startup.
Identify and fix MongoDB connection issues by checking vpn and firewall configurations, then adjust settings or bypass vpn to restore access before moving to database operations.
Define a mongoose schema and model to store and retrieve mail data in MongoDB, including subject, receiver, and content, in a Node.js microservices context.
Save mail documents to the database using mongoose, then define a get route that retrieves them with find and returns them to the client. Connect via the api gateway.
Create a post /mails route that validates subject, receiver, and content, uses body-parser to parse the payload, saves a new mail with mongoose, and returns the saved mail.
Discover PM2, a node process manager, to start, monitor, and restart multiple microservices from a single ecosystem file, with cluster mode and environment variable management for a connected API gateway.
Learn to use PM2 ecosystem config to wire API gateway, database service, and discovery service in a microservices setup, enable watch reload, and test gateway communication.
Demonstrates connecting the api gateway to a database service by configuring ports and environment variables, resolving vpn issues, to enable local microservices to communicate on the same host.
Fetch a single mail from the database using an id, adjust the schema and resolver, and test the query end-to-end on the local server.
Post a message to the database by sending a subject, receiver, and content through the API gateway and database service, establishing inter-process communication in a distributed microservice setup.
Refactor resolver removes hardcoded host and port, introduces a flexible database path and a generic get/post function to fetch mails in a microservice setup.
Explore a multi-instance API gateway and microservices architecture, connecting to a managed MongoDB via Mongoose, with a RabbitMQ queue delivering emails through Mailjet.
Explore message queues as brokers that store message objects, like emails, until a consumer pulls them, using RabbitMQ via CloudAMQP with ack-based delivery to prevent loss.
Set up your first CloudAMQP RabbitMQ instance, choose a plan and data center, and review the dashboard for connections, queues, and messages.
Connects a Node.js microservice to a robot using amqp, creates a producer, and sends durable messages to a task queue.
Adapt a consumer to read messages from the test key and wire a mailing service to process them via the message queue.
Replace hard coded strings with a key that we define, export a push to queue function, and use a single queue and channel to push messages from the gateway.
Extend the mutation resolver in Node.js microservices to post to the database and push the message to a queue, exporting a push to queue function that sets up the channel.
Set up a mailing service that subscribes to a message queue, implements a consume handler, and processes mail objects with subject, content, and receiver via the API gateway and config.
Parse incoming messages into objects, handle parsing errors gracefully, and structure mail payloads with subject, receiver, and content as they flow through the API gateway and message queue.
Learn how to set up a mailing service with MailJet in a Node.js microservice, including obtaining API keys, verifying a sender domain, and sending emails via the MailJet SDK.
Identify and fix a bug in a node.js mailing service caused by environment variable reloads, showing that restarting PM2 updates config and enables emails to be sent via API gateway.
Wraps up the course by outlining how to build and deploy Node.js microservices, enable inter-service communication via queues or rest APIs, and use service discovery for scalable, resilient apps.
Microservices are a architecture pattern in software development, where independent process or functionalities are composed together in a loosely coupled manner.
This way we can design applications and entire systems that keep reliable and failure proof even when one part of the application goes down.
This pattern is perfect for software/products that should scale vertically as well as horizontally!
For exactly those reason the skill of being able to design and implement microservices is a huge advantage in the labor market!
And by the way.. it's super cool building microservices ;)
Node.js as an incredibly flexible and, due to its asynchronous nature, performant runtime is a perfect tool to implement huge parts of any application designed with the microservice approach in mind!
Because of use cases including but not limited to:
Scalable API Gateways to handle millions and millions of requests
Database connectors (Mongoose + Mongo)
Communication Interfaces to other services like REST API's, GraphQL API's...
Isomorphic JavaScript for server-side-rendering
...
In this course we will explore the fundamentals of designing and implementing Microservices using Node.js
Where does the need for microservices come from?
What need's to be done to develop them?
What challenges will one face when designing microservice approaches?
Why is it worth using them?
This course is entirely hands-on and is focused on coding rather than plain theory.
Let's get started enhancing your skills as a professional software engineer!
Let's get started augmenting your horizon as a JS lover!