$30 off During Our Annual Pro Sale. View Details »
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
事業部のプロジェクト進行と開発チームの改善の “時間軸" のすり合わせ
konifar
9
3.1k
命名から始めるSpec Driven
kuruwic
3
840
世界最速級 memcached 互換サーバー作った
yasukata
0
160
バグハンター視点によるサプライチェーンの脆弱性
scgajge12
2
510
シンプルを極める。アンチパターンなDB設計の本質
facilo_inc
1
1k
【5分でわかる】セーフィー エンジニア向け会社紹介
safie_recruit
0
37k
MCP・A2A概要 〜Google Cloudで構築するなら〜
shukob
0
160
Claude Code はじめてガイド -1時間で学べるAI駆動開発の基本と実践-
oikon48
43
26k
形式手法特論:CEGAR を用いたモデル検査の状態空間削減 #kernelvm / Kernel VM Study Hokuriku Part 8
ytaka23
2
250
All About Sansan – for New Global Engineers
sansan33
PRO
1
1.3k
Introduction to Sansan, inc / Sansan Global Development Center, Inc.
sansan33
PRO
0
2.9k
小さな判断で育つ、大きな意思決定力 / 20251204 Takahiro Kinjo
shift_evolve
PRO
1
320
Featured
See All Featured
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.1k
Git: the NoSQL Database
bkeepers
PRO
432
66k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Six Lessons from altMBA
skipperchong
29
4.1k
Docker and Python
trallard
46
3.7k
Facilitating Awesome Meetings
lara
57
6.7k
Building a Scalable Design System with Sketch
lauravandoore
463
34k
Imperfection Machines: The Place of Print at Facebook
scottboms
269
13k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
31
2.7k
Reflections from 52 weeks, 52 projects
jeffersonlam
355
21k
Raft: Consensus for Rubyists
vanstee
140
7.2k
Why You Should Never Use an ORM
jnunemaker
PRO
60
9.6k
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!