Devignition 2011
Upcoming SlideShare
Loading in...5
×
 

Devignition 2011

on

  • 3,326 views

 

Statistics

Views

Total Views
3,326
Views on SlideShare
1,120
Embed Views
2,206

Actions

Likes
2
Downloads
26
Comments
0

13 Embeds 2,206

http://torquebox.org 1037
http://immutant.org 668
http://www.jboss.org 197
http://www.dcjbug.com 125
http://localhost 75
http://planet.jboss.org 66
http://staging.torquebox.org 22
http://blog-dcjbug.rhcloud.com 7
http://staging.immutant.org 5
http://www.hanrss.com 1
http://10.16.93.207 1
http://dc-jbug.com 1
https://www.google.co.uk 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Apple Keynote

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • \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

Devignition 2011 Devignition 2011 Presentation Transcript

  • The Polyglot Future of JBoss AS Toby Crawley Red Hat, Inc.
  • PresentThe Polyglot Future of JBoss AS Toby Crawley Red Hat, Inc.
  • Yours Truly• Senior SW Engineer at Red Hat• Core developer on TorqueBox & Immutant• Member of Project:Odd• @tcrawley
  • Agenda• intro• JBoss AS• JRuby & TorqueBox• Clojure & Immutant• crap, a demo• outro
  • JBoss AS 7• Low memory footprint• Modularized class loader isolation• Fast startup time• Performant• EE6
  • “Java is a DSL for takinglarge XML files andconverting them to stacktraces” Scott Bellware
  • 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.
  • GoalTo make you more productive.
  • GoalTo make you happy.
  • Ruby• Expressive• Dynamic typing• Less ceremony• Makes you feel more cleverer
  • Set<Person> people = new HashSet<Person>();for ( Team each : teams ) { people.addAll( each.getMembers() );}for ( Person each : people ) { each.promote();}
  • teams. collect(&:members). flatten.uniq.each(&:promote!)
  • JRuby• Real threads• Simple access to Java• Fastest Ruby implementation
  • require javabar = org.projectodd.foo.Bar.newbar.a_value = 42bar.bazerize
  • TorqueBox is an Application Server forRuby built on top of JBoss AS7
  • 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
  • WebSupports any Rack framework (Rails,Sinata, Padrino, etc). Requests come in,responses go out. Works like you wouldexpect...
  • Web...but no war required. Just pointTorqueBox at the application root.
  • Scheduled JobsSimple cron-like scheduling that sharesyour applications lifecycle.
  • Scheduled Jobsclass TPSReportJob def run # work happens here endend
  • Scheduled JobsTorqueBox.configure do job TPSReportJob, :cron => 0 */5 * * * ?end
  • BackgroundableAsynchronous execution with a simpleapi. Shares your applications lifecycle.
  • Backgroundableinclude TorqueBox::Messagingclass User include Backgroundable always_background :send_welcome def send_welcome # slow email process endend
  • MessagingLayered on top of JMS and HornetQ.Useful for decoupling or polyglot interop.
  • Messagingqueue = inject( /queue/morris_day )queue.publish( Time.now )puts queue.receive# Fri Dec 2 16:44:22 -0500 2011
  • Messaginginclude TorqueBox::Messagingclass TheTime < MessageProcessor def on_message(body) # What time is it?!? puts body endend
  • MessagingTorqueBox.configure do queue /queue/morris_day do processor TheTime endend
  • ServicesLong running daemons that share theapplications lifecycle.
  • Injectionaka Inversion of Control. Telling thecontainer what you need and letting itwire things up.
  • Distributed TransactionsTrue multi-resource distributedtransactions.
  • Things I Skipped• Built-in WebSockets• Simple clustering• Key/Value store via Infinispan (Caching)
  • Clojure• Modern Lisp for the JVM• Functional• Immutable data• Concise syntax• Nice Java integration
  • Set<Person> people = new HashSet<Person>();for ( Team each : teams ) { people.addAll( each.getMembers() );}for ( Person each : people ) { each.promote();}
  • (map promote! (set (extract :members teams)))
  • (def extract mapcat)(map promote! (set (extract :members teams)))
  • (doto (org.projectodd.foo.Bar.) (.setAValue 42) (.bazerize))
  • Immutant
  • Immutant is an Application Server forClojure being built on top of JBoss AS7
  • WebSupports Ring handlers. Works like youwould expect. Requests come in,responses go out. Endpoints can becreated dynamically.
  • Web(require [immutant.web :as web])(defn my-ring-handler [request] ;; process request here)(web/start "/" my-ring-handler)...(web/stop "/")
  • MessagingLayered on top of JMS and HornetQ.Useful for decoupling or polyglot interop.
  • 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>
  • Messaging(msg/listen "/queue/morris_day" (fn [body] ;; What time is it?!? (println body)))
  • DaemonsLong running daemons that share theapplications lifecycle.
  • Coming Soon• Scheduled Jobs• Distributed futures• Distributed state• Multi-resource transactions• Injection• You tell us!
  • http://www.flickr.com/photos/-lucaslove/5084345964/
  • http://www.flickr.com/photos/jdgoring/179412740/
  • Clojuretwitter daemon queue Ruby Java processor TweetClassifier web topic sockets you! and you? and you!
  • Language LOC Ruby ~110 Clojure ~50 Java ~30Javascript ~25
  • Availability• TorqueBox: 2.0.0.beta1 released today• Immutant: incremental builds available
  • Availability Monday• TorqueBox: 2.0.0.beta1 released today• Immutant: incremental builds available
  • http://www.flickr.com/photos/daveynin/4194763701/
  • Resources• http://torquebox.org• #torquebox on freenode• @torquebox• http://immutant.org• #immutant on freenode• @immutants
  • http://www.flickr.com/photos/thaths/3760407774/