Your SlideShare is downloading. ×
Warbler at RubyConf 2010
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Introducing the official SlideShare app

Stunning, full-screen experience for iPhone and Android

Text the download link to your phone

Standard text messaging rates apply

Warbler at RubyConf 2010

1,637
views

Published on

Published in: Technology, Sports

0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,637
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
19
Comments
0
Likes
2
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Warbler Nick Sieger nsieger@engineyard.com http://www.flickr.com/photos/19474221@N08/4380605668/
  • 2. http://www.flickr.com/photos/emayoh/479260033/ new audience Warbler is all about taking Ruby to new audiences
  • 3. http://www.flickr.com/photos/tochis/3431207670/ go places Going places where it hasn’t been
  • 4. http://www.flickr.com/photos/ramdac/373881476/ and make it easy for you as well as others to operate the application.
  • 5. http://www.flickr.com/photos/jpellgen/4376586751/ so if you are the operator and you’re used to having control
  • 6. http://www.flickr.com/photos/richardholden/1161508160/ and you don’t need to throw a deployable over the wall to someone else
  • 7. http://www.flickr.com/photos/piratealice/3082374723/ then Warbler might not be for you.
  • 8. http://www.flickr.com/photos/jamesjordan/2570457478/ Home Sweet JVM However, if you’re willing to run wherever there’s a JVM, then we can do some interesting things.
  • 9. http://duke.kenai.com/SunRIP/index.html write once run anywhere?
  • 10. http://www.flickr.com/photos/bagalute/5075946007/ write cext compile everywhere! putting a c compiler on your production box always felt to me like repaving a road every time you start a new trip
  • 11. Warbler Uses
  • 12. Portable Web applications
  • 13. Ruby GUIs
  • 14. Distribution without source code
  • 15. No control over deployment
  • 16. Simplify deployment package once, copy to all the machines where you need to deploy it. no setting up ruby, gems also can version easily since JRuby is bundled in the war file.
  • 17. http://www.flickr.com/photos/marioraffin/368414252/ Windows!
  • 18. http://www.flickr.com/photos/epublicist/3546059144/ Warbler started as a square-peg-round-hole kind of problem.
  • 19. rails_app controllers config db lib images test vendor app helpers models views public javascripts stylesheets
  • 20. WEB-INF webapp.war
  • 21. images javascripts stylesheets WEB-INF controllers config app helpers models views lib vendor rails_app rails_app.war classes controllers config db lib images test vendor app helpers models views public javascripts stylesheets
  • 22. INSTALL gem install warbler Getting Started You don’t even have to have JRuby installed at this point.
  • 23. $ warble rm -f railsapp.war Creating railsapp.war
  • 24. That’s it!
  • 25. Gemfile
  • 26. Gem::Specification.new do |s| s.name = %q{rake} s.version = "0.8.7" s.default_executable = %q{rake} s.files = [ ... ] s.require_paths = ["lib"] # s.add_dependency 'lib', ["= VERS"] end
  • 27. $ warble config cp .../warble.rb config/warble.rb
  • 28. # config/warble.rb # Warbler web application assembly configuration file Warbler::Config.new do |config| # full documentation here end
  • 29. Warbler::Task.new("jar1", Warbler::Config.new do |config| config.jar_name = "jar1" end) Warbler::Task.new("jar2", Warbler::Config.new do |config| config.jar_name = "jar2" end) require 'warbler' Warbler::Task.new
  • 30. Task Config Jar Traits War Jar Bundler Gemspec Rails Rack
  • 31. require 'warbler' jar = Warbler::Jar.new jar.files["directory"] = nil # directory entry jar.files["inline.txt"] = StringIO.new("in memory") jar.files["path/a.txt"] = "a.txt" # disk file jar.create("sample.jar")
  • 32. $ unzip -l sample.jar Archive: sample.jar Length Date Time Name -------- ---- ---- ---- 0 11-11-10 13:17 directory/ 9 11-11-10 13:17 inline.txt 0 11-11-10 13:17 path/ 0 11-11-10 13:17 path/a.txt -------- ------- 9 4 files
  • 33. Features warble executable compiled war
  • 34. Demos!
  • 35. SSID: NickSieger http://vanguard.local/ringpiano.jar
  • 36. Coming Soon
  • 37. Unpacking/Caching
  • 38. Choose web server: Jetty or Winstone (or ______ )
  • 39. Summer of Code: ruby_archive
  • 40. java -jar railsapp.war -S rake db:migrate
  • 41. bugs + your feedback
  • 42. Warbler 1.3.0 beta1 available now INSTALL gem install warbler --pre