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.

38 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

  8. Hey, Looking for the perfect bed for your dog or cat? This cozy fur bed is sooo comfy, and is designed specifically to calm and reduce your pet’s daily anxiety while providing better sleep, resulting in improved overall health, happiness and behavior!

    (LAST DAY PROMOTION, SUPER SALE) GET YOURS HERE: dogloverclub.store

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

  9. Hey there

    Buy face mask to protect your loved ones from the deadly CoronaVirus. We wholesale N95 Masks and Surgical Masks for both adult and kids. The prices begin at $0.19 each. If interested, please visit our site: pharmacyoutlets.online

    Kind Regards,

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

  10. Hello

    The complete selection of all Ray-Ban sunglasses styles available online and only 19.99 dollars.

    Insanely special offer for the next 24 hours only! Get yours here: sunglassusa.online

    You Won’t Want To Miss This!

    Cheers,

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

  11. Good day

    CAREDOGBEST™ – Personalized Dog Harness. All sizes from XS to XXL. Easy ON/OFF in just 2 seconds. LIFETIME WARRANTY.

    Click here: caredogbest.online

    Many Thanks,

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

  12. Hey there

    Wholesale Medical Surgical Masks for both adult and kids – Buy Now as Low as $0.19/mask

    Shop now: pharmacyoutlets.online

    All the best,

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

  13. EASE YOUR PAIN IN 10 MINUTES EFFORTLESSLY

    Be Free from Neck Pain
    Try NeckFlexer & Relieve Neck Pain Effortlessly In 10 Min!
    Save 50% OFF + FREE Worldwide Shipping

    Shop Now: neckflexer.online

    Elisa

  14. Hi

    Body Revolution – Medico Postura™ Body Posture Corrector
    Improve Your Posture INSTANTLY!

    Get it while it’s still 60% OFF! FREE Worldwide Shipping!

    Get yours here: medicopostura.online

    All the best,

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

  15. Hello,

    BestLocalData.com has a special package you get any group of databases for $49 or $249 for all 16 databases and unlimited emails for a year(Domain, IP, Dashboard included).

    You can purchase it on BestLocalData.com and see samples if you are interested.

  16. Your All In One Solution For Creating All The Content You’ll Ever Need.

    Proprietary AI Turns YouTube Videos Into Traffic Getting Articles At The Press Of A Button!

    We’ve Been Getting Free Autopilot Traffic From Google Without SEO Experience For Over 2 Years By Converting Others YouTube Videos Into Articles…

    https://warriorplus.com/o2/a/gmvfs/0

  17. Hey

    Defrost frozen foods in minutes safely and naturally with our THAW KING™.

    50% OFF for the next 24 Hours ONLY + FREE Worldwide Shipping for a LIMITED time

    Buy now: thawking.online

    Regards,

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

  18. What is Link Bypass?

    Link Bypass allows you to easily bypass any sales page and generate a new buy link with no coding required and just a few clicks of your mouse.

    How does Link Bypass work?

    Step #1 – Choose any sales page you want to bypass and link bypass with automatically create a custom payment link

    Step #2 – Add your new link to any landing page, sales page, or email with a few clicks of your mouse (Use your favorite page-building software or simply ‘copy and paste’)

    Step #3 – Boost conversions and make more money on affiliate promotions

    Visit us: https://warriorplus.com/o2/a/q8rmt/0

  19. Hey

    Wear with intent, live with purpose. Fairly priced sunglasses with high quality UV400 lenses protection only $19.99 for the next 24 Hours ONLY.

    Order here: kickshades.online

    Kind Regards,

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

  20. Hi

    World’s Best Neck Massager Get it Now 50% OFF + Free Shipping!

    Wellness Enthusiasts! There has never been a better time to take care of your neck pain!
    Our clinical-grade TENS technology will ensure you have neck relief in as little as 20 minutes.

    Get Yours: hineck.online

    Best Wishes,

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

  21. Hey,

    It was nice speaking to you the other day, this is the service I was telling you about that helped us boost our ROI almost 2000%

    Its a company called Lifemail.studio sorry it took so long to get back to you. They allow you to send any email doesn’t matter what.

    We dealt with a guy named Michael, he was friendly and got us setup really quickly.

    Regards,
    Warner

  22. Hey there

    Meet your best Buds – True Wireless Earbuds with amazing sound, convenience, portability, & affordability!

    Order yours now at 50% OFF with FREE Shipping: musicontrol.online

    Many Thanks,

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

  23. Hi there

    Trim your dog’s nails safely from home.

    Get it while it’s still 50% OFF + FREE Shipping

    Buy here: pawsafer.shop

    Sincerely,

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

  24. Do you need clients?

    We compiled some of the world’s top databases for you at ridiculous low prices. $49 for any of our databases or $99 for all 16 databases!

    Visit BestLocalData.com

    Regards,
    Jessica

  25. Good day

    The ultimate smashing machine! Grinding Coffee Beans, Nuts & Spices in seconds.

    50% OFF for the next 24 Hours ONLY + FREE Worldwide Shipping for a LIMITED time

    Order here: aromaonline.store

    Kind Regards,

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

  26. Hey

    Our Medical-Grade Toenail Clippers is the safest and especially recommended for those with troubles with winding nails, hard nails, two nails, nail cracks, deep nails, thickened nails etc..

    Get yours: thepodiatrist.online

    Best regards,

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

  27. Hello

    Household Mold Remover Gel

    Quickly And Effortlessly Remove Stains And Mold From Crevices In Your Home!

    Designed to tackle mold, bacteria, and fungus with gusto! Our formula cleans up the gunk!

    Keep Your Home Away From The Mold.

    PROMO BUY 2 FREE 1 FOR NEXT 24 HOURS ONLY!

    Get it now: homegadget.work

    Regards,

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

Leave a Reply

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