Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Monolith to Event-Driven Microservices
Search
Eko Kurniawan Khannedy
August 06, 2019
Technology
1
240
Monolith to Event-Driven Microservices
Software Architecture Conference
Eko Kurniawan Khannedy
August 06, 2019
Tweet
Share
More Decks by Eko Kurniawan Khannedy
See All by Eko Kurniawan Khannedy
Refactoring
khannedy
0
300
Multi-Datacenter Kafka at Blibli.com
khannedy
2
1.5k
QA Tools - Research and Development
khannedy
0
270
Reactive Puzzle
khannedy
0
190
Event-Driven Architecture
khannedy
1
1.8k
Resilience Engineering with Hystrix and Spring
khannedy
1
550
Mocking for Unit Test using Mockito
khannedy
1
320
Centralized Configuration using Consul and Spring Cloud
khannedy
2
630
Validation Best Practice
khannedy
2
1.2k
Other Decks in Technology
See All in Technology
CDCL による厳密解法を採用した MILP ソルバー
imai448
3
170
Amazon CloudWatch Network Monitor のススメ
yuki_ink
1
210
Amplify Gen2 Deep Dive / バックエンドの型をいかにしてフロントエンドへ伝えるか #TSKaigi #TSKaigiKansai #AWSAmplifyJP
tacck
PRO
0
390
AWS Lambda のトラブルシュートをしていて思うこと
kazzpapa3
2
180
AIチャットボット開発への生成AI活用
ryomrt
0
170
ExaDB-D dbaascli で出来ること
oracle4engineer
PRO
0
3.9k
強いチームと開発生産性
onk
PRO
35
11k
The Rise of LLMOps
asei
9
1.7k
Application Development WG Intro at AppDeveloperCon
salaboy
0
200
インフラとバックエンドとフロントエンドをくまなく調べて遅いアプリを早くした件
tubone24
1
430
開発生産性を上げながらビジネスも30倍成長させてきたチームの姿
kamina_zzz
2
1.7k
Lambdaと地方とコミュニティ
miu_crescent
2
370
Featured
See All Featured
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
42
9.2k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
6
430
A better future with KSS
kneath
238
17k
KATA
mclloyd
29
14k
The Pragmatic Product Professional
lauravandoore
31
6.3k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
0
110
The Cult of Friendly URLs
andyhume
78
6k
Rebuilding a faster, lazier Slack
samanthasiow
79
8.7k
The Invisible Side of Design
smashingmag
298
50k
4 Signs Your Business is Dying
shpigford
180
21k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
Imperfection Machines: The Place of Print at Facebook
scottboms
265
13k
Transcript
Monolith to Event-Driven Microservices Eko Kurniawan Khannedy
Eko Kurniawan • Senior Principal R&D Engineer at Blibli.com •
10 Years of Experience in IT Industry • Software Architect behind: ◦ Blibli.com New Backend System ◦ Blipay
Agenda • Microservices • Event-Driven Architecture • Hands-On using Java
Microservices
Monolith vs Microservices Application Monolith Microservices
Monolith vs Microservices Deployment Monolith Microservices
Characteristic of Microservices 1. Componentization via Services 2. Organized around
Business Capabilities 3. Products not Projects 4. Smart endpoints and dumb pipes 5. Decentralized Governance 6. Decentralized Data Management 7. Infrastructure Automation 8. Design for failure 9. Evolutionary Design https://martinfowler.com/articles/microservices.html
Componentization via Services Library Service Product Library Shipping Library Product
Service Shipping Service
Organized around Business Capabilities Merchant Product Shipping
Decentralized Data Management MySQL Mongo Elasticsearch
Continuous Delivery Infrastructure Automation Unit Test Integration Test Deploy to
Staging Application Acceptance Test Deploy to Production Post Deploy Test
Design for failure • Monitoring • Circuit Breaker • Chaos
Monkey
How Big is Microservices? • Single Responsibility • Small enough
to fit in in my head • X people per Service
Monolith • Simplicity • Consistency • Easy to Refactor •
Partial Deployment • Availability • Multiple Platform • Easy to Scale Microservices
Event-Driven Architecture
API-Driven Microservices FRONTEND CART SERVICE ORDER SERVICE PAYMENT SERVICE
API-Driven Microservices Problem FRONTEND CART SERVICE ORDER SERVICE PAYMENT SERVICE
NOTIF SERVICE
Event-Driven Microservices FRONTEND CART SERVICE ORDER SERVICE PAYMENT SERVICE NOTIF
SERVICE CART EVENT
Event-Driven Microservices FRONTEND CART SERVICE ORDER SERVICE PAYMENT SERVICE NOTIF
SERVICE CART EVENT FRAUD SERVICE
Event-Driven Microservices Problem FRONTEND CART SERVICE ORDER SERVICE PAYMENT SERVICE
NOTIF SERVICE CART EVENT FRAUD SERVICE
Event-Carried State Transfer FRONTEND CART SERVICE ORDER SERVICE PAYMENT SERVICE
NOTIF SERVICE FULL CART EVENT FRAUD SERVICE CART DETAIL CART DETAIL CART DETAIL CART DETAIL https://martinfowler.com/articles/201701-event-driven.html
API-Driven • Highly-coupled • Centralized business logic • Consistent •
Increase response time • Sync Event-Driven • Decoupling • Decentralized business logic • Eventual consistent • Reduce load on producer • Replicated data • Async
The Challenges of Event-Driven Microservices • Idempoten • Asynchronous •
Message Schema • Versioning • Tracing • Message Order • Consumer Complexity • Message Broker
Hands-On using Java
Tools Required for This Workshop • Java Development Kit version
1.8 or Higher • Apache Maven version 3 • Apache Kafka version 2.3 • MongoDB version 4 • Elasticsearch version 7.2
MonoPay • MonoPay is whitelabel system for e-Wallet • Merchant
can use MonoPay to support e-Wallet feature in their system • MonoPay support member management, topup management, purchase management and point management • MonoPay use monolith architecture
MonoPay Backend System Merchant Module Cash Module Member Module Transaction
Module Mongo DB Partner System HTTP
MonoPay Wallet Project https://github.com/khannedy/monopay-wallet
How to migrate MonoPay to Event-Driven Microservices?
Migrating MonoPay to Microservices MonoPay eWallet Mongo DB Partner System
HTTP MonoPay API
Migrating MonoPay to Microservices MonoPay eWallet Mongo DB Partner System
HTTP MonoPay API MonoPay Merchant
Migrating MonoPay to Microservices MonoPay eWallet Mongo DB Partner System
HTTP MonoPay API MonoPay Merchant MonoPay Member
Migrating MonoPay to Microservices MonoPay eWallet Mongo DB Partner System
HTTP MonoPay API MonoPay Merchant MonoPay Member MonoPay Transaction
Migrating MonoPay to Microservices Mongo DB Partner System HTTP MonoPay
API MonoPay Merchant MonoPay Member MonoPay Transaction MonoPay Cash
Migrating MonoPay to Microservices Mongo DB Partner System HTTP MonoPay
API MonoPay Merchant MonoPay Member MonoPay Transaction MonoPay Cash Mongo DB Mongo DB Mongo DB
How to Integrate between Services?
API-Driven vs Event-Driven
MonoPay Microservices https://github.com/khannedy/monopay-api https://github.com/khannedy/monopay-merchant https://github.com/khannedy/monopay-member https://github.com/khannedy/monopay-transaction https://github.com/khannedy/monopay-cash
Migrating to Event-Driven Microservices Partner System HTTP MonoPay API MonoPay
Merchant MonoPay Member MonoPay Transaction MonoPay Cash KAFKA
One more thing
Migrating to Event-Driven Microservices Partner System HTTP MonoPay API MonoPay
Merchant MonoPay Member MonoPay Transaction MonoPay Cash KAFKA MonoPay Analytic ELASTICSEARCH Kibana Cloud
MonoPay Microservices https://github.com/khannedy/monopay-analytic
Thank You!