SlideShare una empresa de Scribd logo
1 de 50
Descargar para leer sin conexión
The JVM Language Summit:

Many Languages, One Machine



  John R. Rose, Sr. Staff Engineer
  john.rose@sun.com
  http://blogs.sun.com/jrose
How language & VM geeks party

•  January 2008: Sun engineers Brian Goetz, Charlie
   Nutter, Dan Ingalls, & John Rose visit and
   thoroughly enjoy 3 days in Redmond at
   Microsoft’s Lang.NET conference.
•  March 2008: Brian says to John et al, “Why don’t
   we do one of those at Sun for the JVM?”
•  September 2008: ~80 key VM and language
   designers meet in Santa Clara for 3 exhilarating
   days, discussing the future of their projects.
   (Microsoft colleagues returned the visit!)

              Copyright Sun Microsystems, Inc 2008:   2
Handout for JavaOne, May 5-9


Guerrilla marketing at its finest:




                      Copyright Sun Microsystems, Inc 2008:   3
JVM Language Summit 2008
http://jvmlangsummit.com


From the website:




                    Copyright Sun Microsystems, Inc 2008:   4
VMs represented by attendees

•    Sun HotSpot*, Maxine*, Monty
•    Oracle JRockit
•    IBM J9
•    Azul HotSpot*
•    Microsoft CLR*
•    Parrot VM*
                                                        * marks a presentation



                Copyright Sun Microsystems, Inc 2008:                            5
JVM languages presented

•    Java (Gosling keynote)
•    Lisps: Common Lisp (Jatha), Scheme, Clojure
•    Scripting: Groovy, JRuby, Jython, PHP, Rexx
•    Assembler: ASM, Kawa
•    JavaFX
•    Scala
•    Fortress


                Copyright Sun Microsystems, Inc 2008:   6
Day One Highlights




          Copyright Sun Microsystems, Inc 2008:   7
Maxine: The JVM that hosts itself
Bernd Mathiske, Sun




      http://wiki.jvmlangsummit.com/MaxineVM
                      Copyright Sun Microsystems, Inc 2008:   8
Run Your
Fortress: Run your whiteboard
                        White Board
                   ProjectFortress: run your whiteboard, in parallel, on the JVM



                    Many opportunities for parallelism
David Chase, Sun




                    vnorm = v/ v
                                     k                                        Aggregate objects and
                              ak x                                            reductions drive parallelism
                    k←1:n                                                     with “generators”.

                    C =A∪B                                                                 Operands are
                                                                                           evaluated in
                                                                                           parallel.
                    y = 3x sin x cos 2x log log x
     http://wiki.jvmlangsummit.com/Fortress
                                      Copyright Sun Microsystems, Inc 2008:                                    9
                                                                                                             Page 5
Laptop – 1, Rose & Goetz – 0




          Copyright Sun Microsystems, Inc 2008:   10
Day Two Highlights




          Copyright Sun Microsystems, Inc 2008:   11
Ask the man with the MOP…

                                MOP summary:
                                  we have...
Attila Szegedi, Adeptra




                          •   Protocol for language independent property
                              access on objects and for invocation of
                              methods,

                          •   designed for composability,

                          •   Factory that builds an optimized composite
                              MOP from all MOPs available to a class
                              loader,

                          •   MOP for POJOs, usable as a fallback when
                              no other MOP matches. Handles overloaded
                              methods, varargs, type conversions,

       http://wiki…/DynamicLanguageMOP
                                     Copyright Sun Microsystems, Inc 2008:   12
Clojure: Not your granddad’s Lisp
                                    Atomic Update
Rich Hickey, Clojure.org




                                             foo                               :a          quot;fredquot;
                                                                               :b         quot;ethelquot;
                                                                               :c            42
                                                                               :d            17
                                                                               :e             6

                                                                    @foo
                                                                                    Structural sharing
                                                                               :a          quot;lucyquot;
                                                                               :b         quot;ethelquot;


                           • Always coordinated
                                                                               :c            42
                                                                               :d            17


                            • Multiple semantics
                                                                               :e             6



                           • Next dereference sees new value
                           • Consumers of values unaffected
       http://wiki.jvmlangsummit.com/Clojure
                                       Copyright Sun Microsystems, Inc 2008:                             13
Day Three Highlights




          Copyright Sun Microsystems, Inc 2008:   14
The view from Redmond

                            !quot;#$%!&$'()$#quot;)*+
Mads Torgersen, Microsoft




                            ! !quot;##$%&'(%$)quot;)*($quot;$+(#(,quot;'($-*&)*$+.(%$'*($
                              +&%/quot;')*
                            ! 0#.-$/quot;'*$&%$1)quot;##(23$#quot;4,5quot;,($%/()&6&)7$89/&)quot;##9
                                :3   ;%<$'*($2()(&=(2$.>?()'$&6$&'$-quot;4'%$'.$#..<5/
                                @3   A6$4.'B$5%($#quot;4,5quot;,($>&4+&4,$25#(%$.4$254'&C($'9/(
                                D3   E&'*(2$-quot;9B$2('524$!quot;#$ quot;4+$%$&'(') E8%
                                F3   Gquot;')*$5/$+&%/quot;')*$E8$$-&'*$4(-$)quot;%(
                                H3   !.C/&#($E8$quot;4+$&4%'quot;##$&4$)quot;##$%&'(


                            http://wiki…/BehindLINQ
                                           Copyright Sun Microsystems, Inc 2008:          15
Java: Still the common language?

                                      !quot;#$%&$'($)&*&+,$
Neal Gafter, Microsoft




                          •! -''$.(//(#$0quot;#12quot;1&$3&quot;42+&5$4($6quot;7quot;$
                            –! 89#quot;/:.$/&4;('$':5<quot;4.;$
                            –! =+(<&+$4quot;:0$.quot;005$
                            –! >:.;$:'&#?@&+5$A&B1B$CDEF$
                            –! G&9%(+'$<quot;+quot;/&4&+5$
                            –! Hquot;11&'I&J4&#'&'$#2/&+:.5$
                            –! !quot;#$%quot;&'()*'++,-.+$
                            –! !(#?#2quot;?(#5$


                         http://wiki…/JVMClosures
                                     Copyright Sun Microsystems, Inc 2008:   16
Beyond the prepared talks…

Key conversations:
•  design and usage of invokedynamic
•  metaobject protocols
•  language interoperability
•  platform (bytecode, library) design
•  immutable data structures



              Copyright Sun Microsystems, Inc 2008:   17
The tale of invokedynamic


                         Rob Nicholson
                                                            Fredrik Öhrström
                                                                 Rémi Forax


  John Rose
              Jochen Theodorou Tom Enebo
                                   Charlie Nutter

                                                            Attila Szegedi




                    Copyright Sun Microsystems, Inc 2008:                      18
While we’re at the hardware store…
•    too many little classes (need relief in packaging and/or loading)
•    new method linkage or dispatch
•    tagged primitives
•    guaranteed tail-call optimization
•    interface injection
•    continuations
•    interpreter vs. bytecodes, byte compiler vs. JIT (need graceful mixed mode)
•    naked native methods
•    strange arrays (arrays of tuples, etc.)
•    a fast numeric tower, rational arithmetic
•    floating point rounding modes



                           Copyright Sun Microsystems, Inc 2008:                   19
My own take-aways

•  invokedynamic – sound design,
   exposition needs work
•  synergy: JSR 292 with Attila Szegedi’s MOP
•  Interface injection is going to be helpful.
•  Tailcall and value types will never go away.
•  Innovation on the JVM is a requirement.
•  We have to do another Summit next year.

http://blogs.sun.com/jrose/entry/view_from_the_summit

                Copyright Sun Microsystems, Inc 2008:   20
Pizza with extra MOP




          Copyright Sun Microsystems, Inc 2008:   21
Results




          Copyright Sun Microsystems, Inc 2008:   22
Results

•      Average conference ratings 4.4 – 4.9 out of 5.
•      Talk ratings consistently in the 4-5 range.
•      Rapid exchange of ideas
•      New partnerships among a who’s who of leaders
•      A better sense of our shared future

See also:
     http://blogs.sun.com/jrose/entry/view_from_the_summit


                   Copyright Sun Microsystems, Inc 2008:   23
Results

•  …Also, cool T-shirts:




               Copyright Sun Microsystems, Inc 2008:   24
When geeks party, we all win.

•  This meeting was none too soon.
•  The JVM is going to be used for more than Java.
   (Alternatively, the JVM risks irrelevance.)

•  Let’s take a broader look at the history…




               Copyright Sun Microsystems, Inc 2008:   25
1997–2007

  was a great decade...




            Copyright Sun Microsystems, Inc 2008:   26
1997–2007 was a great decade...

...to invent virtual machines

•    CLR-, JVM-based systems have become normal
•    CPU cycles are cheap enough for JIT, GC, RTT, ...
•    many Java programmers, tools, systems
•    much of the Java ecosystem is now open-source

Result: VMs & tools are mature, ubiquitous

                 Copyright Sun Microsystems, Inc 2008:   27
Great JVM features

•    flexible online code loading (nice safe bytecodes)
•    GC & object schema
•    reflective access to classes & objects
•    lots of ancillary tools (JMM, JVMTI, dtrace)
•    good libraries & a nice language to write more
•    optimizing JITs, object- and library-aware
•    clever performance techniques:
      >  type inference, customization, profiling,
          deoptimization, fast/slow paths, etc., etc.
                 Copyright Sun Microsystems, Inc 2008:   28
The widget that came to stay…




          Copyright Sun Microsystems, Inc 2008:   29
2008–2018:

   What shall we build now?




             Copyright Sun Microsystems, Inc 2008:   30
What shall we build now?

•    Smaller devices (phones, cards, motes)
•    Bigger data crunchers (many-core, DARPA HPCS)
•    Richer presentations (complex immersive models)
•    Fancier network protocols (cloud computing)
•    Nomadic computations (agents, workflow)
•    Mutable or scriptable widgets
     All these are easier to engineer when a suitably
     tuned VM decouples hardware from software.
                 Copyright Sun Microsystems, Inc 2008:   31
So, here is a great new decade…

…For more VMs!
•  Lightweight VMs for small devices
•  Massively parallel VMs for huge problems
•  Giant throughput VMs for network computing
•  Browser-linked VMs for rich clients
•  Etc., etc.
       “One Machine”  “Common ISA/ABI”
   Having Java bytecodes and libraries in common
   gives access to a more tools and platforms.
              Copyright Sun Microsystems, Inc 2008:   32
It is also a great new decade…

…For new languages!
   Formal computing languages provide a crucial mediation between
   programmers and their machines. These languages get tweaked,
   hacked, and replaced, as programmers scratch what itches…


•  There are dozens of JVM languages
   http://wikipedia.org/wiki/List_of_JVM_languages



•  One account lists 200 of them!
   http://robert-tolksdorf.de/vmlanguages.html


                  Copyright Sun Microsystems, Inc 2008:   33
What sorts of languages?
Each language provides specific modes of
   abstraction, decoupling a programmer’s chosen
   mode of thinking from the details of the machine.
•  Little languages focus on small domains.
•  Presentation languages specify visual forms.
•  Scripting languages provide informality.
•  “Classic” languages access traditional insights.
•  Parallel languages concentrate on big data flows.
•  Java is a great way to directly program the JVM.
•  And sometimes there is a Better Mousetrap.
               Copyright Sun Microsystems, Inc 2008:   34
Languages can reuse the Java VM
High level languages often require:
•  very late binding (that is, runtime x, for x in
   loading, linking, typing, code generation, etc.)
•  automatic storage management (GC)
•  environmental queries (reflection, stack walking)
•  exotic primitives (tailcall, bignums, call/cc)
•  robust handling of incorrect or malicious inputs
•  helpful runtime support libraries (REs, math, ...)
•  a compiler (JIT and/or AOT) that understands it all
               Copyright Sun Microsystems, Inc 2008:   35
Pain Points

•  The JVM is a stronger foundation than C/C++
    >  but not quite enough for emerging languages
    >  Reason: the JVM was made for Java only...
    >  (historically the x86 was for C and Pascal...)

•  Language implementers still try to reuse the JVM
•  Near-misses are experienced as “pain points”



               Copyright Sun Microsystems, Inc 2008:   36
So what's missing?

•  Dynamic invocation




•  And always, higher performance
              Copyright Sun Microsystems, Inc 2008:   37
So what's missing?

•    Dynamic invocation
•    Lightweight method objects
•    Lightweight bytecode loading
•    Continuations and stack introspection
•    Tail calls and tail recursion
•    Tuples and value-oriented types
•    Immediate wrapper types
•    Symbolic freedom (non-Java names)
•    And always, higher performance
                Copyright Sun Microsystems, Inc 2008:   38
the Da Vinci Machine
a multi-language renaissance
for the Java™ Virtual Machine
architecture

http://openjdk.java.net/
           /projects/mlvm/




                                39
A Solution from Sun

•  Evolutionary adaptation of the present JVM
•  Open-ended experimentation on Sun's Hotspot
    >    wild ideas are considered, but must prove useful
    >    while incubating, features are disabled by default
•  Eventual convergence on standards
•  Extension of the standard JVM architecture
    >    deliberate, measured, careful extension



                 Copyright Sun Microsystems, Inc 2008:   40
Da Vinci Machine Project Mission

•  Prototype JVM extensions to run non-Java
   languages efficiently
•  First-class architectural support (not hacks or
   side-cars)
•  Complete the existing architecture with general
   purpose extensions
•  New languages to co-exist gracefully with Java in
   the JVM


               Copyright Sun Microsystems, Inc 2008:   41
JSR 292 – Dynamic Invocation

•  non-Java call site in the bytecodes
•  language-specific handler
    >  determines call linkage at runtime
    >  works in a reflective style
    >  installs direct (non-reflective) methods
•  stateful: updated or revoked over time
•  type-sensitive target method selection
    >  based on first argument, all arguments
    >  or no arguments
               Copyright Sun Microsystems, Inc 2008:   42
JSR 292 – Method handles

•    java.dyn.MethodHandle
      >  lightweight method reference
      >  each instance supports just one invoke op
      >  the signature of the invoke can vary
•  caller invokes knowing method handle signature
    >  …but not its name or containing class
    >  signature mismatches cause exceptions
•  call runs at nearly the speed of normal Java call


                Copyright Sun Microsystems, Inc 2008:   43
JSR 292 – Method handles (2)

•  method handles give pluggable access to
    >  invokestatic/invokespecial
    >  invokevirtual/invokeinterface
    >  common conversions (e.g., checkcast)
    >  curried or “bound” methods
    >  complex combinators
•  required to glue together dynamic call sites
•  requires VM and/or library support for common
   adaptation patterns (curry, receiver check,
   varargs, etc…)
              Copyright Sun Microsystems, Inc 2008:   44
JSR 292 (?) – Interface Injection

•  a structured way to add methods to classes
    >  some interfaces are “injectable”
    >  for each class, a handler is called ≤1 times
    >  the handler’s decision is final
    >  handler provides method handles as needed
•  can extend the meaning of classes
•  e.g, a “Groovy method” on java.lang.String
•  or a “Ruby metaobject” on java.lang.Integer
•  fast, cheap, lazy, and general; not yet specified
               Copyright Sun Microsystems, Inc 2008:   45
HotSpot – Anonymous classes

•  Faster and more reliable loading and unloading
•  Little interaction with system dict. or class
   loaders
    >  (“class names considered harmful”)
    >  a better way to load ad hoc bytecodes
    >  not a proposed standard, just an
         implementation trick
•  Library-directed code customization
    >  via constant pool patching

               Copyright Sun Microsystems, Inc 2008:   46
HotSpot – Performance work

•  No-brainer: Support less-static bytecode shapes
    >  Ongoing for years; see website for fixed bugs
    >  Examples: Class.isInstance, Arrays.copyOf
•  Faster reflection
•  Escape analysis (etc.) to remove auto-boxing
•  Maybe: No-heap rep. for java.lang.Integer
•  More subtle: Faster closure-like interfaces
•  Etc., etc.

               Copyright Sun Microsystems, Inc 2008:   47
Other great VM ideas
(which might need community champions)
•  Continuations (cf. Scheme call/cc)
   active work by Lukas Stadler at JKU, Linz
•  Tail calls (functional languages, threaded code)
   active work by Arnold Schwaighofer at JKU, Linz
•  Value object (cf. Lisp fixnums)
•  Tuple types (cf. .NET structs, Fortress tuples)




                Copyright Sun Microsystems, Inc 2008:   48
Are we re-inventing the world?

•  No, we are adapting classic ideas to the JVM.
    >    In some cases, exposing mature JVM internals to language
         implementers, for the first time.
    >    In other cases, adjusting JVM architecture to be less Java-
         centric.
•  Language implementers know what they want
    >    (and know how to simulate it with 100x slowdown)
•  VM implementers know what VMs can do
    >    (and know how to make their favorite language sing)
•  Let's bring them together.

                   Copyright Sun Microsystems, Inc 2008:       49
2008–2018:

   a great decade
       for JVMs

           and languages

http://wiki.jvmlangsummit.com

http://openjdk.java.net/projects/mlvm

http://blogs.sun.com/jrose

Más contenido relacionado

Similar a Jvm Language Summit Rose 20081016

Generator Tricks for Systems Programmers
Generator Tricks for Systems ProgrammersGenerator Tricks for Systems Programmers
Generator Tricks for Systems ProgrammersHiroshi Ono
 
[Muir] Seam 2 in practice
[Muir] Seam 2 in practice[Muir] Seam 2 in practice
[Muir] Seam 2 in practicejavablend
 
When To Use Ruby On Rails
When To Use Ruby On RailsWhen To Use Ruby On Rails
When To Use Ruby On Railsdosire
 
Ruby on Rails 101 - Presentation Slides for a Five Day Introductory Course
Ruby on Rails 101 - Presentation Slides for a Five Day Introductory CourseRuby on Rails 101 - Presentation Slides for a Five Day Introductory Course
Ruby on Rails 101 - Presentation Slides for a Five Day Introductory Coursepeter_marklund
 
Building RESTful Java Applications with EMF
Building RESTful Java Applications with EMFBuilding RESTful Java Applications with EMF
Building RESTful Java Applications with EMFKenn Hussey
 
Practical Domain-Specific Languages in Groovy
Practical Domain-Specific Languages in GroovyPractical Domain-Specific Languages in Groovy
Practical Domain-Specific Languages in GroovyGuillaume Laforge
 
Ruby off Rails (japanese)
Ruby off Rails (japanese)Ruby off Rails (japanese)
Ruby off Rails (japanese)Stoyan Zhekov
 
Going Live! with Comet
Going Live! with CometGoing Live! with Comet
Going Live! with CometSimon Willison
 
Merb The Super Bike Of Frameworks
Merb The Super Bike Of FrameworksMerb The Super Bike Of Frameworks
Merb The Super Bike Of FrameworksRowan Hick
 
Ruby off Rails (english)
Ruby off Rails (english)Ruby off Rails (english)
Ruby off Rails (english)Stoyan Zhekov
 
Kamaelia-ACCU-20050422
Kamaelia-ACCU-20050422Kamaelia-ACCU-20050422
Kamaelia-ACCU-20050422journeyer
 
Yet Another Max/MSP-Cocoa Communication
Yet Another Max/MSP-Cocoa CommunicationYet Another Max/MSP-Cocoa Communication
Yet Another Max/MSP-Cocoa CommunicationNao Tokui
 
IronRuby - A brave new world for .Net (NDC2010)
IronRuby - A brave new world for .Net (NDC2010)IronRuby - A brave new world for .Net (NDC2010)
IronRuby - A brave new world for .Net (NDC2010)Ben Hall
 
Reverse Engineering Malicious Javascript
Reverse Engineering Malicious JavascriptReverse Engineering Malicious Javascript
Reverse Engineering Malicious JavascriptYusuf Motiwala
 
Managing Uncertainty in Value-based SE
Managing Uncertainty in Value-based SEManaging Uncertainty in Value-based SE
Managing Uncertainty in Value-based SECS, NcState
 
Beijing Perl Workshop 2008 Hiveminder Secret Sauce
Beijing Perl Workshop 2008 Hiveminder Secret SauceBeijing Perl Workshop 2008 Hiveminder Secret Sauce
Beijing Perl Workshop 2008 Hiveminder Secret SauceJesse Vincent
 

Similar a Jvm Language Summit Rose 20081016 (20)

BeJUG JavaFx In Practice
BeJUG JavaFx In PracticeBeJUG JavaFx In Practice
BeJUG JavaFx In Practice
 
Practical Groovy DSL
Practical Groovy DSLPractical Groovy DSL
Practical Groovy DSL
 
Generator Tricks for Systems Programmers
Generator Tricks for Systems ProgrammersGenerator Tricks for Systems Programmers
Generator Tricks for Systems Programmers
 
[Muir] Seam 2 in practice
[Muir] Seam 2 in practice[Muir] Seam 2 in practice
[Muir] Seam 2 in practice
 
20090422 Www
20090422 Www20090422 Www
20090422 Www
 
When To Use Ruby On Rails
When To Use Ruby On RailsWhen To Use Ruby On Rails
When To Use Ruby On Rails
 
Ruby on Rails 101 - Presentation Slides for a Five Day Introductory Course
Ruby on Rails 101 - Presentation Slides for a Five Day Introductory CourseRuby on Rails 101 - Presentation Slides for a Five Day Introductory Course
Ruby on Rails 101 - Presentation Slides for a Five Day Introductory Course
 
Building RESTful Java Applications with EMF
Building RESTful Java Applications with EMFBuilding RESTful Java Applications with EMF
Building RESTful Java Applications with EMF
 
Practical Domain-Specific Languages in Groovy
Practical Domain-Specific Languages in GroovyPractical Domain-Specific Languages in Groovy
Practical Domain-Specific Languages in Groovy
 
Ruby off Rails (japanese)
Ruby off Rails (japanese)Ruby off Rails (japanese)
Ruby off Rails (japanese)
 
Going Live! with Comet
Going Live! with CometGoing Live! with Comet
Going Live! with Comet
 
Merb The Super Bike Of Frameworks
Merb The Super Bike Of FrameworksMerb The Super Bike Of Frameworks
Merb The Super Bike Of Frameworks
 
Ruby off Rails (english)
Ruby off Rails (english)Ruby off Rails (english)
Ruby off Rails (english)
 
Kamaelia-ACCU-20050422
Kamaelia-ACCU-20050422Kamaelia-ACCU-20050422
Kamaelia-ACCU-20050422
 
Yet Another Max/MSP-Cocoa Communication
Yet Another Max/MSP-Cocoa CommunicationYet Another Max/MSP-Cocoa Communication
Yet Another Max/MSP-Cocoa Communication
 
IronRuby - A brave new world for .Net (NDC2010)
IronRuby - A brave new world for .Net (NDC2010)IronRuby - A brave new world for .Net (NDC2010)
IronRuby - A brave new world for .Net (NDC2010)
 
Ruby on Rails Presentation
Ruby on Rails PresentationRuby on Rails Presentation
Ruby on Rails Presentation
 
Reverse Engineering Malicious Javascript
Reverse Engineering Malicious JavascriptReverse Engineering Malicious Javascript
Reverse Engineering Malicious Javascript
 
Managing Uncertainty in Value-based SE
Managing Uncertainty in Value-based SEManaging Uncertainty in Value-based SE
Managing Uncertainty in Value-based SE
 
Beijing Perl Workshop 2008 Hiveminder Secret Sauce
Beijing Perl Workshop 2008 Hiveminder Secret SauceBeijing Perl Workshop 2008 Hiveminder Secret Sauce
Beijing Perl Workshop 2008 Hiveminder Secret Sauce
 

Más de Eduardo Pelegri-Llopart

Pelegri Desarrollando en una nueva era de software
Pelegri   Desarrollando en una nueva era de software Pelegri   Desarrollando en una nueva era de software
Pelegri Desarrollando en una nueva era de software Eduardo Pelegri-Llopart
 
Market trends in IT - exchange cala - October 2015
Market trends in IT - exchange cala - October 2015Market trends in IT - exchange cala - October 2015
Market trends in IT - exchange cala - October 2015Eduardo Pelegri-Llopart
 
The impact of IOT - exchange cala - 2015
The impact of IOT - exchange cala - 2015The impact of IOT - exchange cala - 2015
The impact of IOT - exchange cala - 2015Eduardo Pelegri-Llopart
 
What is IoT and how Modulus and Pacific can Help - Featuring Node.js and Roll...
What is IoT and how Modulus and Pacific can Help - Featuring Node.js and Roll...What is IoT and how Modulus and Pacific can Help - Featuring Node.js and Roll...
What is IoT and how Modulus and Pacific can Help - Featuring Node.js and Roll...Eduardo Pelegri-Llopart
 
What is the Internet of Things and How it Impacts You
What is the Internet of Things and How it Impacts YouWhat is the Internet of Things and How it Impacts You
What is the Internet of Things and How it Impacts YouEduardo Pelegri-Llopart
 
Ehcache Architecture, Features And Usage Patterns
Ehcache Architecture, Features And Usage PatternsEhcache Architecture, Features And Usage Patterns
Ehcache Architecture, Features And Usage PatternsEduardo Pelegri-Llopart
 

Más de Eduardo Pelegri-Llopart (20)

Juggling at freenome
Juggling   at freenomeJuggling   at freenome
Juggling at freenome
 
Csumb capstone-fall2016
Csumb capstone-fall2016Csumb capstone-fall2016
Csumb capstone-fall2016
 
Digital activitymanagement
Digital activitymanagementDigital activitymanagement
Digital activitymanagement
 
Progress next iot_pelegri
Progress next iot_pelegriProgress next iot_pelegri
Progress next iot_pelegri
 
Pelegri Desarrollando en una nueva era de software
Pelegri   Desarrollando en una nueva era de software Pelegri   Desarrollando en una nueva era de software
Pelegri Desarrollando en una nueva era de software
 
Market trends in IT - exchange cala - October 2015
Market trends in IT - exchange cala - October 2015Market trends in IT - exchange cala - October 2015
Market trends in IT - exchange cala - October 2015
 
The impact of IOT - exchange cala - 2015
The impact of IOT - exchange cala - 2015The impact of IOT - exchange cala - 2015
The impact of IOT - exchange cala - 2015
 
IOT - Presentation to PEP @ Progress
IOT - Presentation to PEP @ ProgressIOT - Presentation to PEP @ Progress
IOT - Presentation to PEP @ Progress
 
Node.js as an IOT Bridge
Node.js as an IOT BridgeNode.js as an IOT Bridge
Node.js as an IOT Bridge
 
What is IoT and how Modulus and Pacific can Help - Featuring Node.js and Roll...
What is IoT and how Modulus and Pacific can Help - Featuring Node.js and Roll...What is IoT and how Modulus and Pacific can Help - Featuring Node.js and Roll...
What is IoT and how Modulus and Pacific can Help - Featuring Node.js and Roll...
 
What is the Internet of Things and How it Impacts You
What is the Internet of Things and How it Impacts YouWhat is the Internet of Things and How it Impacts You
What is the Internet of Things and How it Impacts You
 
Community Update 25 Mar2010 - English
Community Update 25 Mar2010 - EnglishCommunity Update 25 Mar2010 - English
Community Update 25 Mar2010 - English
 
GlassFish Community Update 25 Mar2010
GlassFish Community Update 25 Mar2010GlassFish Community Update 25 Mar2010
GlassFish Community Update 25 Mar2010
 
Glass Fish Portfolio C1 West V3.Mini
Glass Fish Portfolio C1 West V3.MiniGlass Fish Portfolio C1 West V3.Mini
Glass Fish Portfolio C1 West V3.Mini
 
Virtual Box Aquarium May09
Virtual Box Aquarium May09Virtual Box Aquarium May09
Virtual Box Aquarium May09
 
Introduction To Web Beans
Introduction To Web BeansIntroduction To Web Beans
Introduction To Web Beans
 
Ehcache Architecture, Features And Usage Patterns
Ehcache Architecture, Features And Usage PatternsEhcache Architecture, Features And Usage Patterns
Ehcache Architecture, Features And Usage Patterns
 
OpenDS Primer Aquarium
OpenDS Primer AquariumOpenDS Primer Aquarium
OpenDS Primer Aquarium
 
Fuji Overview
Fuji OverviewFuji Overview
Fuji Overview
 
Nuxeo 5.2 Glassfish
Nuxeo 5.2 GlassfishNuxeo 5.2 Glassfish
Nuxeo 5.2 Glassfish
 

Último

08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 

Último (20)

08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 

Jvm Language Summit Rose 20081016

  • 1. The JVM Language Summit: Many Languages, One Machine John R. Rose, Sr. Staff Engineer john.rose@sun.com http://blogs.sun.com/jrose
  • 2. How language & VM geeks party •  January 2008: Sun engineers Brian Goetz, Charlie Nutter, Dan Ingalls, & John Rose visit and thoroughly enjoy 3 days in Redmond at Microsoft’s Lang.NET conference. •  March 2008: Brian says to John et al, “Why don’t we do one of those at Sun for the JVM?” •  September 2008: ~80 key VM and language designers meet in Santa Clara for 3 exhilarating days, discussing the future of their projects. (Microsoft colleagues returned the visit!) Copyright Sun Microsystems, Inc 2008: 2
  • 3. Handout for JavaOne, May 5-9 Guerrilla marketing at its finest: Copyright Sun Microsystems, Inc 2008: 3
  • 4. JVM Language Summit 2008 http://jvmlangsummit.com From the website: Copyright Sun Microsystems, Inc 2008: 4
  • 5. VMs represented by attendees •  Sun HotSpot*, Maxine*, Monty •  Oracle JRockit •  IBM J9 •  Azul HotSpot* •  Microsoft CLR* •  Parrot VM* * marks a presentation Copyright Sun Microsystems, Inc 2008: 5
  • 6. JVM languages presented •  Java (Gosling keynote) •  Lisps: Common Lisp (Jatha), Scheme, Clojure •  Scripting: Groovy, JRuby, Jython, PHP, Rexx •  Assembler: ASM, Kawa •  JavaFX •  Scala •  Fortress Copyright Sun Microsystems, Inc 2008: 6
  • 7. Day One Highlights Copyright Sun Microsystems, Inc 2008: 7
  • 8. Maxine: The JVM that hosts itself Bernd Mathiske, Sun http://wiki.jvmlangsummit.com/MaxineVM Copyright Sun Microsystems, Inc 2008: 8
  • 9. Run Your Fortress: Run your whiteboard White Board ProjectFortress: run your whiteboard, in parallel, on the JVM Many opportunities for parallelism David Chase, Sun vnorm = v/ v k Aggregate objects and ak x reductions drive parallelism k←1:n with “generators”. C =A∪B Operands are evaluated in parallel. y = 3x sin x cos 2x log log x http://wiki.jvmlangsummit.com/Fortress Copyright Sun Microsystems, Inc 2008: 9 Page 5
  • 10. Laptop – 1, Rose & Goetz – 0 Copyright Sun Microsystems, Inc 2008: 10
  • 11. Day Two Highlights Copyright Sun Microsystems, Inc 2008: 11
  • 12. Ask the man with the MOP… MOP summary: we have... Attila Szegedi, Adeptra • Protocol for language independent property access on objects and for invocation of methods, • designed for composability, • Factory that builds an optimized composite MOP from all MOPs available to a class loader, • MOP for POJOs, usable as a fallback when no other MOP matches. Handles overloaded methods, varargs, type conversions, http://wiki…/DynamicLanguageMOP Copyright Sun Microsystems, Inc 2008: 12
  • 13. Clojure: Not your granddad’s Lisp Atomic Update Rich Hickey, Clojure.org foo :a quot;fredquot; :b quot;ethelquot; :c 42 :d 17 :e 6 @foo Structural sharing :a quot;lucyquot; :b quot;ethelquot; • Always coordinated :c 42 :d 17 • Multiple semantics :e 6 • Next dereference sees new value • Consumers of values unaffected http://wiki.jvmlangsummit.com/Clojure Copyright Sun Microsystems, Inc 2008: 13
  • 14. Day Three Highlights Copyright Sun Microsystems, Inc 2008: 14
  • 15. The view from Redmond !quot;#$%!&$'()$#quot;)*+ Mads Torgersen, Microsoft ! !quot;##$%&'(%$)quot;)*($quot;$+(#(,quot;'($-*&)*$+.(%$'*($ +&%/quot;')* ! 0#.-$/quot;'*$&%$1)quot;##(23$#quot;4,5quot;,($%/()&6&)7$89/&)quot;##9 :3 ;%<$'*($2()(&=(2$.>?()'$&6$&'$-quot;4'%$'.$#..<5/ @3 A6$4.'B$5%($#quot;4,5quot;,($>&4+&4,$25#(%$.4$254'&C($'9/( D3 E&'*(2$-quot;9B$2('524$!quot;#$ quot;4+$%$&'(') E8% F3 Gquot;')*$5/$+&%/quot;')*$E8$$-&'*$4(-$)quot;%( H3 !.C/&#($E8$quot;4+$&4%'quot;##$&4$)quot;##$%&'( http://wiki…/BehindLINQ Copyright Sun Microsystems, Inc 2008: 15
  • 16. Java: Still the common language? !quot;#$%&$'($)&*&+,$ Neal Gafter, Microsoft •! -''$.(//(#$0quot;#12quot;1&$3&quot;42+&5$4($6quot;7quot;$ –! 89#quot;/:.$/&4;('$':5<quot;4.;$ –! =+(<&+$4quot;:0$.quot;005$ –! >:.;$:'&#?@&+5$A&B1B$CDEF$ –! G&9%(+'$<quot;+quot;/&4&+5$ –! Hquot;11&'I&J4&#'&'$#2/&+:.5$ –! !quot;#$%quot;&'()*'++,-.+$ –! !(#?#2quot;?(#5$ http://wiki…/JVMClosures Copyright Sun Microsystems, Inc 2008: 16
  • 17. Beyond the prepared talks… Key conversations: •  design and usage of invokedynamic •  metaobject protocols •  language interoperability •  platform (bytecode, library) design •  immutable data structures Copyright Sun Microsystems, Inc 2008: 17
  • 18. The tale of invokedynamic Rob Nicholson Fredrik Öhrström Rémi Forax John Rose Jochen Theodorou Tom Enebo Charlie Nutter Attila Szegedi Copyright Sun Microsystems, Inc 2008: 18
  • 19. While we’re at the hardware store… •  too many little classes (need relief in packaging and/or loading) •  new method linkage or dispatch •  tagged primitives •  guaranteed tail-call optimization •  interface injection •  continuations •  interpreter vs. bytecodes, byte compiler vs. JIT (need graceful mixed mode) •  naked native methods •  strange arrays (arrays of tuples, etc.) •  a fast numeric tower, rational arithmetic •  floating point rounding modes Copyright Sun Microsystems, Inc 2008: 19
  • 20. My own take-aways •  invokedynamic – sound design, exposition needs work •  synergy: JSR 292 with Attila Szegedi’s MOP •  Interface injection is going to be helpful. •  Tailcall and value types will never go away. •  Innovation on the JVM is a requirement. •  We have to do another Summit next year. http://blogs.sun.com/jrose/entry/view_from_the_summit Copyright Sun Microsystems, Inc 2008: 20
  • 21. Pizza with extra MOP Copyright Sun Microsystems, Inc 2008: 21
  • 22. Results Copyright Sun Microsystems, Inc 2008: 22
  • 23. Results •  Average conference ratings 4.4 – 4.9 out of 5. •  Talk ratings consistently in the 4-5 range. •  Rapid exchange of ideas •  New partnerships among a who’s who of leaders •  A better sense of our shared future See also: http://blogs.sun.com/jrose/entry/view_from_the_summit Copyright Sun Microsystems, Inc 2008: 23
  • 24. Results •  …Also, cool T-shirts: Copyright Sun Microsystems, Inc 2008: 24
  • 25. When geeks party, we all win. •  This meeting was none too soon. •  The JVM is going to be used for more than Java. (Alternatively, the JVM risks irrelevance.) •  Let’s take a broader look at the history… Copyright Sun Microsystems, Inc 2008: 25
  • 26. 1997–2007 was a great decade... Copyright Sun Microsystems, Inc 2008: 26
  • 27. 1997–2007 was a great decade... ...to invent virtual machines •  CLR-, JVM-based systems have become normal •  CPU cycles are cheap enough for JIT, GC, RTT, ... •  many Java programmers, tools, systems •  much of the Java ecosystem is now open-source Result: VMs & tools are mature, ubiquitous Copyright Sun Microsystems, Inc 2008: 27
  • 28. Great JVM features •  flexible online code loading (nice safe bytecodes) •  GC & object schema •  reflective access to classes & objects •  lots of ancillary tools (JMM, JVMTI, dtrace) •  good libraries & a nice language to write more •  optimizing JITs, object- and library-aware •  clever performance techniques: >  type inference, customization, profiling, deoptimization, fast/slow paths, etc., etc. Copyright Sun Microsystems, Inc 2008: 28
  • 29. The widget that came to stay… Copyright Sun Microsystems, Inc 2008: 29
  • 30. 2008–2018: What shall we build now? Copyright Sun Microsystems, Inc 2008: 30
  • 31. What shall we build now? •  Smaller devices (phones, cards, motes) •  Bigger data crunchers (many-core, DARPA HPCS) •  Richer presentations (complex immersive models) •  Fancier network protocols (cloud computing) •  Nomadic computations (agents, workflow) •  Mutable or scriptable widgets All these are easier to engineer when a suitably tuned VM decouples hardware from software. Copyright Sun Microsystems, Inc 2008: 31
  • 32. So, here is a great new decade… …For more VMs! •  Lightweight VMs for small devices •  Massively parallel VMs for huge problems •  Giant throughput VMs for network computing •  Browser-linked VMs for rich clients •  Etc., etc. “One Machine”  “Common ISA/ABI” Having Java bytecodes and libraries in common gives access to a more tools and platforms. Copyright Sun Microsystems, Inc 2008: 32
  • 33. It is also a great new decade… …For new languages! Formal computing languages provide a crucial mediation between programmers and their machines. These languages get tweaked, hacked, and replaced, as programmers scratch what itches… •  There are dozens of JVM languages http://wikipedia.org/wiki/List_of_JVM_languages •  One account lists 200 of them! http://robert-tolksdorf.de/vmlanguages.html Copyright Sun Microsystems, Inc 2008: 33
  • 34. What sorts of languages? Each language provides specific modes of abstraction, decoupling a programmer’s chosen mode of thinking from the details of the machine. •  Little languages focus on small domains. •  Presentation languages specify visual forms. •  Scripting languages provide informality. •  “Classic” languages access traditional insights. •  Parallel languages concentrate on big data flows. •  Java is a great way to directly program the JVM. •  And sometimes there is a Better Mousetrap. Copyright Sun Microsystems, Inc 2008: 34
  • 35. Languages can reuse the Java VM High level languages often require: •  very late binding (that is, runtime x, for x in loading, linking, typing, code generation, etc.) •  automatic storage management (GC) •  environmental queries (reflection, stack walking) •  exotic primitives (tailcall, bignums, call/cc) •  robust handling of incorrect or malicious inputs •  helpful runtime support libraries (REs, math, ...) •  a compiler (JIT and/or AOT) that understands it all Copyright Sun Microsystems, Inc 2008: 35
  • 36. Pain Points •  The JVM is a stronger foundation than C/C++ >  but not quite enough for emerging languages >  Reason: the JVM was made for Java only... >  (historically the x86 was for C and Pascal...) •  Language implementers still try to reuse the JVM •  Near-misses are experienced as “pain points” Copyright Sun Microsystems, Inc 2008: 36
  • 37. So what's missing? •  Dynamic invocation •  And always, higher performance Copyright Sun Microsystems, Inc 2008: 37
  • 38. So what's missing? •  Dynamic invocation •  Lightweight method objects •  Lightweight bytecode loading •  Continuations and stack introspection •  Tail calls and tail recursion •  Tuples and value-oriented types •  Immediate wrapper types •  Symbolic freedom (non-Java names) •  And always, higher performance Copyright Sun Microsystems, Inc 2008: 38
  • 39. the Da Vinci Machine a multi-language renaissance for the Java™ Virtual Machine architecture http://openjdk.java.net/ /projects/mlvm/ 39
  • 40. A Solution from Sun •  Evolutionary adaptation of the present JVM •  Open-ended experimentation on Sun's Hotspot >  wild ideas are considered, but must prove useful >  while incubating, features are disabled by default •  Eventual convergence on standards •  Extension of the standard JVM architecture >  deliberate, measured, careful extension Copyright Sun Microsystems, Inc 2008: 40
  • 41. Da Vinci Machine Project Mission •  Prototype JVM extensions to run non-Java languages efficiently •  First-class architectural support (not hacks or side-cars) •  Complete the existing architecture with general purpose extensions •  New languages to co-exist gracefully with Java in the JVM Copyright Sun Microsystems, Inc 2008: 41
  • 42. JSR 292 – Dynamic Invocation •  non-Java call site in the bytecodes •  language-specific handler >  determines call linkage at runtime >  works in a reflective style >  installs direct (non-reflective) methods •  stateful: updated or revoked over time •  type-sensitive target method selection >  based on first argument, all arguments >  or no arguments Copyright Sun Microsystems, Inc 2008: 42
  • 43. JSR 292 – Method handles •  java.dyn.MethodHandle >  lightweight method reference >  each instance supports just one invoke op >  the signature of the invoke can vary •  caller invokes knowing method handle signature >  …but not its name or containing class >  signature mismatches cause exceptions •  call runs at nearly the speed of normal Java call Copyright Sun Microsystems, Inc 2008: 43
  • 44. JSR 292 – Method handles (2) •  method handles give pluggable access to >  invokestatic/invokespecial >  invokevirtual/invokeinterface >  common conversions (e.g., checkcast) >  curried or “bound” methods >  complex combinators •  required to glue together dynamic call sites •  requires VM and/or library support for common adaptation patterns (curry, receiver check, varargs, etc…) Copyright Sun Microsystems, Inc 2008: 44
  • 45. JSR 292 (?) – Interface Injection •  a structured way to add methods to classes >  some interfaces are “injectable” >  for each class, a handler is called ≤1 times >  the handler’s decision is final >  handler provides method handles as needed •  can extend the meaning of classes •  e.g, a “Groovy method” on java.lang.String •  or a “Ruby metaobject” on java.lang.Integer •  fast, cheap, lazy, and general; not yet specified Copyright Sun Microsystems, Inc 2008: 45
  • 46. HotSpot – Anonymous classes •  Faster and more reliable loading and unloading •  Little interaction with system dict. or class loaders >  (“class names considered harmful”) >  a better way to load ad hoc bytecodes >  not a proposed standard, just an implementation trick •  Library-directed code customization >  via constant pool patching Copyright Sun Microsystems, Inc 2008: 46
  • 47. HotSpot – Performance work •  No-brainer: Support less-static bytecode shapes >  Ongoing for years; see website for fixed bugs >  Examples: Class.isInstance, Arrays.copyOf •  Faster reflection •  Escape analysis (etc.) to remove auto-boxing •  Maybe: No-heap rep. for java.lang.Integer •  More subtle: Faster closure-like interfaces •  Etc., etc. Copyright Sun Microsystems, Inc 2008: 47
  • 48. Other great VM ideas (which might need community champions) •  Continuations (cf. Scheme call/cc) active work by Lukas Stadler at JKU, Linz •  Tail calls (functional languages, threaded code) active work by Arnold Schwaighofer at JKU, Linz •  Value object (cf. Lisp fixnums) •  Tuple types (cf. .NET structs, Fortress tuples) Copyright Sun Microsystems, Inc 2008: 48
  • 49. Are we re-inventing the world? •  No, we are adapting classic ideas to the JVM. >  In some cases, exposing mature JVM internals to language implementers, for the first time. >  In other cases, adjusting JVM architecture to be less Java- centric. •  Language implementers know what they want >  (and know how to simulate it with 100x slowdown) •  VM implementers know what VMs can do >  (and know how to make their favorite language sing) •  Let's bring them together. Copyright Sun Microsystems, Inc 2008: 49
  • 50. 2008–2018: a great decade for JVMs and languages http://wiki.jvmlangsummit.com http://openjdk.java.net/projects/mlvm http://blogs.sun.com/jrose