KEMBAR78
Introduction to microservices (from rails monolith) | PDF
Introduction to
Microservices
❖ Leandro Parazito
❖ twitter.com/parazito
❖ co-organizer @ ruby.floripa.br
❖ software developer @ kmonline.com.br
❖ 23º RubyFloripa, 19 March 2019
Introduction to
Microservices
From Rails Monolith
The year is 2018*
- Rails 3.2.22
- MongoDB 2.6.9
- Available on 3 platforms:
- Web + iOS + Android
* Today: A code base under development for over two years
- Web interface
- API Integration
- APIs consumed by devices
- Financial reports and sync jobs
Application platform / Rails 3.2 / Ruby 2.2
Monolith
application
“Enterprise Applications are often built in
three main parts: a client-side user
interface (consisting of HTML pages and
javascript running in a browser on the user's
machine) a database (consisting of many
tables inserted into a common, and usually
relational, database management system),
and a server-side application.”
❏ James Lewis and Martin Fowler
Microservice application
★ A small and autonomous service
★ Deployment, testing, and monitoring
★ Distributed systems are hard
Who is using
microservices?
● Netflix
● Uber
● Amazon
● eBay
● Twitter
● Spotify
● Soundcloud
*
Monolith scenario
Monolith scenario
Monolith scenario
Monolith scenario
queue for asynchronous messaging
Messages are being published to SNS and enqueued to SQS specified
queue.
Report / service
❖ API
❖ Consume SQS
❖ Generate link
❖ Generate CSV
❖ Upload to S3
❖ Local datastore
❖ Send email (?)
❖ WebSocket (?)
Controller
Pseudo-code
Controller
Pseudo-code
Indiana Golang by Maria Ninfa
It’s time to change!
// worker.go
// worker.go
// worker.go
- Monitoring
- Auto scaling
- Dockerization
- Request tracing
- MonolithFirst
- Microservices
- The Majestic Monolith
- Architecting Rails Apps as Microservices
- Introduction to Microservices
- The Modular Monolith: Rails Architecture
- How to break a Monolith into Microservices
- Pattern: Messaging
- Message Queues
- Bounded Context
●
●
●

Introduction to microservices (from rails monolith)