Enterprise APIs development and Microservices with NodeJS.

Introduction

When it comes to enterprise APIs, there are some must-have aspects like scalability, maintainability, documentation, test automation, CI/CD, monitoring, and more. Adopting a microservice architecture can help teams and companies to leverage some of the mentioned aspects and this is the reason why it became so popular nowadays. For sure microservices comes with a price and not everything is vanilla ice, it demands developers to think a bit out of the code and gain skills that go beyond being a good coder. Developers need to have skills related to infrastructure, containers, messages queues, api-gateway, logging, traceability, cache and cache invalidation, auth-protocols. You may say that some of these skills are also demanded in a big monolithic. But they do are required for having at least a decent microservice approach.

Goal

This tutorial mayor goal is to transmit base on examples and a concreted use case. A simple but professional Know-how for building enterprise quality software using microservices. We are going to touch with practical example, videos and code what I consider are the basic must to have pieces of architecture and the skills that developer should know.

Tutorial Overview

To go throw the tutorial we are going to follow a small use case solution for a “Trip Agency”. Basically it is about a system that allows the management of Customers and a pool of holiday offers. The system must support the creation of bookings(Association between Customers and a Holiday Offer). The APIs should also consider a role base authentication system for Administrators and Tour Operators.

Architecture Diagram for the use case solution

Fig. 1 Initial Architecture Overview.
  • Intro
    • Introduction to Microservices.
    • Tech stack discussion for Trip Agency.
    • Creating our first customer-api express version 1.
    • Containerizing NodeJS with Docker.
    • Containers Orchestration with docker-compose.
  • Conceptualizing and mocking the customer-api
    • Initial dev Setup: VSCode, Linting etc.
    • Creating swagger.yaml specification for customer-api.
    • Swagger based development driving.
    • Express base application with Scaffolding from scratch.
    • Having a mocked API ready to use in minutes with express-swagger-middleware.
  • Real TDD
    • Automatic test generation base on swagger using oatts.
    • Improving auto generated oatts test with json templates.
    • Lines code coverage with nyc.
  • Coding Part I
    • Mongoose Model.
    • Coding customer-api controllers, step by step using TDD.
    • Errors and Global Async Error Handling
    • Swagger UI Browser services to expose and document our rest APIs.
  • Coding Part II
    • Introduction to Elasticsearch as object store and search engine for holidayHub-api.
    • Creating holidayHub-api swagger specification.
    • Using TDD to implement our holidayHub-api Microservices.
  • Deployment and CI/CD
    • Orchestration of the overall stack and customer-api for local testing using docker-compose.
    • Introduction to Gitlab CI/CD(jobs, runners and registry).
    • Gitlab stage for building check lint, test and deploying local .using own runners(Docker in Docker or Shell).
    • Kubernetes Introduction and helm.
    • How to deploy NodeJs application to kubernetes.
    • Deploy from gitlab to kunernetes.
  • AWS Deployment
    • Using ECR as container registry.
    • Deploying microservices using ECS.
    • Configuring the Application Load balancer.
    • Using AWS api-gateway
  • Coding Part III
    • Implementing booking-api Microservice with MongoDB
  • Authentication and Authorization
    • Deploying keycloak as Identity and Access Management in our Microservices infrastructure.
    • Creating users and roles for Trip Agency
  • API gateway
    • Introduction to api-gateway.
    • Having a reliable API gateway in NodeJS.
    • Authentication check and base Authorization at the api-gateway entry level.
    • Handling cache at the api-gateway level.
    • Why to expose the APIs behind the api-gateway.
  • Metrics and Monitoring
    • Deploy APM dashboard into our kubernetes cluster.
    • Adding apm-agent to our NodeJS Microservices to expose metrics and logs.
    • Creating some basic dashboard for monitoring and alerts.
  • Graphql
    • Intro to Graphql and Apollo server.
    • Graphql gateway implementation.
    • Autogenerated graphql endpoint from swagger rest APIs.
    • Extending graphql queries and mutations.
  • Event Driving Microservices and Messages Queues
    • Introduction to amqp protocol
    • Deploying a RabitMQ server into our Kubernetes infrastructure.
    • Conecting to RabitMQ from our NodeJS Microservices.
    • Publishing and Consuming events from our Microservices.

8 thoughts on “Enterprise APIs development and Microservices with NodeJS.”

  1. DOMAIN SERVICES EXPIRATION NOTICE FOR valdobox.com

    Domain Notice Expiry ON: Jan 14, 2021

    We have not obtained a payment from you.
    We’ve attempted to contact you yet were not able to contact you.

    Visit: https://bit.ly/39w9cWz

    For information and also to post a discretionary settlement for your domain website service.

    011420212028013753688578798valdobox.com

  2. Hello there

    You Won’t Want To Miss This! 50 pcs medical surgical masks only $1.99 and N95 Mask $1.79 each.

    Special Offer for the next 48 Hours ONLY! Get yours here: pharmacyusa.online

    To your success,

    ValdoBox – Welcome to my box, here we develop and speak about software.

  3. Use SendBulkMails.com to run email campaigns from your own private dashboard.

    Cold emails are allowed and won’t get you blocked 🙂

    Starter Package 50% off sale
    – 1Mil emails / mo @ $99 USD
    – Dedicated IP and Domain Included
    – Detailed statistical reports (delivery, bounce, clicks etc.)
    – Quick and easy setup with extended support at no extra cost.
    – Cancel anytime!

    Regards,
    http://www.SendBulkMails.com

  4. You Won’t Want To Miss This! 50 pcs medical surgical masks only $1.99 and N95 Mask $1.79 each.

    Only 10 orders left! Get yours here: pharmacyusa.online

    Many Thanks,

    ValdoBox – Welcome to my box, here we develop and speak about software.

  5. Use SendBulkMails.com to run email campaigns from your own private dashboard.

    Cold emails are allowed and won’t get you blocked 🙂

    – 1Mil emails / mo @ $99 USD
    – Dedicated IP and Domain Included
    – Detailed statistical reports (delivery, bounce, clicks etc.)
    – Quick and easy setup with extended support at no extra cost.
    – Cancel anytime!

    Regards,
    http://www.SendBulkMails.com

  6. You Won’t Want To Miss This!

    Buy N95 Mask only $1.69 each and get 10 pcs of medical surgical masks for FREE.

    Limited Time Offer! + Fast Shipping! Get yours here: pharmacyusa.online

    Regards,

    ValdoBox – Welcome to my box, here we develop and speak about software.

  7. SendBulkMails.com allows you to reach out to clients via cold email marketing.

    – 1Mil emails starter package
    – Dedicated IP and Domain Included

    – Detailed statistical reports (delivery, bounce, clicks etc.)

    – Quick and easy setup with extended support at no extra cost.

    – Cancel anytime!

    SendBulkMails.com

Leave a Reply to Jeanna Bales Cancel reply

Your email address will not be published. Required fields are marked *