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
如何透過 Warbler 在 JVM 上部署 Rails 應用
Search
Jason Lee
September 11, 2015
Technology
2
1.6k
如何透過 Warbler 在 JVM 上部署 Rails 應用
Jason Lee
September 11, 2015
Tweet
Share
Other Decks in Technology
See All in Technology
Django's GeneratedField by example - DjangoCon US 2025
pauloxnet
0
150
Platform開発が先行する Platform Engineeringの違和感
kintotechdev
4
560
Codeful Serverless / 一人運用でもやり抜く力
_kensh
7
400
スマートファクトリーの第一歩 〜AWSマネージドサービスで 実現する予知保全と生成AI活用まで
ganota
2
210
[ JAWS-UG 東京 CommunityBuilders Night #2 ]SlackとAmazon Q Developerで 運用効率化を模索する
sh_fk2
3
400
生成AI時代のデータ基盤設計〜ペースレイヤリングで実現する高速開発と持続性〜 / Levtech Meetup_Session_2
sansan_randd
1
150
企業の生成AIガバナンスにおけるエージェントとセキュリティ
lycorptech_jp
PRO
2
160
AWSを利用する上で知っておきたい名前解決のはなし(10分版)
nagisa53
10
3.1k
生成AIでセキュリティ運用を効率化する話
sakaitakeshi
0
660
5分でカオスエンジニアリングを分かった気になろう
pandayumi
0
240
フルカイテン株式会社 エンジニア向け採用資料
fullkaiten
0
8.7k
BPaaSにおける人と協働する前提のAIエージェント-AWS登壇資料
kentarofujii
0
140
Featured
See All Featured
Product Roadmaps are Hard
iamctodd
PRO
54
11k
Automating Front-end Workflow
addyosmani
1370
200k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
44
2.5k
The Art of Programming - Codeland 2020
erikaheidi
56
13k
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
YesSQL, Process and Tooling at Scale
rocio
173
14k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
667
120k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.4k
Optimising Largest Contentful Paint
csswizardry
37
3.4k
Build The Right Thing And Hit Your Dates
maggiecrowley
37
2.9k
Facilitating Awesome Meetings
lara
55
6.5k
Statistics for Hackers
jakevdp
799
220k
Transcript
如何透過 Warbler 在 JVM 上部署 Rails 應⽤用 Jason Lee (LeeChSien)
[email protected]
2015 / 09 / 11
關於我 • 李致賢 (Jason Lee) a.k.a LeeChSien • 即將畢業於政治⼤大學 (NCCU
CS Master) • as a Ruby Developer since 2012 • Web Developer in
想⽤用 Ruby / Rails 來開發產品, 但是...
客⼾戶的環境 你想像中
客⼾戶的環境 實際的情形
客⼾戶的環境 • 環境沒有 Ruby Runtime • 產品需要封裝 (保護 Source Code)
• Windows Only….
Charles Nutter @ Taipei (2014/04/29)
嘗試使⽤用 JRuby ?
JRuby Write once, run anywhere
JRuby
如何使⽤用 JRuby 開發?
JRuby 版本⽐比較 JRuby 1.7.0 Ruby 1.9.3 JRuby 1.7.4 Ruby 2.0
JRuby 9.0.0.0 Ruby 2.2
使⽤用相容的 Gems • For example:activerecord-jdbc-adapter
Migrate from MRI Rails 4.2 • byebug -> disable •
web-console -> disable • binding_of_caller • therubyracer -> therubyrhino
C Extension Alternatives • Nokogiri - pure java version •
RMagick - RMagick4J • therubyracer - therubyrhino JRuby Wiki:C-Extension-Alternatives
Thread-safety • Rails 本⾝身是 Thread-safe • 第三⽅方 Gems 必須是 Thread-safe
• Sidekiq Wiki:Problems-and-Troubleshooting#threading • 你的程式碼必須是 Thread-safe
Thread-safety • Global variables • Class variables • Class instance
variables
Race condition
None
Memoization
None
None
Mutex Lock
None
Archive Your App with Warbler
Warbler • Warbler 將你的 App 打包為可執⾏行的 .war files https://github.com/jruby/warbler •
Start Server? • Rake task?
Warbler • Configuration • warble.rb • web.xml.erb Warbler 1.4.X JRuby
1.7.X Warbler 2.0.0 rc JRuby 9.0.0.0
Compile .rb to .class warble.rb
Compile .rb to .class
JRuby-rack-worker web.xml.erb https://github.com/kares/jruby-rack-worker
Unlimited Strength Crypto • Install the "Unlimited Strength" policy files
from Oracle • Disable the crypto restriction programmatically JRuby Wiki:UnlimitedStrengthCrypto
Tzinfo-data • No timezone data source could be found. To
resolve this, either install TZInfo::Data
Demo https://github.com/LeeChSien/rails-warbler-boilerplate
Another Choice - TorqueBox
Thank you!