Your SlideShare is downloading. ×
Devignition 2011
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Saving this for later?

Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime - even offline.

Text the download link to your phone

Standard text messaging rates apply

Devignition 2011

3,241
views

Published on

Published in: Technology

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

No Downloads
Views
Total Views
3,241
On Slideshare
0
From Embeds
0
Number of Embeds
6
Actions
Shares
0
Downloads
26
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
  • \n
  • \n
  • You! - java, other jvm langs, ruby, clojure\n\n
  • Fire up your laptops\n
  • JBoss, AS, AS7\n
  • \n
  • JVM is a platform\n
  • "just as the JVM..."\n
  • distill\nnot for the boss, but for your own happiness\n
  • distill further\n
  • \n
  • \n
  • a comparison\n
  • \n
  • \n
  • \n
  • \n
  • 1) teaches the AS how to deploy ruby apps\n2) exposes AS functionality via ruby interfaces\nstill run java (multiple apps)\n
  • "skimming the surface"\n"in the room"\n
  • \n
  • \n
  • \n
  • \n
  • First look at torquebox.rb\n
  • \n
  • Mention Futures\n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • first class\ndefined a symbol pointing to the mapcat function\n
  • \n
  • \n
  • 1) teaches the AS how to deploy clojure apps\n2) exposes AS functionality via clojure interfaces\njava too!\n
  • mention no war\n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • WIP\navout\n
  • Each are just modules added to the AS, so we can overlay\n
  • wish me luck! (shout?)\nCMD-TAB\n
  • \n
  • focus on solving the problem, not the platform\n
  • \n
  • \n
  • \n
  • \n
  • \n
  • try it out, find bugs\n
  • try it out, find bugs\n
  • we've talked about TB & I, and how they work\nand how they can be used together to build polyglot apps\nHopefully compelling\nif you try it, maybe we can make you happy\n\n
  • torquebox docs\nsausage, help\n(services story if there is time)\n
  • I have stickers!\nAre we still running?\n
  • Transcript

    • 1. The Polyglot Future of JBoss AS Toby Crawley Red Hat, Inc.
    • 2. PresentThe Polyglot Future of JBoss AS Toby Crawley Red Hat, Inc.
    • 3. Yours Truly• Senior SW Engineer at Red Hat• Core developer on TorqueBox & Immutant• Member of Project:Odd• @tcrawley
    • 4. Agenda• intro• JBoss AS• JRuby & TorqueBox• Clojure & Immutant• crap, a demo• outro
    • 5. JBoss AS 7• Low memory footprint• Modularized class loader isolation• Fast startup time• Performant• EE6
    • 6. “Java is a DSL for takinglarge XML files andconverting them to stacktraces” Scott Bellware
    • 7. GoalLeverage the AS as a platform to reduce some of the accidental complexity of your deployment environment and allow you to use the best tool for the job.
    • 8. GoalTo make you more productive.
    • 9. GoalTo make you happy.
    • 10. Ruby• Expressive• Dynamic typing• Less ceremony• Makes you feel more cleverer
    • 11. Set<Person> people = new HashSet<Person>();for ( Team each : teams ) { people.addAll( each.getMembers() );}for ( Person each : people ) { each.promote();}
    • 12. teams. collect(&:members). flatten.uniq.each(&:promote!)
    • 13. JRuby• Real threads• Simple access to Java• Fastest Ruby implementation
    • 14. require javabar = org.projectodd.foo.Bar.newbar.a_value = 42bar.bazerize
    • 15. TorqueBox is an Application Server forRuby built on top of JBoss AS7
    • 16. Ruby!APIs!/!Programming!Models Java!APIs!/!Programming!Models Message Processors Polyglot WebSockets InjectionSinatra Rails Jobs STOMP POJO REST Servlet Rack Daemons Tasks Spring JMS JavaEE JRuby!Component!Deployers!&!Gems Java!Enterprise!Services JBoss Web Messaging Infinispan Cache TorqueBox HornetQ Transactions Core Quartz Security TorqueBox Core PicketLink JRuby with JIT Managed Services Container Java Virtual Machine
    • 17. WebSupports any Rack framework (Rails,Sinata, Padrino, etc). Requests come in,responses go out. Works like you wouldexpect...
    • 18. Web...but no war required. Just pointTorqueBox at the application root.
    • 19. Scheduled JobsSimple cron-like scheduling that sharesyour applications lifecycle.
    • 20. Scheduled Jobsclass TPSReportJob def run # work happens here endend
    • 21. Scheduled JobsTorqueBox.configure do job TPSReportJob, :cron => 0 */5 * * * ?end
    • 22. BackgroundableAsynchronous execution with a simpleapi. Shares your applications lifecycle.
    • 23. Backgroundableinclude TorqueBox::Messagingclass User include Backgroundable always_background :send_welcome def send_welcome # slow email process endend
    • 24. MessagingLayered on top of JMS and HornetQ.Useful for decoupling or polyglot interop.
    • 25. Messagingqueue = inject( /queue/morris_day )queue.publish( Time.now )puts queue.receive# Fri Dec 2 16:44:22 -0500 2011
    • 26. Messaginginclude TorqueBox::Messagingclass TheTime < MessageProcessor def on_message(body) # What time is it?!? puts body endend
    • 27. MessagingTorqueBox.configure do queue /queue/morris_day do processor TheTime endend
    • 28. ServicesLong running daemons that share theapplications lifecycle.
    • 29. Injectionaka Inversion of Control. Telling thecontainer what you need and letting itwire things up.
    • 30. Distributed TransactionsTrue multi-resource distributedtransactions.
    • 31. Things I Skipped• Built-in WebSockets• Simple clustering• Key/Value store via Infinispan (Caching)
    • 32. Clojure• Modern Lisp for the JVM• Functional• Immutable data• Concise syntax• Nice Java integration
    • 33. Set<Person> people = new HashSet<Person>();for ( Team each : teams ) { people.addAll( each.getMembers() );}for ( Person each : people ) { each.promote();}
    • 34. (map promote! (set (extract :members teams)))
    • 35. (def extract mapcat)(map promote! (set (extract :members teams)))
    • 36. (doto (org.projectodd.foo.Bar.) (.setAValue 42) (.bazerize))
    • 37. Immutant
    • 38. Immutant is an Application Server forClojure being built on top of JBoss AS7
    • 39. WebSupports Ring handlers. Works like youwould expect. Requests come in,responses go out. Endpoints can becreated dynamically.
    • 40. Web(require [immutant.web :as web])(defn my-ring-handler [request] ;; process request here)(web/start "/" my-ring-handler)...(web/stop "/")
    • 41. MessagingLayered on top of JMS and HornetQ.Useful for decoupling or polyglot interop.
    • 42. Messaging(require [immutant.messaging :as msg])(def q "/queue/morris_day")(msg/start q)(msg/publish q (Date.))(println (msg/receive q)); #<Date Fri Dec 2 16:54:56 EST 2011>
    • 43. Messaging(msg/listen "/queue/morris_day" (fn [body] ;; What time is it?!? (println body)))
    • 44. DaemonsLong running daemons that share theapplications lifecycle.
    • 45. Coming Soon• Scheduled Jobs• Distributed futures• Distributed state• Multi-resource transactions• Injection• You tell us!
    • 46. http://www.flickr.com/photos/-lucaslove/5084345964/
    • 47. http://www.flickr.com/photos/jdgoring/179412740/
    • 48. Clojuretwitter daemon queue Ruby Java processor TweetClassifier web topic sockets you! and you? and you!
    • 49. Language LOC Ruby ~110 Clojure ~50 Java ~30Javascript ~25
    • 50. Availability• TorqueBox: 2.0.0.beta1 released today• Immutant: incremental builds available
    • 51. Availability Monday• TorqueBox: 2.0.0.beta1 released today• Immutant: incremental builds available
    • 52. http://www.flickr.com/photos/daveynin/4194763701/
    • 53. Resources• http://torquebox.org• #torquebox on freenode• @torquebox• http://immutant.org• #immutant on freenode• @immutants
    • 54. http://www.flickr.com/photos/thaths/3760407774/