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
Rails Engines as a way to Micro Services
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Lucas André de Alencar
September 24, 2016
Programming
210
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Rails Engines as a way to Micro Services
Talk presented at Rubyconf Brasil 2016
Lucas André de Alencar
September 24, 2016
More Decks by Lucas André de Alencar
See All by Lucas André de Alencar
Construindo aplicação Rails preparadas para uma arquitetura de Micro serviços
lucasandre
1
920
Melhorando a qualidade derrotando um mutante por vez
lucasandre
2
380
Fiz um seminário sobre produtividade e olha no que deu!
lucasandre
0
74
REST APIs on Rails (v2)
lucasandre
0
210
Devs dando pitacos - Trilha UX Design - TDC 2016
lucasandre
0
110
Email Authentication && The Hidden Email Battle
lucasandre
0
80
REST APIs on Rails
lucasandre
4
290
Other Decks in Programming
See All in Programming
Observability in Practice:Grafana 與 Edge Device SRE 的那些事
blueswen
0
120
net-httpのHTTP/2対応について
naruse
0
440
気づいたらRubyで100作品 ー クリエイティブコーディングが生活の一部になるまで / 100 Ruby Sketches Later: How Creative Coding Became Part of My Life
chobishiba
3
540
JJUG CCC 2026 Spring: JSpecify で実現する Kotlin フレンドリーな Java API 設計
ternbusty
1
140
PHPで使える日時の表現と、その知り方 #frontend_phpcon_do
o0h
PRO
0
190
Old Dog, New Tricks: The Java 25 Reinvention - JNation
bazlur_rahman
0
140
AI駆動開発で崩れていくコードベースを立て直す
kyoko_nr_nr
1
440
These Five Tricks Can Make Your Apps Greener, Cheaper, & Nicer
hollycummins
0
270
エージェンティックRAGにAWSで入門しよう!
har1101
7
1.1k
Language Server 使ってる? 〜VSCode と Zed の場合〜 / Are you using a Language Server? ~For VS Code and Zed~
handlename
0
750
[2026年度第1回ORセミナー] 計画最適化ベンチャーと競技プログラミング人材
terryu16
0
250
Make SRE Operations Easier with Azure SRE Agent
kkamegawa
0
4.1k
Featured
See All Featured
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.3k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
Leo the Paperboy
mayatellez
7
1.8k
RailsConf 2023
tenderlove
30
1.5k
Navigating Weather and Climate Data
rabernat
0
210
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.6k
VelocityConf: Rendering Performance Case Studies
addyosmani
333
25k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
350
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
770
Ruling the World: When Life Gets Gamed
codingconduct
0
250
We Have a Design System, Now What?
morganepeng
55
8.2k
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
1
340
Transcript
RAILS ENGINES MICRO SERVICES AS A WAY TO
LUCAS ALENCAR @lucasalencar @alencar.lucas.a @lucasandre
None
None
None
None
MONOLITHIC ARCHITECTURE
LEVEL OF ABSTRACTION WE ARE MAYBE MISSING A
CLASSES METHODS MODULES ????????
CLASSES METHODS MODULES SERVICES
MICRO SERVICES
I HATE DEVOPS!
I’M LAZY…
RAILS ENGINES
MICRO SERVICES STARTS AT CODE
DECOUPLING STARTS AT CODE
RAILS ENGINES ARE NOT MICRO SERVICES
RAILS ENGINES ARE NOT MICRO SERVICES (YET)
IMPROVED Communication Collaboration Creation Maintenance Comprehension
RD STATION EMAIL MARKETING LANDING PAGES SOCIAL MEDIA POSTS MARKETING
BI LEADS MANAGEMENT SEGMENTATION
EMAIL MARKETING LANDING PAGES SOCIAL MEDIA POSTS LEADS MANAGEMENT SEGMENTATION
LEADS IMPORT MARKETING AUTOMATION EMAILS CUSTOM FIELDS SOCIAL MEDIAS DASHBOARD
EMAIL MARKETING LANDING PAGES SOCIAL MEDIA POSTS LEADS MANAGEMENT SEGMENTATION
LEADS IMPORT MARKETING AUTOMATION EMAILS CUSTOM FIELDS SOCIAL MEDIAS DASHBOARD
EMAIL MARKETING LANDING PAGES SOCIAL MEDIA POSTS LEADS MANAGEMENT SEGMENTATION
LEADS IMPORT MARKETING AUTOMATION EMAILS CUSTOM FIELDS SOCIAL MEDIAS DASHBOARD
EMAIL MARKETING LANDING PAGES SOCIAL MEDIA POSTS LEADS MANAGEMENT SEGMENTATION
LEADS IMPORT MARKETING AUTOMATION EMAILS CUSTOM FIELDS SOCIAL MEDIAS DASHBOARD
EMAIL MARKETING LANDING PAGES SOCIAL MEDIA POSTS LEADS MANAGEMENT SEGMENTATION
LEADS IMPORT MARKETING AUTOMATION EMAILS CUSTOM FIELDS SOCIAL MEDIAS DASHBOARD
EMAIL MARKETING LANDING PAGES SOCIAL MEDIA POSTS LEADS MANAGEMENT SEGMENTATION
LEADS IMPORT MARKETING AUTOMATION EMAILS CUSTOM FIELDS SOCIAL MEDIAS DASHBOARD
EMAIL MARKETING LANDING PAGES SOCIAL MEDIA POSTS LEADS MANAGEMENT SEGMENTATION
LEADS IMPORT MARKETING AUTOMATION EMAILS CUSTOM FIELDS SOCIAL MEDIAS DASHBOARD
ARE FREE* RAILS ENGINES * Sort of…
HOW CAN I DO IT?
~/code rails plugin new engines/engineX --mountable create create README.rdoc create
Rakefile create engine_x.gemspec create MIT-LICENSE create .gitignore create Gemfile create app create app/controllers/engine_x/application_controller.rb create app/helpers/engine_x/application_helper.rb create app/mailers create app/models create app/views/layouts/engine_x/application.html.erb create app/assets/images/engine_x create app/assets/images/engine_x/.keep create config/routes.rb create lib/engine_x.rb create lib/tasks/engine_x_tasks.rake
SINGLE REPOSITORY MULTIPLE REPOSITORIES
. ├── app ├── bin ├── config ├── db ├──
engines │ ├── engineX │ ├── engineY │ └── engineZ ├── lib ├── public ├── test └── tmp
1 source 'https://rubygems.org' 2 3 path './engines' do 4 gem
'engineX' 5 gem 'engineY' 6 gem 'engineZ' 7 end 8 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ NORMAL Gemfile
WHY NOT USE OUR GOOD OLD GEMS?
. ├── app ├── config └── engines └── engineX ├──
app │ ├── controllers │ ├── helpers │ ├── models │ └── views ├── config │ └── routes.rb ├── Gemfile └── engine_x.gemspec
WHAT GOES INSIDE AN ENGINE? CODE TESTS DUMMY APP FOR
TESTS (AUTOMATED AND MANUAL) DATA MIGRATIONS ROUTES
1 module EngineX 2 class Engine < ::Rails::Engine 3 isolate_namespace
EngineX 4 end 5 end ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ NORMAL lib/engine_x/engine.rb
1 module EngineX 2 class Engine < ::Rails::Engine 3 isolate_namespace
EngineX 4 end 5 end ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ NORMAL lib/engine_x/engine.rb
1 module EngineX 2 class Engine < ::Rails::Engine 3 isolate_namespace
EngineX 4 end 5 end ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ NORMAL lib/engine_x/engine.rb
1 module EngineX 2 class Engine < ::Rails::Engine 3 isolate_namespace
EngineX 4 end 5 end ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ NORMAL lib/engine_x/engine.rb
AVOID CIRCULAR DEPENDENCIES
MAIN APP ENGINE
MAIN APP ENGINE
MICRO SERVICE? HOW A RAILS ENGINE CAN BECOME A
RD STATION DB EMAIL MARKETING LANDING PAGES
RD STATION DB EMAIL MARKETING LANDING PAGES email_marketing_* landing_pages_*
RD STATION EMAIL MARKETING DB EMAIL MARKETING LANDING PAGES email_marketing_*
landing_pages_* LANDING PAGES DB
WHY SHOULD I USE RAILS ENGINES INSTEAD OF GOING ALL
THE WAY TO MICRO SERVICES ?
WHY SHOULD I USE RAILS ENGINES INSTEAD OF GOING ALL
THE WAY TO MICRO SERVICES ?
RAILS ENGINES MICRO SERVICES AS A WAY TO
Thanks LUCAS ALENCAR we’re hiring! bit.ly/2dofWZj
[email protected]
shipit.resultadosdigitais.com.br