The_Story_of_Microservices_YAI_KALBIS.pdf

Tonny Adhi Sabastian
Tonny Adhi SabastianInfrastructure Architect - Co-Founder at Harmonix Teknologi Peentar
Mapan © Copyright 2020
The Story of
Microservices
August 21st. 2021
Mapan © Copyright 2020
Agenda
of Content
01. About Me
02. In the beginning, Distributed System
03. Distributed System Architecture (and SOA)
04. And there is Microservices
05. Migrating into Microservices
06. Do you need Microservices ?
07. Q&A
z
Mapan © Copyright 2020
● 13+ years of experience on IT Industry and Education
● Senior DevOps Engineer - former Solution Architect at MAPAN
( GoTo Group) since 2018
○ We’re hiring, please visit https://www.career.mapan.id/
○ Send your CV to mapan-recruitment@gojek.com
○ Interest in our DevOps engineering ? PM me
● Former Lead Engineer - Universitas Indonesia Data Center (2012 - 2018)
● Former Lecturer at Faculty of Computer Science - Universitas Indonesia
between (2014 - 2018)
○ Teaching Subject : System Programming, Modern IT Infrastructure,
Distributed System
● Former volunteer system administrator for kambing.ui.ac.id (now defunct), one of
the largest of national Free/Open Source Software repository (2009-2018)
● Co-founding two startups during (2012 - 2015) , now defunct
● Contact : tonny.sabastian@gojek.com / tonny@segmentationfault.xyz
About Me
Mapan © Copyright 2020
In the beginning, - Distributed System -
Mapan © Copyright 2020
What are Distributed Systems ?
Can you give an example ?
Mapan © Copyright 2020
The Definition of a Distributed System
Distributed system is a collection of independent nodes but appears to user
as a single coherent system
Facebook, Youtube,
GMail, Twitter, GitHub,
WhatsApp, …...
NFS, GFS,
Ceph, Orange
FS
AWS S3,
Openstack
Swift
RabbitMQ,
ZeroMQ,
MQTT, Kafka
Docker Swarm ,
AWS EC2,
Kubernetes
Apache
Mesos,
Kubernetes
Files & Dirs
put, get,
delete
enq, deq tasks orchestration
Networking Layer ( IP, TCP, UDP, socket, HTTP)
OS Layer
Mapan © Copyright 2020
● Transparency
○ Your Pokemon Go Client doesnʼt have to know exactly which game server is spawning your rare
MewTwo
● Scalability
○ Content Delivery Network is an example of bandwidth and compute power aggregation
○ The instruction needed to schedule your Smart Lamp at home is queued somewhere within
Google PubSub, which is a disk aggregation
○ Which scales we are talking about ? Each of mentioned service might be run on some 20 - 30k
machines
● Availability
○ Build a reliable system from unreliable system (ex : network can fail, hardware can fail,
software may have bugs)
○ Resiliency & Robustness to maintain 99.999999999999% uptime
Why we built distributed system ?
Mapan © Copyright 2020
● Modularity
○ Your application is splitted into many smaller parts.
○ Some part perhaps already exist and can be directly deployed
○ Some part are harder to implement
Why we built distributed system ?
Mapan © Copyright 2020
● Challenges
○ System Design is Challenging
○ Achieving Scalability is Challenging
○ Consistency - Wait my transaction
have not been propagated
○ Security - Somebody breach into my
customer data via my unprotected
AWS S3 for images
○ Fault Tolerance - My authentication is
down and my client cannot upload
their videos
● Distributed System Fallacy
● Microservices are harder to handle
Distributed System is Hard
Mapan © Copyright 2020
Distributed System Architecture (and SOA)
Mapan © Copyright 2020
● Itʼs a macroscopic view of a system structure
○ How responsibilities are assigned and divided
○ How contract between system are stated and implemented
○ How connector can be placed between systems
● Architecture is essential . It will influenced on how fast we adapt to changes and how much our
cost will be spend for those changes
What is an Architecture ?
Mapan © Copyright 2020
Common Architecture Pattern
Tiered Architecture Remote Method Invocation Event Driven
Peer to Peer
Shared Memory / Storage
Mapan © Copyright 2020
Example Architecture of a Web Apps
Discuss each layers
● What constitutes it ?
● What does it do ?
● Hardware Requirements
● or Cloud Service Equivalents
● Deployment choices
● Glue / Interconnection
Mapan © Copyright 2020
SOA - Service Oriented Architecture
Mapan © Copyright 2020
SOA - Service Communication & Orchestration
In order to get meaningful result, service talk to others via sets of contracts and the result is
orchestrated before presented to user
Service Talk via Contracts
Service Orchestration
Mapan © Copyright 2020
SOA - Example - Travel Agent Service
Mapan © Copyright 2020
Here Comes Microservices
Mapan © Copyright 2020
Meme Time !!!
Mapan © Copyright 2020
What is Microservices ?
Microservices are independently deployable
services modeled around a business domain.
They communicate with each other via
networks…...They are a type of service-oriented
architecture (SOA), albeit one that is
opinionated about how service boundaries
should be drawn, and that independent
deployability is key.
Martin Fowler
Sam Newman
Mapan © Copyright 2020
Microservices Characteristic
Mapan © Copyright 2020
Microservices Architecture Style
Infrastructure Style
● API Gateway
● Service Mesh
● Containerization
● Service Discovery
● Circuit Breaker
● Configuration Repository
● Event Bus / Streams
Software Style
● Hexagonal Architecture
● Domain Driven Design
● Event Sourcing
● CQRS
● Functional Reactive Programming
Let’s take a look into some of the styles mentioned above
Mapan © Copyright 2020
API Gateway & Service Mesh
(a)API Gateway & Service Mesh
source : Building Microservices, 2nd Edition, Sam Newman
(b) API Gateway Functionality
source : https://microservices.io/patterns/apigateway.html
Mapan © Copyright 2020
Containerization
(a)Container Packaging
source : Building Microservices, 2nd Edition, Sam Newman
(b)Container Orchestration
source : Building Microservices, 2nd Edition, Sam Newman
Mapan © Copyright 2020
Event Bus / Stream
(a)PubSub Pattern via Event Bus
source : Building Microservices, 2nd Edition, Sam Newman
(b)Event Payload
source : Building Microservices, 2nd Edition, Sam Newman
Mapan © Copyright 2020
Domain Driven Design
(a)Services are being abstracted from domain boundary context
source : Building Microservices, 2nd Edition, Sam Newman
(b)Information hiding between domain
source : Building Microservices, 2nd Edition, Sam Newman
Mapan © Copyright 2020
Command Query Responsibility Segregation
Read Only Database to Segregate Event (Query) From Multiple Services
source : https://microservices.io/patterns/data/cqrs.html
Mapan © Copyright 2020
Migrating into Microservices
Mapan © Copyright 2020
In the beginning, there was monolith
But, not these monolith
Mapan © Copyright 2020
Example : Payment Gateway (2)
Monolith Payment Gateway
HTTP
Payment
Partner
Merchant Transaction
Member
DB
Cash
Mapan © Copyright 2020
Example : Payment Gateway (2)
Monolith Payment Gateway
Payment
Partner
Merchant
Transaction
Member
DB
Cash
Payment
API
HTTP
Mapan © Copyright 2020
Example : Payment Gateway (3)
Payment
Partner
Transaction
DB
Cash
Payment
API
HTTP
Wallet Service
Member Service
Merchant Service
Mapan © Copyright 2020
Example : Payment Gateway (4)
Payment
Partner DB
Payment
API
HTTP
Member Service
Merchant Service
Cash Service
Transaction Service
Mapan © Copyright 2020
Example : Payment Gateway (5)
Payment
Partner DB
Payment
API
HTTP
Member Service
Merchant Service
Cash Service
Card Service
Voucher Service
Mapan © Copyright 2020
Example : Payment Gateway (6)
Payment
Partner
DB
Payment
API
HTTP
Member Service
Merchant Service
Cash Service
Card Service
Voucher Service
DB
DB
DB
DB
Mapan © Copyright 2020
Example : Payment Gateway (7)
Payment
Partner
Payment
API
HTTP
Member Service
Merchant Service
Cash Service
Card Service
Voucher Service
DB
DB
DB
DB
DB
Event
Bus
(ex:
Kafka)
Aggregat
or
Service
DB
Mapan © Copyright 2020
Do you need Microservices ?
Mapan © Copyright 2020
Meme Time !!!
Mapan © Copyright 2020
Meme Time !!!
Mapan © Copyright 2020
Microservices Merit and Demerit (Arguable)
Merit
● Faster time to market
● Scaling - Based on Component
● Robustness and Resiliency
● Ease of Deployment - Independent
Deployability
● Strong System Boundaries
● Adapting to Technology Diversities
De-Merit
● Distributed - choose two from these
three : Consistency - Availability -
Partition
● More complex to operate
○ Most likely you’ll need
infrastructure automation and
DevOps
○ Observability and not just
Monitoring
● Costly
● Technology Overload - Over-engineering
● Developer Experience can be painful
● Testing is harder
● Security can also be painful
Mapan © Copyright 2020
Organizing Your Team
Mapan © Copyright 2020
Deploying Your Services - DevOps CI/CD Pipeline
Mapan © Copyright 2020
Observe All The Things
Monitoring
Tracing
Logging
Do you know what your codes are doing on 2AM when your cash payment service is
down ?
Mapan © Copyright 2020
Work your assessment and try to answer the following questions :
● What we want to achieve and how we want to achieve it ?
● Do we have strong definition on businesses domain ?
● How did we organize our team ? - (People over Processes over Tools)
● Do our team can adapt quickly to technological changes and technical diversities ?
● Can we facilitate our team when they building things ?
● Can we observe clearly on what happening to our system ?
Microservices is an architectural approach, not the architectural approach. Your own context
should play a huge part in your decision whether to go down that path.
Should We Use Microservices ?
Mapan © Copyright 2020
Enjoy The Journey
Mapan © Copyright 2020
Examples & References
Mapan © Copyright 2020
● Google Microservices Demo :
https://github.com/GoogleCloudPlatform/microservices-demo
● WeaveWorks Microservices Demo :
https://github.com/microservices-demo/microservices-demo
● Bookinfo : https://istio.io/latest/docs/examples/bookinfo/
● Code Instrumentation : https://github.com/tonnyadhi/distributed-tracing-example
Code Examples
Mapan © Copyright 2020
● Distributed Systems , 3rd Edition, Andrew Tanenbaum
● Building Microservices, 2nd Edition, Sam Newman
● Monolith to Microservices, Sam Newman
● Patterns of Enterprise Application Architecture, Martin Fowler
● Microservices Pattern, Chris Richardson
References - Books
Mapan © Copyright 2020
● Monolith Decomposition - Sam Newman
https://www.youtube.com/watch?v=9I9GdSQ1bbM&ab_channel=GOTOConferences
● Design Microservices Architecture
https://www.youtube.com/watch?v=j6ow-UemzBc&ab_channel=InfoQ
● Microservices - Martin Fowler
https://www.youtube.com/watch?v=wgdBVIX9ifA&ab_channel=GOTOConferences
● Event Driven Architecture - Martin Fowler
https://www.youtube.com/watch?v=STKCRSUsyP0&ab_channel=GOTOConferences
● Microservices at Netflix Scale
https://www.youtube.com/watch?v=57UK46qfBLY&ab_channel=GOTOConferences
References - Talks
Mapan © Copyright 2020
Q&A
1 of 49

Recommended

My Ph.D. Defense - Software-Defined Systems for Network-Aware Service Compos... by
 My Ph.D. Defense - Software-Defined Systems for Network-Aware Service Compos... My Ph.D. Defense - Software-Defined Systems for Network-Aware Service Compos...
My Ph.D. Defense - Software-Defined Systems for Network-Aware Service Compos...Pradeeban Kathiravelu, Ph.D.
493 views38 slides
Cloud Computing - Everything you wanted to know! by
Cloud Computing - Everything you wanted to know!Cloud Computing - Everything you wanted to know!
Cloud Computing - Everything you wanted to know!Debasish Patra
1.2K views58 slides
Distilling the monolith to microservices journey at CMG by
Distilling the monolith to microservices journey at CMGDistilling the monolith to microservices journey at CMG
Distilling the monolith to microservices journey at CMGBuchi Reddy Busi Reddy
58 views21 slides
Cloud Computing - An Introduction by
Cloud Computing - An IntroductionCloud Computing - An Introduction
Cloud Computing - An IntroductionRavindra Dastikop
3.6K views108 slides
IRJET- Cloud Computing: Security Issues Challenges and Solution by
IRJET-  	  Cloud Computing: Security Issues Challenges and SolutionIRJET-  	  Cloud Computing: Security Issues Challenges and Solution
IRJET- Cloud Computing: Security Issues Challenges and SolutionIRJET Journal
30 views5 slides
2019 04-25-agile communitymeetup-essentialcapabilitiesbehindmicroservices by
2019 04-25-agile communitymeetup-essentialcapabilitiesbehindmicroservices2019 04-25-agile communitymeetup-essentialcapabilitiesbehindmicroservices
2019 04-25-agile communitymeetup-essentialcapabilitiesbehindmicroservicesKim Kao
223 views66 slides

More Related Content

Similar to The_Story_of_Microservices_YAI_KALBIS.pdf

IRJET - Cloud Computing Application by
IRJET -  	  Cloud Computing ApplicationIRJET -  	  Cloud Computing Application
IRJET - Cloud Computing ApplicationIRJET Journal
10 views8 slides
Martin Chamambo - High Level Design-SDN BASED OPENSTACK IMPLEMENTATION IN ZIM... by
Martin Chamambo - High Level Design-SDN BASED OPENSTACK IMPLEMENTATION IN ZIM...Martin Chamambo - High Level Design-SDN BASED OPENSTACK IMPLEMENTATION IN ZIM...
Martin Chamambo - High Level Design-SDN BASED OPENSTACK IMPLEMENTATION IN ZIM...Martin Chamambo
690 views12 slides
2019 03-23-2nd-meetup-essential capabilities behind microservices by
2019 03-23-2nd-meetup-essential capabilities behind microservices2019 03-23-2nd-meetup-essential capabilities behind microservices
2019 03-23-2nd-meetup-essential capabilities behind microservicesKim Kao
880 views62 slides
How to Evaluate, Rollout and Operationalize Your SD-WAN Projects by
How to Evaluate, Rollout and Operationalize Your SD-WAN ProjectsHow to Evaluate, Rollout and Operationalize Your SD-WAN Projects
How to Evaluate, Rollout and Operationalize Your SD-WAN ProjectsThousandEyes
235 views18 slides
Secure Access – Anywhere by Prisma, PaloAlto by
Secure Access – Anywhere by Prisma, PaloAltoSecure Access – Anywhere by Prisma, PaloAlto
Secure Access – Anywhere by Prisma, PaloAltoPrime Infoserv
747 views28 slides
Making Money in the Cloud by
Making Money in the CloudMaking Money in the Cloud
Making Money in the CloudGravitant, Inc.
1.9K views25 slides

Similar to The_Story_of_Microservices_YAI_KALBIS.pdf(20)

IRJET - Cloud Computing Application by IRJET Journal
IRJET -  	  Cloud Computing ApplicationIRJET -  	  Cloud Computing Application
IRJET - Cloud Computing Application
IRJET Journal10 views
Martin Chamambo - High Level Design-SDN BASED OPENSTACK IMPLEMENTATION IN ZIM... by Martin Chamambo
Martin Chamambo - High Level Design-SDN BASED OPENSTACK IMPLEMENTATION IN ZIM...Martin Chamambo - High Level Design-SDN BASED OPENSTACK IMPLEMENTATION IN ZIM...
Martin Chamambo - High Level Design-SDN BASED OPENSTACK IMPLEMENTATION IN ZIM...
Martin Chamambo690 views
2019 03-23-2nd-meetup-essential capabilities behind microservices by Kim Kao
2019 03-23-2nd-meetup-essential capabilities behind microservices2019 03-23-2nd-meetup-essential capabilities behind microservices
2019 03-23-2nd-meetup-essential capabilities behind microservices
Kim Kao880 views
How to Evaluate, Rollout and Operationalize Your SD-WAN Projects by ThousandEyes
How to Evaluate, Rollout and Operationalize Your SD-WAN ProjectsHow to Evaluate, Rollout and Operationalize Your SD-WAN Projects
How to Evaluate, Rollout and Operationalize Your SD-WAN Projects
ThousandEyes235 views
Secure Access – Anywhere by Prisma, PaloAlto by Prime Infoserv
Secure Access – Anywhere by Prisma, PaloAltoSecure Access – Anywhere by Prisma, PaloAlto
Secure Access – Anywhere by Prisma, PaloAlto
Prime Infoserv747 views
How to Evaluate, Rollout, and Operationalize Your SD-WAN Projects by ThousandEyes
How to Evaluate, Rollout, and Operationalize Your SD-WAN ProjectsHow to Evaluate, Rollout, and Operationalize Your SD-WAN Projects
How to Evaluate, Rollout, and Operationalize Your SD-WAN Projects
ThousandEyes133 views
Cloud Computing by Arwa
Cloud ComputingCloud Computing
Cloud Computing
Arwa 17.9K views
Unit 1.2 move to cloud computing by eShikshak
Unit 1.2   move to cloud computingUnit 1.2   move to cloud computing
Unit 1.2 move to cloud computing
eShikshak870 views
A Brief Introduction to Cloud Computing by IRJET Journal
A Brief Introduction to Cloud ComputingA Brief Introduction to Cloud Computing
A Brief Introduction to Cloud Computing
IRJET Journal4 views
First Tech: From bricks and mortar to cloud first api driven banking by Dynatrace
First Tech: From bricks and mortar to cloud first api driven bankingFirst Tech: From bricks and mortar to cloud first api driven banking
First Tech: From bricks and mortar to cloud first api driven banking
Dynatrace154 views
Oracle Open World 2018 - Cloud Lift Accelerator Suite by Ike Aniagoh
Oracle Open World 2018 - Cloud Lift Accelerator SuiteOracle Open World 2018 - Cloud Lift Accelerator Suite
Oracle Open World 2018 - Cloud Lift Accelerator Suite
Ike Aniagoh167 views
The Ultimate Guide to Cloud Migration - A Whitepaper by RapidValue by RapidValue
The Ultimate Guide to Cloud Migration - A Whitepaper by RapidValueThe Ultimate Guide to Cloud Migration - A Whitepaper by RapidValue
The Ultimate Guide to Cloud Migration - A Whitepaper by RapidValue
RapidValue325 views
A New Approach to Continuous Monitoring in the Cloud by NETSCOUT
A New Approach to Continuous Monitoring in the CloudA New Approach to Continuous Monitoring in the Cloud
A New Approach to Continuous Monitoring in the Cloud
NETSCOUT1.3K views
Introduction to Could computing & its Growth in India by Ajay Ghawte
Introduction to Could computing & its Growth in IndiaIntroduction to Could computing & its Growth in India
Introduction to Could computing & its Growth in India
Ajay Ghawte392 views
IRJET- Cloud Computing Review by IRJET Journal
IRJET-  	  Cloud Computing ReviewIRJET-  	  Cloud Computing Review
IRJET- Cloud Computing Review
IRJET Journal25 views
Redefining Perspectives 12th edition Session 1 by sapientindia
Redefining Perspectives 12th edition Session 1Redefining Perspectives 12th edition Session 1
Redefining Perspectives 12th edition Session 1
sapientindia321 views
Accelerating a Path to Digital with a Cloud Data Strategy by MongoDB
Accelerating a Path to Digital with a Cloud Data StrategyAccelerating a Path to Digital with a Cloud Data Strategy
Accelerating a Path to Digital with a Cloud Data Strategy
MongoDB800 views

More from Tonny Adhi Sabastian

Introduction to Open Telemetry as Observability Library by
Introduction to Open  Telemetry as Observability LibraryIntroduction to Open  Telemetry as Observability Library
Introduction to Open Telemetry as Observability LibraryTonny Adhi Sabastian
121 views25 slides
Adopting Open Telemetry as Distributed Tracer on your Microservices at Kubern... by
Adopting Open Telemetry as Distributed Tracer on your Microservices at Kubern...Adopting Open Telemetry as Distributed Tracer on your Microservices at Kubern...
Adopting Open Telemetry as Distributed Tracer on your Microservices at Kubern...Tonny Adhi Sabastian
227 views22 slides
Delivering High Quality Elixir Code using Gitlab by
Delivering High Quality Elixir Code using GitlabDelivering High Quality Elixir Code using Gitlab
Delivering High Quality Elixir Code using GitlabTonny Adhi Sabastian
98 views29 slides
Single Sign On (SSO) Services with Free/Open Source Software by
Single Sign On (SSO) Services with Free/Open Source SoftwareSingle Sign On (SSO) Services with Free/Open Source Software
Single Sign On (SSO) Services with Free/Open Source SoftwareTonny Adhi Sabastian
3K views31 slides
Software Delivery Pipeline by
Software Delivery PipelineSoftware Delivery Pipeline
Software Delivery PipelineTonny Adhi Sabastian
354 views22 slides
DevOps Culture and Principles by
DevOps Culture and PrinciplesDevOps Culture and Principles
DevOps Culture and PrinciplesTonny Adhi Sabastian
822 views29 slides

More from Tonny Adhi Sabastian(14)

Introduction to Open Telemetry as Observability Library by Tonny Adhi Sabastian
Introduction to Open  Telemetry as Observability LibraryIntroduction to Open  Telemetry as Observability Library
Introduction to Open Telemetry as Observability Library
Adopting Open Telemetry as Distributed Tracer on your Microservices at Kubern... by Tonny Adhi Sabastian
Adopting Open Telemetry as Distributed Tracer on your Microservices at Kubern...Adopting Open Telemetry as Distributed Tracer on your Microservices at Kubern...
Adopting Open Telemetry as Distributed Tracer on your Microservices at Kubern...
Single Sign On (SSO) Services with Free/Open Source Software by Tonny Adhi Sabastian
Single Sign On (SSO) Services with Free/Open Source SoftwareSingle Sign On (SSO) Services with Free/Open Source Software
Single Sign On (SSO) Services with Free/Open Source Software
Cloud Services On UI and Ideas for Federated Cloud on idREN by Tonny Adhi Sabastian
Cloud Services On UI and Ideas for Federated Cloud on idRENCloud Services On UI and Ideas for Federated Cloud on idREN
Cloud Services On UI and Ideas for Federated Cloud on idREN
Towards universitas indonesia_next_generation_firewall_service by Tonny Adhi Sabastian
Towards universitas indonesia_next_generation_firewall_serviceTowards universitas indonesia_next_generation_firewall_service
Towards universitas indonesia_next_generation_firewall_service
Kreatif Dengan Piranti Keras Open Source Raspberry Pi by Tonny Adhi Sabastian
Kreatif Dengan Piranti Keras Open Source Raspberry PiKreatif Dengan Piranti Keras Open Source Raspberry Pi
Kreatif Dengan Piranti Keras Open Source Raspberry Pi

Recently uploaded

unit 1.pptx by
unit 1.pptxunit 1.pptx
unit 1.pptxrrbornarecm
5 views53 slides
GPS Survery Presentation/ Slides by
GPS Survery Presentation/ SlidesGPS Survery Presentation/ Slides
GPS Survery Presentation/ SlidesOmarFarukEmon1
7 views13 slides
GDSC Mikroskil Members Onboarding 2023.pdf by
GDSC Mikroskil Members Onboarding 2023.pdfGDSC Mikroskil Members Onboarding 2023.pdf
GDSC Mikroskil Members Onboarding 2023.pdfgdscmikroskil
72 views62 slides
Details of Acoustic Liner for selection of material by
Details of Acoustic Liner for selection of materialDetails of Acoustic Liner for selection of material
Details of Acoustic Liner for selection of materialrafiqalisyed
5 views1 slide
2023-12 Emarei MRI Tool Set E2I0501ST (TQ).pdf by
2023-12 Emarei MRI Tool Set E2I0501ST (TQ).pdf2023-12 Emarei MRI Tool Set E2I0501ST (TQ).pdf
2023-12 Emarei MRI Tool Set E2I0501ST (TQ).pdfPhilipp Daum
5 views2 slides
Ansari: Practical experiences with an LLM-based Islamic Assistant by
Ansari: Practical experiences with an LLM-based Islamic AssistantAnsari: Practical experiences with an LLM-based Islamic Assistant
Ansari: Practical experiences with an LLM-based Islamic AssistantM Waleed Kadous
12 views29 slides

Recently uploaded(20)

GDSC Mikroskil Members Onboarding 2023.pdf by gdscmikroskil
GDSC Mikroskil Members Onboarding 2023.pdfGDSC Mikroskil Members Onboarding 2023.pdf
GDSC Mikroskil Members Onboarding 2023.pdf
gdscmikroskil72 views
Details of Acoustic Liner for selection of material by rafiqalisyed
Details of Acoustic Liner for selection of materialDetails of Acoustic Liner for selection of material
Details of Acoustic Liner for selection of material
rafiqalisyed5 views
2023-12 Emarei MRI Tool Set E2I0501ST (TQ).pdf by Philipp Daum
2023-12 Emarei MRI Tool Set E2I0501ST (TQ).pdf2023-12 Emarei MRI Tool Set E2I0501ST (TQ).pdf
2023-12 Emarei MRI Tool Set E2I0501ST (TQ).pdf
Philipp Daum5 views
Ansari: Practical experiences with an LLM-based Islamic Assistant by M Waleed Kadous
Ansari: Practical experiences with an LLM-based Islamic AssistantAnsari: Practical experiences with an LLM-based Islamic Assistant
Ansari: Practical experiences with an LLM-based Islamic Assistant
M Waleed Kadous12 views
Solution Challenge Introduction.pptx by GDSCCEC
Solution Challenge Introduction.pptxSolution Challenge Introduction.pptx
Solution Challenge Introduction.pptx
GDSCCEC13 views
Unlocking Research Visibility.pdf by KhatirNaima
Unlocking Research Visibility.pdfUnlocking Research Visibility.pdf
Unlocking Research Visibility.pdf
KhatirNaima11 views
MODULE-1 CHAPTER 3- Operators - Object Oriented Programming with JAVA by Demian Antony D'Mello
MODULE-1 CHAPTER 3- Operators - Object Oriented Programming with JAVAMODULE-1 CHAPTER 3- Operators - Object Oriented Programming with JAVA
MODULE-1 CHAPTER 3- Operators - Object Oriented Programming with JAVA
Programmable Logic Devices : SPLD and CPLD by Usha Mehta
Programmable Logic Devices : SPLD and CPLDProgrammable Logic Devices : SPLD and CPLD
Programmable Logic Devices : SPLD and CPLD
Usha Mehta27 views
Design_Discover_Develop_Campaign.pptx by ShivanshSeth6
Design_Discover_Develop_Campaign.pptxDesign_Discover_Develop_Campaign.pptx
Design_Discover_Develop_Campaign.pptx
ShivanshSeth656 views
ASSIGNMENTS ON FUZZY LOGIC IN TRAFFIC FLOW.pdf by AlhamduKure
ASSIGNMENTS ON FUZZY LOGIC IN TRAFFIC FLOW.pdfASSIGNMENTS ON FUZZY LOGIC IN TRAFFIC FLOW.pdf
ASSIGNMENTS ON FUZZY LOGIC IN TRAFFIC FLOW.pdf
AlhamduKure10 views
REPORT Data Science EXPERT LECTURE.doc by Parulkhatri11
REPORT Data Science EXPERT LECTURE.docREPORT Data Science EXPERT LECTURE.doc
REPORT Data Science EXPERT LECTURE.doc
Parulkhatri117 views
taylor-2005-classical-mechanics.pdf by ArturoArreola10
taylor-2005-classical-mechanics.pdftaylor-2005-classical-mechanics.pdf
taylor-2005-classical-mechanics.pdf
ArturoArreola1037 views

The_Story_of_Microservices_YAI_KALBIS.pdf

  • 1. Mapan © Copyright 2020 The Story of Microservices August 21st. 2021
  • 2. Mapan © Copyright 2020 Agenda of Content 01. About Me 02. In the beginning, Distributed System 03. Distributed System Architecture (and SOA) 04. And there is Microservices 05. Migrating into Microservices 06. Do you need Microservices ? 07. Q&A z
  • 3. Mapan © Copyright 2020 ● 13+ years of experience on IT Industry and Education ● Senior DevOps Engineer - former Solution Architect at MAPAN ( GoTo Group) since 2018 ○ We’re hiring, please visit https://www.career.mapan.id/ ○ Send your CV to mapan-recruitment@gojek.com ○ Interest in our DevOps engineering ? PM me ● Former Lead Engineer - Universitas Indonesia Data Center (2012 - 2018) ● Former Lecturer at Faculty of Computer Science - Universitas Indonesia between (2014 - 2018) ○ Teaching Subject : System Programming, Modern IT Infrastructure, Distributed System ● Former volunteer system administrator for kambing.ui.ac.id (now defunct), one of the largest of national Free/Open Source Software repository (2009-2018) ● Co-founding two startups during (2012 - 2015) , now defunct ● Contact : tonny.sabastian@gojek.com / tonny@segmentationfault.xyz About Me
  • 4. Mapan © Copyright 2020 In the beginning, - Distributed System -
  • 5. Mapan © Copyright 2020 What are Distributed Systems ? Can you give an example ?
  • 6. Mapan © Copyright 2020 The Definition of a Distributed System Distributed system is a collection of independent nodes but appears to user as a single coherent system Facebook, Youtube, GMail, Twitter, GitHub, WhatsApp, …... NFS, GFS, Ceph, Orange FS AWS S3, Openstack Swift RabbitMQ, ZeroMQ, MQTT, Kafka Docker Swarm , AWS EC2, Kubernetes Apache Mesos, Kubernetes Files & Dirs put, get, delete enq, deq tasks orchestration Networking Layer ( IP, TCP, UDP, socket, HTTP) OS Layer
  • 7. Mapan © Copyright 2020 ● Transparency ○ Your Pokemon Go Client doesnʼt have to know exactly which game server is spawning your rare MewTwo ● Scalability ○ Content Delivery Network is an example of bandwidth and compute power aggregation ○ The instruction needed to schedule your Smart Lamp at home is queued somewhere within Google PubSub, which is a disk aggregation ○ Which scales we are talking about ? Each of mentioned service might be run on some 20 - 30k machines ● Availability ○ Build a reliable system from unreliable system (ex : network can fail, hardware can fail, software may have bugs) ○ Resiliency & Robustness to maintain 99.999999999999% uptime Why we built distributed system ?
  • 8. Mapan © Copyright 2020 ● Modularity ○ Your application is splitted into many smaller parts. ○ Some part perhaps already exist and can be directly deployed ○ Some part are harder to implement Why we built distributed system ?
  • 9. Mapan © Copyright 2020 ● Challenges ○ System Design is Challenging ○ Achieving Scalability is Challenging ○ Consistency - Wait my transaction have not been propagated ○ Security - Somebody breach into my customer data via my unprotected AWS S3 for images ○ Fault Tolerance - My authentication is down and my client cannot upload their videos ● Distributed System Fallacy ● Microservices are harder to handle Distributed System is Hard
  • 10. Mapan © Copyright 2020 Distributed System Architecture (and SOA)
  • 11. Mapan © Copyright 2020 ● Itʼs a macroscopic view of a system structure ○ How responsibilities are assigned and divided ○ How contract between system are stated and implemented ○ How connector can be placed between systems ● Architecture is essential . It will influenced on how fast we adapt to changes and how much our cost will be spend for those changes What is an Architecture ?
  • 12. Mapan © Copyright 2020 Common Architecture Pattern Tiered Architecture Remote Method Invocation Event Driven Peer to Peer Shared Memory / Storage
  • 13. Mapan © Copyright 2020 Example Architecture of a Web Apps Discuss each layers ● What constitutes it ? ● What does it do ? ● Hardware Requirements ● or Cloud Service Equivalents ● Deployment choices ● Glue / Interconnection
  • 14. Mapan © Copyright 2020 SOA - Service Oriented Architecture
  • 15. Mapan © Copyright 2020 SOA - Service Communication & Orchestration In order to get meaningful result, service talk to others via sets of contracts and the result is orchestrated before presented to user Service Talk via Contracts Service Orchestration
  • 16. Mapan © Copyright 2020 SOA - Example - Travel Agent Service
  • 17. Mapan © Copyright 2020 Here Comes Microservices
  • 18. Mapan © Copyright 2020 Meme Time !!!
  • 19. Mapan © Copyright 2020 What is Microservices ? Microservices are independently deployable services modeled around a business domain. They communicate with each other via networks…...They are a type of service-oriented architecture (SOA), albeit one that is opinionated about how service boundaries should be drawn, and that independent deployability is key. Martin Fowler Sam Newman
  • 20. Mapan © Copyright 2020 Microservices Characteristic
  • 21. Mapan © Copyright 2020 Microservices Architecture Style Infrastructure Style ● API Gateway ● Service Mesh ● Containerization ● Service Discovery ● Circuit Breaker ● Configuration Repository ● Event Bus / Streams Software Style ● Hexagonal Architecture ● Domain Driven Design ● Event Sourcing ● CQRS ● Functional Reactive Programming Let’s take a look into some of the styles mentioned above
  • 22. Mapan © Copyright 2020 API Gateway & Service Mesh (a)API Gateway & Service Mesh source : Building Microservices, 2nd Edition, Sam Newman (b) API Gateway Functionality source : https://microservices.io/patterns/apigateway.html
  • 23. Mapan © Copyright 2020 Containerization (a)Container Packaging source : Building Microservices, 2nd Edition, Sam Newman (b)Container Orchestration source : Building Microservices, 2nd Edition, Sam Newman
  • 24. Mapan © Copyright 2020 Event Bus / Stream (a)PubSub Pattern via Event Bus source : Building Microservices, 2nd Edition, Sam Newman (b)Event Payload source : Building Microservices, 2nd Edition, Sam Newman
  • 25. Mapan © Copyright 2020 Domain Driven Design (a)Services are being abstracted from domain boundary context source : Building Microservices, 2nd Edition, Sam Newman (b)Information hiding between domain source : Building Microservices, 2nd Edition, Sam Newman
  • 26. Mapan © Copyright 2020 Command Query Responsibility Segregation Read Only Database to Segregate Event (Query) From Multiple Services source : https://microservices.io/patterns/data/cqrs.html
  • 27. Mapan © Copyright 2020 Migrating into Microservices
  • 28. Mapan © Copyright 2020 In the beginning, there was monolith But, not these monolith
  • 29. Mapan © Copyright 2020 Example : Payment Gateway (2) Monolith Payment Gateway HTTP Payment Partner Merchant Transaction Member DB Cash
  • 30. Mapan © Copyright 2020 Example : Payment Gateway (2) Monolith Payment Gateway Payment Partner Merchant Transaction Member DB Cash Payment API HTTP
  • 31. Mapan © Copyright 2020 Example : Payment Gateway (3) Payment Partner Transaction DB Cash Payment API HTTP Wallet Service Member Service Merchant Service
  • 32. Mapan © Copyright 2020 Example : Payment Gateway (4) Payment Partner DB Payment API HTTP Member Service Merchant Service Cash Service Transaction Service
  • 33. Mapan © Copyright 2020 Example : Payment Gateway (5) Payment Partner DB Payment API HTTP Member Service Merchant Service Cash Service Card Service Voucher Service
  • 34. Mapan © Copyright 2020 Example : Payment Gateway (6) Payment Partner DB Payment API HTTP Member Service Merchant Service Cash Service Card Service Voucher Service DB DB DB DB
  • 35. Mapan © Copyright 2020 Example : Payment Gateway (7) Payment Partner Payment API HTTP Member Service Merchant Service Cash Service Card Service Voucher Service DB DB DB DB DB Event Bus (ex: Kafka) Aggregat or Service DB
  • 36. Mapan © Copyright 2020 Do you need Microservices ?
  • 37. Mapan © Copyright 2020 Meme Time !!!
  • 38. Mapan © Copyright 2020 Meme Time !!!
  • 39. Mapan © Copyright 2020 Microservices Merit and Demerit (Arguable) Merit ● Faster time to market ● Scaling - Based on Component ● Robustness and Resiliency ● Ease of Deployment - Independent Deployability ● Strong System Boundaries ● Adapting to Technology Diversities De-Merit ● Distributed - choose two from these three : Consistency - Availability - Partition ● More complex to operate ○ Most likely you’ll need infrastructure automation and DevOps ○ Observability and not just Monitoring ● Costly ● Technology Overload - Over-engineering ● Developer Experience can be painful ● Testing is harder ● Security can also be painful
  • 40. Mapan © Copyright 2020 Organizing Your Team
  • 41. Mapan © Copyright 2020 Deploying Your Services - DevOps CI/CD Pipeline
  • 42. Mapan © Copyright 2020 Observe All The Things Monitoring Tracing Logging Do you know what your codes are doing on 2AM when your cash payment service is down ?
  • 43. Mapan © Copyright 2020 Work your assessment and try to answer the following questions : ● What we want to achieve and how we want to achieve it ? ● Do we have strong definition on businesses domain ? ● How did we organize our team ? - (People over Processes over Tools) ● Do our team can adapt quickly to technological changes and technical diversities ? ● Can we facilitate our team when they building things ? ● Can we observe clearly on what happening to our system ? Microservices is an architectural approach, not the architectural approach. Your own context should play a huge part in your decision whether to go down that path. Should We Use Microservices ?
  • 44. Mapan © Copyright 2020 Enjoy The Journey
  • 45. Mapan © Copyright 2020 Examples & References
  • 46. Mapan © Copyright 2020 ● Google Microservices Demo : https://github.com/GoogleCloudPlatform/microservices-demo ● WeaveWorks Microservices Demo : https://github.com/microservices-demo/microservices-demo ● Bookinfo : https://istio.io/latest/docs/examples/bookinfo/ ● Code Instrumentation : https://github.com/tonnyadhi/distributed-tracing-example Code Examples
  • 47. Mapan © Copyright 2020 ● Distributed Systems , 3rd Edition, Andrew Tanenbaum ● Building Microservices, 2nd Edition, Sam Newman ● Monolith to Microservices, Sam Newman ● Patterns of Enterprise Application Architecture, Martin Fowler ● Microservices Pattern, Chris Richardson References - Books
  • 48. Mapan © Copyright 2020 ● Monolith Decomposition - Sam Newman https://www.youtube.com/watch?v=9I9GdSQ1bbM&ab_channel=GOTOConferences ● Design Microservices Architecture https://www.youtube.com/watch?v=j6ow-UemzBc&ab_channel=InfoQ ● Microservices - Martin Fowler https://www.youtube.com/watch?v=wgdBVIX9ifA&ab_channel=GOTOConferences ● Event Driven Architecture - Martin Fowler https://www.youtube.com/watch?v=STKCRSUsyP0&ab_channel=GOTOConferences ● Microservices at Netflix Scale https://www.youtube.com/watch?v=57UK46qfBLY&ab_channel=GOTOConferences References - Talks
  • 49. Mapan © Copyright 2020 Q&A