DEVELOPING MICROSERVICES ARCHITECTURE WITH NODE JS

AGENDA

INTRODUCTION

JAVASCRIPT & HISTORY

NODE JS

MICROSERVICES

BONUS

INTRODUCTION

Hi I'M VIVEK

  • Founding Software Engineer at Trukkr
  • Self Employed Content Creator
  • Two year's of programming experience
  • Writing for 3 publisher's on Medium
  • Part of 6 organization's on GitHub
  • Helping others on StackOverflow & Dev.to
  • Struggling tech YouTuber with 300+ subscribers
  • Co-Founder of DevCreatives++
  • 1 time featured on Medium & Two top GitHub organizations

I'M ON THESE PLACES

 I'M A.K.A SLIM CODER 

IT'S ALL START WITH

IT'S ALL START WITH EM

LOSE YOURSELF

EMINEM

WHEN I'M GONE

MARSHAL

MY NAME IS

SLIM SHADY

SLIM CODER, SLIM CODER EVERYWHERE

IT'S ALL START WITH

WANT TO LEARN MORE

 

JAVASCRIPT & HISTORY

JAVASCRIPT & HISTORY

  • JavaScript was created by Brendan Eich in 1995 during his time at Netscape Communications. It was inspired by Java.
  • JavaScript is one of the standard for web.
  • There are 4 standard for web (HTML,CSS, JS, WA).
  • JavaScript is a single threaded, synchronous, dynamic typed and client-side language.
  • JavaScript after ES6 improved so much that it's now very easy t work with JavaScript.
  • JavaScript is now used everywhere.

FRAMEWORKS & LIBRARIES 

  • Libraries is React.js, JQuery etc.
  • Frameworks is Angular, Vue, ReactNative etc.
  • JavaScript is easy to use and has a huge community of developers.

WHY JAVASCRIPT ??

  MORE INTO JAVASCRIPT

NODE JS

WHAT IS NODE JS

  • Node.js is open-source and cross-platform JavaScript runtime-environment.
  • Node.js runs the V8 JavaScript engine, the core of Google Chrome, outside of the browser.
  • A Node.js app is run in a single process, without creating a new thread for every request.

  • Node.js provides a set of asynchronous I/O primitives in its standard library that prevent JavaScript code from blocking.

  • The default package manager for Node.js is npm.

  • JavaScript is for browser and Node.js is to run JS code outside browsers i.e servers.

INSTALLATION OF NODE

  • There are alot of way's to install Node.js but we will install via official website.
  • After successfully installation don't forget to run these commands for confirmation (node --version and npm --version)

A LITTLE BIT ABOUT NPM

  • npm is Node Package Manager.

  • npm is the world's largest Software Registry.

  • The registry contains over 800,000+ code packages.

  LETS SEE NODE.JS PROGRAM 

  • I have written a complete router-based program by Node.js with Express.js framework.

  MY PROJECTS PLAYLIST 

MICROSERVICES

ARCHITECTURE

WHAT IS ARCHITECTURE

  • Software architecture refers to the fundamental structures of a software system and the discipline of creating such structures and systems.

WHY MICROSERVICES ???

MONOLITHIC ARCHITECTURE

 
 
  • Monolith means composed all in one piece.
  • Monolithic architecture is system as a whole.

MICROSERVICES ARCHITECTURE

 
 

Microservices - also known as the microservice architecture - is an architectural style that structures an application as a collection of services that are :

  • Highly maintainable and testable
  • Loosely coupled
  • Independently deployable
  • Organized around business capabilities
  • Owned by a small team
  • So many companies/startups in Pakistan are already on Microservices i.e Bykea, Trukkr, 10Pearls. 

MICROSERVICES VS MONOLITHIC

 
 

LETS SEE CODEBASE FOR GETTING IDEA OF MICROSERVICES

 
 

MICROSERVICES ARCHITECTURE

 
 
  • The current application was one basic example of microservices architecture using REST API's. 
  • Note: Rest API's is synchronous (You may lose some information). If you want to work with asynchronous operation then use RabbitMQ (You can also use RPC with RabbitMQ). RPC is synchronous.  

TASK

WRITE YOUR OWN MICROSERVICES APPLICATION USING NODE

WANT TO LEARN MORE

 
 

BONUS

DOCKER

WHY DOCKER ??

WTH IS DOCKER

  • Docker is a platform for developers to build, run, and share applications with containers.
  • The use of containers to deploy applications is called containerization.
  • Containerization is increasingly popular because containers are: Flexible, Lightweight, Portable, Loosely coupled, Scalable and Secure

  • Fundamentally, a container is nothing but a running process, with some added encapsulation features applied to it in order to keep it isolated from the host and from other containers.

IMAGE & CONTAINER

 
  • An image includes everything needed to run an application - the code or binary, runtimes, dependencies.
  • Above is the image of zayn malik (docker image) what if he get out of this image and say Hi (docker container)

DOCKER HUB

 
  • You can find images from DockerHub.
  • Then you can run container from that image.

  MORE INTO DOCKER

CONTAINER ORCHESTRATION

1
  • Container orchestration is the automatic process of managing or scheduling the work of individual containers for applications based on microservices within multiple clusters.
  • The widely deployed container orchestration platforms are based on open-source versions like Docker Swarm and Docker Compose.
  • The word orchestration is dervied from orchestra.
  • Container orchestration has helped to achieve microservices and microfrontend architecture.

MICROFRONTEND

ARCHITECTURE

MICROFRONTEND

  • Extending the microservice idea to frontend development.
  • Techniques, strategies, and recipes for building a modern web app with multiple teams that can ship features independently.
  • When we develop microservices architecture we can easily see that our frontend is now monolithic (It cause alot of probelms).
  • After micro frontend now we can easily work in pairs with a team of microservices.

MICROFRONTEND

WHY WE ARE DOING THIS

WANT TO LEARN MORE

 
 

SLIM CODER IS DROPPING COURSES & VIDEOS ON YOUTUBE

CURRENTLY WORKING WITH ROASTING SERIES

WE ARE LOOKING FOR INTERNS

devcreatives@yandex.com

Developing Microservices Architecture with Node.js - ITU DSC

By Vivek Anand Sharma

Developing Microservices Architecture with Node.js - ITU DSC

  • 113