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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Eko Kurniawan Khannedy
August 06, 2019
Technology
270
1
Share
Monolith to Event-Driven Microservices
Software Architecture Conference
Eko Kurniawan Khannedy
August 06, 2019
More Decks by Eko Kurniawan Khannedy
See All by Eko Kurniawan Khannedy
Refactoring
khannedy
0
360
Multi-Datacenter Kafka at Blibli.com
khannedy
2
1.5k
QA Tools - Research and Development
khannedy
0
300
Reactive Puzzle
khannedy
0
220
Event-Driven Architecture
khannedy
1
2k
Resilience Engineering with Hystrix and Spring
khannedy
1
580
Mocking for Unit Test using Mockito
khannedy
1
350
Centralized Configuration using Consul and Spring Cloud
khannedy
2
720
Validation Best Practice
khannedy
2
1.3k
Other Decks in Technology
See All in Technology
フルカイテン株式会社 エンジニア向け採用資料
fullkaiten
0
11k
Cursor Subagentsはいいぞ
yug1224
2
130
遊びで始めたNew Relic MCP、気づいたらChatOpsなオブザーバビリティボットができてました/From New Relic MCP to a ChatOps Observability Bot
aeonpeople
1
150
第26回FA設備技術勉強会 - Claude/Claude_codeでデータ分析 -
happysamurai294
0
350
不確実性と戦いながら見積もりを作成するプロセス/mitsumori-process
hirodragon112
1
180
AIにより大幅に強化された AWS Transform Customを触ってみる
0air
0
280
スクラムを支える内部品質の話
iij_pr
0
170
「活動」は激変する。「ベース」は変わらない ~ 4つの軸で捉える_AI時代ソフトウェア開発マネジメント
sentokun
0
140
QA組織のAI戦略とAIテスト設計システムAITASの実践
sansantech
PRO
1
310
Even G2 クイックスタートガイド(日本語版)
vrshinobi1
0
190
バックオフィスPJのPjMをコーポレートITが担うとうまくいく3つの理由
yueda256
1
160
AI時代のIssue駆動開発のススメ
moongift
PRO
0
340
Featured
See All Featured
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
470
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
VelocityConf: Rendering Performance Case Studies
addyosmani
333
25k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
170
Git: the NoSQL Database
bkeepers
PRO
432
67k
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
140
Statistics for Hackers
jakevdp
799
230k
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
140
It's Worth the Effort
3n
188
29k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.2k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
Rails Girls Zürich Keynote
gr2m
96
14k
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!