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
Lucas André de Alencar
September 24, 2016
Programming
0
180
Rails Engines as a way to Micro Services
Talk presented at Rubyconf Brasil 2016
Lucas André de Alencar
September 24, 2016
Tweet
Share
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
780
Melhorando a qualidade derrotando um mutante por vez
lucasandre
2
250
Fiz um seminário sobre produtividade e olha no que deu!
lucasandre
0
54
REST APIs on Rails (v2)
lucasandre
0
180
Devs dando pitacos - Trilha UX Design - TDC 2016
lucasandre
0
91
Email Authentication && The Hidden Email Battle
lucasandre
0
59
REST APIs on Rails
lucasandre
4
270
Other Decks in Programming
See All in Programming
カンファレンスの「アレ」Webでなんとかしませんか? / Conference “thing” Why don't you do something about it on the Web?
dero1to
1
100
みんなでプロポーザルを書いてみた
yuriko1211
0
280
C++でシェーダを書く
fadis
6
4.1k
2024/11/8 関西Kaggler会 2024 #3 / Kaggle Kernel で Gemma 2 × vLLM を動かす。
kohecchi
5
930
Quine, Polyglot, 良いコード
qnighy
4
650
flutterkaigi_2024.pdf
kyoheig3
0
150
エンジニアとして関わる要件と仕様(公開用)
murabayashi
0
300
CSC509 Lecture 13
javiergs
PRO
0
110
Micro Frontends Unmasked Opportunities, Challenges, Alternatives
manfredsteyer
PRO
0
110
アジャイルを支えるテストアーキテクチャ設計/Test Architecting for Agile
goyoki
9
3.3k
聞き手から登壇者へ: RubyKaigi2024 LTでの初挑戦が 教えてくれた、可能性の星
mikik0
1
130
Hotwire or React? ~アフタートーク・本編に含めなかった話~ / Hotwire or React? after talk
harunatsujita
1
120
Featured
See All Featured
How To Stay Up To Date on Web Technology
chriscoyier
788
250k
[RailsConf 2023] Rails as a piece of cake
palkan
52
4.9k
Embracing the Ebb and Flow
colly
84
4.5k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
8
900
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
720
Side Projects
sachag
452
42k
Code Review Best Practice
trishagee
64
17k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
BBQ
matthewcrist
85
9.3k
Faster Mobile Websites
deanohume
305
30k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
229
52k
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