22
DOCKER, NODE.JS, REDIS MICRO EVERYTHING T @SEGALDORON G GITHUB.COM/DORON2402/OT-MICROSERVICE-TALK

Microservice

Embed Size (px)

Citation preview

Page 1: Microservice

DOCKER, NODE.JS, REDISMICRO EVERYTHING

T @SEGALDORON G GITHUB.COM/DORON2402/OT-MICROSERVICE-TALK

Page 2: Microservice

A LITTLE BIT OF HISTORY…

Page 3: Microservice

YOU NEED YOUR PHP 3WITH MYSQL

And your web server is ready!

EARLY 2000

Page 4: Microservice

AND THEN… THE HYPERVISOR

Page 5: Microservice

YOU CAN RUN VIRTUAL SERVER

MID 2000

Page 6: Microservice

AND THEN…

Page 7: Microservice

CONTAINERS!!!

Page 8: Microservice

DOCKER

HOW DOCKER CHANGE THE WORLD

▸ Deployment

▸ Scaling

▸ Thinking in microsite

▸ Debugging

▸ Shipping

▸ Discovering

Page 9: Microservice

USING ONE OPERATION SYSTEM NO HYPERVISOR

TODAY 2016

Page 10: Microservice

GAME CHANGER?

Page 11: Microservice

RUNNING DOCKER MULTI PLATFORM…

FUTURE

Page 12: Microservice

THE OLD WAY

MONOLITHIC APPLICATION

▸ Lots of engineers work on the same code base

▸ Scary deployment (all eggs in one basket)

▸ One thing doing too many things

▸ Hard to debug

▸ Scaling?!

Page 13: Microservice

WELCOME TO THE FUTURE

MICRO SERVICE ARCHITECTURE

▸ Smaller code base

▸ Smaller team

▸ Fast & Small deployment

▸ Each service solve a specific problem

▸ Stateless

▸ Product VS Services

▸ Async Services

Page 14: Microservice

MONOLITHIC APPLICATION VS MICROSERVICES

EX’ - LETS ADD FOLLOW BUTTON TO A RESTAURANT PAGE

Page 15: Microservice

MONOLITHIC APPLICATION VS MICROSERVICES

EX’ - LETS ADD FOLLOW BUTTON TO A RESTAURANT PAGE

▸ Monolithic App

▸ adding bunch of code to existing code.

▸ new directory

▸ bunch of new file

▸ Micro Service

▸ Creating new service

▸ Routing traffic to our service

▸ [POST] /users/:id/follow/:id

▸ [DELETE] /users/:id/follow/:id

▸ [GET] /users/:id/follow/:id

Page 16: Microservice

MONOLITHIC APPLICATION VS MICROSERVICES

OH NO WE HAVE A BUG?!?

Page 17: Microservice

MONOLITHIC APPLICATION

LETS TRY TO FIND THE BUG?!?

▸ Most importantly our site is DOWN!!

Page 18: Microservice

MICROSERVICES

OUR SITE IS STILL UP

▸ Worse case scenario our `follow` button is missing or not saving the state after refresh

Page 19: Microservice

DEMO

NOW THAT WE UNDERSTAND WHY MICRO SERVICE IS THE WAY TO GO LETS DEMO

Page 20: Microservice

DEMO

OLD SITE COUNTER?

Page 21: Microservice

THANK YOU!

THE KEY IS ISOLATION

QUESTIONS?

Page 22: Microservice

THANK YOU!

IF YOU CAN’T THINK ABOUT ANY QUESTION PING ME LATER ON TWITTER @SEGALDORON

YOU CAN ALSO FIND THE CODE HERE: HTTPS://GITHUB.COM/DORON2402/DOCKER-NODEJS-REDIS

SLIDESHOW AND LINKS WILL BE POST ON THE MEETUP PAGE

THANK YOU!