Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Rhinode.pdf

Chris Mowforth
April 25, 2012
620

 Rhinode.pdf

Chris Mowforth

April 25, 2012
Tweet

Transcript

  1. Chris Mowforth Freelance developer, based in Dublin Ruby / Clojure

    / Java / anything LISPy Hiding in academia ;-), interested in algo- trading, I/O-bound stuff, smaller subsets of this stuff...
  2. Rhino? • Started by Netscape (1997) • -> Mozilla Foundation

    (April '98) • One of the first JVM-hosted dynamic languages • Performance originally on a par with contemporaries... • ...now not so much
  3. Rhino? • Rhino (as bundled with JDK 5/6/7) (javax. script.*)

    generally >= 1 order of magnitude slower than V8 for same functionally equivalent code • => Great for automating mundane tasks, not suited for operating @ scale, e.g. web apps
  4. Invokedynamic Support for dynamically-typed languages at the bytecode level in

    Java 7 http://blog.headius.com/2008/09/first-taste-of- invokedynamic.html tl;dr => dynamic languages *can* run faster on JVM
  5. Invokedynamic + Rhino • Mozilla already has an invokedynamic branch

    on GitHub (mozilla/rhino) "With @headius' recent JDK7 build property r/w in Rhino invokedynamic is now 14x faster than Rhino master, & about half as fast as in V8/Node"- @edd
  6. Rhinode, high-level A collection of well known Java libraries glued

    together: • Rhino -> JS interpretation • Akka -> async / concurrency • Netty-> I/O
  7. Why? • Java ◦ [almost] Any OS ◦ [almost] Any

    context ▪ desktop ▪ browser ▪ android ▪ node app as a web servlet, anyone?
  8. Why? • Rhino ◦ Free java interop • Netty ◦

    Battle-tested, fast ◦ TCP/UDP/WebSockets ◦ SSL/TLS • Akka ◦ Actors ◦ Fault-tolerance / code hot-swapping ◦ STM
  9. What (kind of) works: • Timers • Path • DNS

    • URL • OS • Modules • Events
  10. End