SlideShare a Scribd company logo
Ben Summers | ONEIS

Real-world polyglot programming
on the JVM
Real-world polyglot
programming on the JVM
Be n Su m me r s
Te c hnic a l d i re ctor, ON EIS
@b e nsu mm ers
This is nothing new.
Actual language usage
• Primary programming language
• Con!guration + build system
• Presentation
• Miscellaneous scripting
Polyglot programming
is a formalisation.
A polyglot application
Ruby

40%

Java

20%

JavaScript

20%

HTML, CSS, etc

18%

C++

1%

Python

1%
Table of contents
• How I became a polyglot programmer
• The case for polyglot programming
• Languages, JVM and polyglot apps
• Impedance mismatch
• Glue code
• Language boundaries
• Getting started
An accidental polyglot

flickr: darynbarry
ONEIS architecture
JavaScript

Ruby

Java

Java
Jetty

Internet

JVM

Worker Worker Worker Worker
JVM
JVM
JVM
JVM

Sandboxed
JavaScript
plugins
The case for polyglot

flickr: dm-set
Languages are not equal
• Expressiveness
• Performance
• Readability
• Style
• Static
• Dynamic
• Functional
• WTF
The case for polyglot
• “Real artists ship”
• You’re doing it already
• Formalisation and extension
Ola Bini’s pyramid

http://olabini.com/blog/2008/06/fractal-programming/
Java

JVM

Rub
y

San
dbo
Java
xed
Scr
plug ipt
ins

Ola Bini’s pyramid
Java
Ja
vaS
c
ript
Why the JVM?
• Great runtime
• Portability
• Common underlying VM for lots of
languages
• Interoperability
• Java library for everything
Side note:
Don’t forget the CLR
• Good stu" from Microsoft
• Great runtime
• DLR
• APIs

• Di"erent culture
• Trap?
Side note:
Don’t forget IPC
• Go old school
• Separate processes
• Common protocol over sockets and
pipes
• Thrift, Google Protocol Bu"ers, Avro
• or text over HTTP: XML, JSON, etc
Languages and the JVM

flickr: munksynz
What’s the best language?
• No such thing as the “best” language
• Use the best language for solving
your problems
• Polyglot is about avoiding compromises
Language choice
• Don’t use two closely related languages
• Don’t forget the standard library
• And some have special features
eg. concurrency libraries
Pick one from each column
Static

Dynamic

Scripting / DSLs

Java

Ruby

JavaScript

Scala

Groovy

Ruby

Clojure

Groovy

Jython
Aims
• Work in harmony
• Choose most appropriate language for
each task
• Choose carefully as choices are hard to
undo
Memory usage
• Multiple runtimes
• Multiple standard libraries
• Cloud is memory constrained
Impedance mismatch

flickr: h080
Impedance mismatch
• Type systems
• Your languages won’t agree on the
simplest things:
• Strings, Numbers, Dates, Arrays, null
Strings
• Java: UTF-16 (ish) strings
• JavaScript: implementation dependent
• Browsers: UCS-16 usually
• JVM: Whatever Java does + optimisations

• Ruby
• bytes (1.8), or bytes+encoding (1.9)

• JVM originated languages: Java Strings
Numbers
• Java: primitives, java.lang.Number, etc
• JavaScript: doubles only.
Plus odd Number object.
• Ruby:
• ints (always Fixnum) with silent promotion to
Bignum
• doubles, Rational
null
• Java: null
• Ruby: nil
• JVM languages: null
• JavaScript: null and undefined
Javascript’s
null and undefined
var o = {item: null};
if(o.item === undefined) {
console.log("0");
}
if(o.noSuchItem === undefined) {
console.log("1");
}

OUTPUT
1
Javascript’s
null and undefined
var o = {item: null};
if(o.item === undefined) {
console.log("0");
}
if(o.noSuchItem === undefined) {
console.log("1");
}
var undefined = 42;
if(o.noSuchItem === undefined) {
console.log("2");
}

OUTPUT
1
JavaScript Top Tip

Use JSHint in
your tests
(but not JSLint)
Strings, numbers, dates...

• Impedance mismatch means you have
to think about the boundaries
• Use Groovy?
Glue code

flickr: samcatchesides
Glue code
• Work around impedance mismatch
• Java: The new assembly language

• Rule enforcement & security
• Cheat until your pro!ler says it’s slow
• Serialise/deserialise to common format,
eg JSON
undefined is not null
JAVA
public class Host
extends ScriptableObject {
public String
jsFunction_f(String x)
{
System.out.println(
"x = " + x
);
}
}
undefined is not null
JAVA
public class Host
extends ScriptableObject {
public String
jsFunction_f(String x)
{
System.out.println(
"x = " + x
);
}
}

JAVASCRIPT
var h = new Host();
h.f("Hello");
h.f(2);
h.f(null);
h.f(undefined);
undefined is not null
JAVA
public class Host
extends ScriptableObject {
public String VALUES OF X
jsFunction_f(String x)
{
System.out.println(
"x = " + x"Hello"
);
"2"
}
null
}

"undefined"

JAVASCRIPT
var h = new Host();
h.f("Hello");
h.f(2);
h.f(null);
h.f(undefined);
null and undefined are 0
JAVA
public void jsFunction_each(
Integer desc, boolean hasDesc,
Integer qual, boolean hasQual)
JAVASCRIPT
Store.prototype.each = function(desc, qual) {
return this.$store.each(
desc, (desc !== null && desc !== undefined),
qual, (qual !== null && qual !== undefined)
);
};
Conversions
public static Date tryConvertJsDate(Object jsObject)
{
if(jsObject == null) { return null;}
if(nativeDateClass == null) {
try { nativeDateClass =
Class.forName("org.mozilla.javascript.NativeDate"); }
catch(ClassNotFoundException e) { /* ... */ }
}
if(nativeDateClass.isInstance(jsObject)) {
Object d = Context.jsToJava(jsObject, Date.class);
if(d != null && d instanceof Date) {
return (Date)d;
}
}
}

return null;
Calling Java is easy

• Don’t let JavaScript put you o"
• Calling Java APIs from any other
language is easy
Create a JPEG with Java
import
import
import
import

java.awt.image.BufferedImage;
java.awt.Graphics2D;
javax.imageio.ImageIO;
java.io.File;

public class MakeImage
{
public BufferedImage makeImage(int w, int h) {
BufferedImage image = new BufferedImage(w, h, TYPE_INT_RGB);
Graphics2D graphics = image.createGraphics();
graphics.drawString("Hello world", w/2, h/2);
graphics.dispose();
return image;
}

}

public static void main(String args[]) throws Exception {
BufferedImage img = (new MakeImage()).makeImage(200, 400);
ImageIO.write(img, "jpeg", new File("test.jpeg"));
}
Create a JPEG with JRuby
require 'java'
class MakeImage
java_import java.awt.image.BufferedImage;
java_import java.awt.Graphics2D;
def make_image(w, h)
image = BufferedImage.new(w, h, BufferedImage::TYPE_INT_RGB)
graphics = image.create_graphics
graphics.draw_string("Hello world", w/2, h/2)
graphics.dispose
image
end
end
java_import javax.imageio.ImageIO;
java_import java.io.File;
img = MakeImage.new.make_image(200, 400)
ImageIO.write(img, "jpeg", File.new("test.jpeg"))
The artwork
Divided by a
common language
• JRuby: Transparent bridging
• JavaScript: Host objects + bridging
• Groovy: Java is subset of Groovy
• Scala: Write Java with Scala syntax
JSR-223
• Java Scripting API
• Common API for scripting languages on
the JVM
• Scripting “engines” available for many
languages, variable quality

• Su"ers from impedance mismatch itself
• Functions may return unexpected types
Language boundaries

flickr: dinomite
Ola Bini’s pyramid

http://olabini.com/blog/2008/06/fractal-programming/
Boundaries
• Which language for each module?
• Clear boundaries, not a free-for-all.
• Well de!ned (and documented)
interfaces
Java to Ruby
public interface Framework
{
void startApplication();
void startBackgroundTasks();
void stopApplication();

}

Response handleFromJava(
HttpServletRequest request,
Application app,
byte[] body,
boolean isRequestSSL);
Ruby implementation
class Framework
def start_application
# ...
end
def handle_from_java(
servlet_request, application, body, is_ssl)
# magic goes here
end
end
JavaScript to Ruby
(via Java)
public interface AppWorkUnit
{
public int id();
public
public
public
public

}

Integer actionableById();
void setActionableById(Integer id);
String jsGetDataRaw();
void jsSetDataRaw(String data);

public boolean save();
public void destroy();
Security

• Trust models
• Sandboxing interpreters
vs sandboxed interpreters
Building the team

flickr: AaronLMGoodwin
Hiring polyglots
Hiring polyglots
developers
Hiring polyglots
developers
• Find people who can write code,
not people who can write Java.
• Test to see if programming is instinctive,
not syntax and trivia.
• Look for people who continuously learn,
not those who have learnt.
Finding a polyglot job
• Smaller companies, or smaller teams
within large companies
• Early stage projects, not maintenance or
enhancements
• Talk to really good recruiters
• Networking!
Getting started

flickr: holyhoses
The Enterprise
• It’s just Java the JVM
• Implement a servlet
• Use tools like Warbler
• TorqueBox
• New job outside the Enterprise
Starting points
• Use JRuby to try out an API
• Use Ruby testing libraries to test your
Java
• Use Groovy to a make business rules
DSL
• Write a layer of a small project in a
dynamic language
Polyglot programming:
Not new,
but very e!ective.
Questions?
Be n Su m me r s
Te c hnic a l d i re ctor, ON EIS
@b e nsu mm ers

http://bens.me.u k

onei s .co.uk / jo b s

More Related Content

What's hot

What is new and cool j2se & java
What is new and cool j2se & javaWhat is new and cool j2se & java
What is new and cool j2se & javaEugene Bogaart
 
Scarab: SAT-based Constraint Programming System in Scala / Scala上で実現された制約プログラ...
Scarab: SAT-based Constraint Programming System in Scala / Scala上で実現された制約プログラ...Scarab: SAT-based Constraint Programming System in Scala / Scala上で実現された制約プログラ...
Scarab: SAT-based Constraint Programming System in Scala / Scala上で実現された制約プログラ...
scalaconfjp
 
FOSDEM2016 - Ruby and OMR
FOSDEM2016 - Ruby and OMRFOSDEM2016 - Ruby and OMR
FOSDEM2016 - Ruby and OMR
Charlie Gracie
 
Down the Rabbit Hole: An Adventure in JVM Wonderland
Down the Rabbit Hole: An Adventure in JVM WonderlandDown the Rabbit Hole: An Adventure in JVM Wonderland
Down the Rabbit Hole: An Adventure in JVM Wonderland
Charles Nutter
 
Why scala is not my ideal language and what I can do with this
Why scala is not my ideal language and what I can do with thisWhy scala is not my ideal language and what I can do with this
Why scala is not my ideal language and what I can do with this
Ruslan Shevchenko
 
JRuby and Invokedynamic - Japan JUG 2015
JRuby and Invokedynamic - Japan JUG 2015JRuby and Invokedynamic - Japan JUG 2015
JRuby and Invokedynamic - Japan JUG 2015
Charles Nutter
 
Introduction to D programming language at Weka.IO
Introduction to D programming language at Weka.IOIntroduction to D programming language at Weka.IO
Introduction to D programming language at Weka.IO
Liran Zvibel
 
Why Scala for Web 2.0?
Why Scala for Web 2.0?Why Scala for Web 2.0?
Why Scala for Web 2.0?
Alex Payne
 
ClojureScript Anatomy
ClojureScript AnatomyClojureScript Anatomy
ClojureScript Anatomy
Mike Fogus
 
The Return of the Living Datalog
The Return of the Living DatalogThe Return of the Living Datalog
The Return of the Living Datalog
Mike Fogus
 
Enterprise javascriptsession3
Enterprise javascriptsession3Enterprise javascriptsession3
Enterprise javascriptsession3Troy Miles
 
Basic info on java intro
Basic info on java introBasic info on java intro
Basic info on java intro
kabirmahlotra
 
Introduction to Scala
Introduction to ScalaIntroduction to Scala
Introduction to Scala
Mohammad Hossein Rimaz
 
Auto cad 2006_api_overview
Auto cad 2006_api_overviewAuto cad 2006_api_overview
Auto cad 2006_api_overviewscdhruv5
 
Build Cloud Applications with Akka and Heroku
Build Cloud Applications with Akka and HerokuBuild Cloud Applications with Akka and Heroku
Build Cloud Applications with Akka and HerokuSalesforce Developers
 
R ext world/ useR! Kiev
R ext world/ useR!  KievR ext world/ useR!  Kiev
R ext world/ useR! Kiev
Ruslan Shevchenko
 
DataMapper on Infinispan
DataMapper on InfinispanDataMapper on Infinispan
DataMapper on InfinispanLance Ball
 
C++ Actor Model - You’ve Got Mail ...
C++ Actor Model - You’ve Got Mail ...C++ Actor Model - You’ve Got Mail ...
C++ Actor Model - You’ve Got Mail ...
Gianluca Padovani
 

What's hot (20)

What is new and cool j2se & java
What is new and cool j2se & javaWhat is new and cool j2se & java
What is new and cool j2se & java
 
Scarab: SAT-based Constraint Programming System in Scala / Scala上で実現された制約プログラ...
Scarab: SAT-based Constraint Programming System in Scala / Scala上で実現された制約プログラ...Scarab: SAT-based Constraint Programming System in Scala / Scala上で実現された制約プログラ...
Scarab: SAT-based Constraint Programming System in Scala / Scala上で実現された制約プログラ...
 
FOSDEM2016 - Ruby and OMR
FOSDEM2016 - Ruby and OMRFOSDEM2016 - Ruby and OMR
FOSDEM2016 - Ruby and OMR
 
Java 8 Lambda
Java 8 LambdaJava 8 Lambda
Java 8 Lambda
 
Down the Rabbit Hole: An Adventure in JVM Wonderland
Down the Rabbit Hole: An Adventure in JVM WonderlandDown the Rabbit Hole: An Adventure in JVM Wonderland
Down the Rabbit Hole: An Adventure in JVM Wonderland
 
Why scala is not my ideal language and what I can do with this
Why scala is not my ideal language and what I can do with thisWhy scala is not my ideal language and what I can do with this
Why scala is not my ideal language and what I can do with this
 
JRuby and Invokedynamic - Japan JUG 2015
JRuby and Invokedynamic - Japan JUG 2015JRuby and Invokedynamic - Japan JUG 2015
JRuby and Invokedynamic - Japan JUG 2015
 
Introduction to D programming language at Weka.IO
Introduction to D programming language at Weka.IOIntroduction to D programming language at Weka.IO
Introduction to D programming language at Weka.IO
 
Why Scala for Web 2.0?
Why Scala for Web 2.0?Why Scala for Web 2.0?
Why Scala for Web 2.0?
 
ClojureScript Anatomy
ClojureScript AnatomyClojureScript Anatomy
ClojureScript Anatomy
 
The Return of the Living Datalog
The Return of the Living DatalogThe Return of the Living Datalog
The Return of the Living Datalog
 
Enterprise javascriptsession3
Enterprise javascriptsession3Enterprise javascriptsession3
Enterprise javascriptsession3
 
Basic info on java intro
Basic info on java introBasic info on java intro
Basic info on java intro
 
Introduction to Scala
Introduction to ScalaIntroduction to Scala
Introduction to Scala
 
Auto cad 2006_api_overview
Auto cad 2006_api_overviewAuto cad 2006_api_overview
Auto cad 2006_api_overview
 
Build Cloud Applications with Akka and Heroku
Build Cloud Applications with Akka and HerokuBuild Cloud Applications with Akka and Heroku
Build Cloud Applications with Akka and Heroku
 
R ext world/ useR! Kiev
R ext world/ useR!  KievR ext world/ useR!  Kiev
R ext world/ useR! Kiev
 
DataMapper on Infinispan
DataMapper on InfinispanDataMapper on Infinispan
DataMapper on Infinispan
 
C++ Actor Model - You’ve Got Mail ...
C++ Actor Model - You’ve Got Mail ...C++ Actor Model - You’ve Got Mail ...
C++ Actor Model - You’ve Got Mail ...
 
Scala
ScalaScala
Scala
 

Viewers also liked

How Hailo fuels its growth using NoSQL storage and analytics - Dave Gardner (...
How Hailo fuels its growth using NoSQL storage and analytics - Dave Gardner (...How Hailo fuels its growth using NoSQL storage and analytics - Dave Gardner (...
How Hailo fuels its growth using NoSQL storage and analytics - Dave Gardner (...
jaxLondonConference
 
Big Events, Mob Scale - Darach Ennis (Push Technology)
Big Events, Mob Scale - Darach Ennis (Push Technology)Big Events, Mob Scale - Darach Ennis (Push Technology)
Big Events, Mob Scale - Darach Ennis (Push Technology)
jaxLondonConference
 
Why other ppl_dont_get_it
Why other ppl_dont_get_itWhy other ppl_dont_get_it
Why other ppl_dont_get_it
jaxLondonConference
 
Are Hypermedia APIs Just Hype? - Aaron Phethean (Temenos) & Daniel Feist (Mul...
Are Hypermedia APIs Just Hype? - Aaron Phethean (Temenos) & Daniel Feist (Mul...Are Hypermedia APIs Just Hype? - Aaron Phethean (Temenos) & Daniel Feist (Mul...
Are Hypermedia APIs Just Hype? - Aaron Phethean (Temenos) & Daniel Feist (Mul...
jaxLondonConference
 
Bringing your app to the web with Dart - Chris Buckett (Entity Group)
Bringing your app to the web with Dart - Chris Buckett (Entity Group)Bringing your app to the web with Dart - Chris Buckett (Entity Group)
Bringing your app to the web with Dart - Chris Buckett (Entity Group)
jaxLondonConference
 
Design is a Process, not an Artefact - Trisha Gee (MongoDB)
Design is a Process, not an Artefact - Trisha Gee (MongoDB)Design is a Process, not an Artefact - Trisha Gee (MongoDB)
Design is a Process, not an Artefact - Trisha Gee (MongoDB)
jaxLondonConference
 
Streams and Things - Darach Ennis (Ubiquiti Networks)
Streams and Things - Darach Ennis (Ubiquiti Networks)Streams and Things - Darach Ennis (Ubiquiti Networks)
Streams and Things - Darach Ennis (Ubiquiti Networks)
jaxLondonConference
 
A real-time architecture using Hadoop & Storm - Nathan Bijnens & Geert Van La...
A real-time architecture using Hadoop & Storm - Nathan Bijnens & Geert Van La...A real-time architecture using Hadoop & Storm - Nathan Bijnens & Geert Van La...
A real-time architecture using Hadoop & Storm - Nathan Bijnens & Geert Van La...
jaxLondonConference
 
Garbage Collection: the Useful Parts - Martijn Verburg & Dr John Oliver (jCla...
Garbage Collection: the Useful Parts - Martijn Verburg & Dr John Oliver (jCla...Garbage Collection: the Useful Parts - Martijn Verburg & Dr John Oliver (jCla...
Garbage Collection: the Useful Parts - Martijn Verburg & Dr John Oliver (jCla...
jaxLondonConference
 
Lambda Expressions: Myths and Mistakes - Richard Warburton (jClarity)
Lambda Expressions: Myths and Mistakes - Richard Warburton (jClarity)Lambda Expressions: Myths and Mistakes - Richard Warburton (jClarity)
Lambda Expressions: Myths and Mistakes - Richard Warburton (jClarity)
jaxLondonConference
 
The state of the art biorepository at ILRI
The state of the art biorepository at ILRIThe state of the art biorepository at ILRI
The state of the art biorepository at ILRI
Absolomon Kihara
 
Databases and agile development - Dwight Merriman (MongoDB)
Databases and agile development - Dwight Merriman (MongoDB)Databases and agile development - Dwight Merriman (MongoDB)
Databases and agile development - Dwight Merriman (MongoDB)
jaxLondonConference
 
Interactive media applications
Interactive media applicationsInteractive media applications
Interactive media applicationsNicole174
 
Scaling Scala to the database - Stefan Zeiger (Typesafe)
Scaling Scala to the database - Stefan Zeiger (Typesafe)Scaling Scala to the database - Stefan Zeiger (Typesafe)
Scaling Scala to the database - Stefan Zeiger (Typesafe)
jaxLondonConference
 
Introducing Vert.x 2.0 - Taking polyglot application development to the next ...
Introducing Vert.x 2.0 - Taking polyglot application development to the next ...Introducing Vert.x 2.0 - Taking polyglot application development to the next ...
Introducing Vert.x 2.0 - Taking polyglot application development to the next ...
jaxLondonConference
 
Little words of wisdom for the developer - Guillaume Laforge (Pivotal)
Little words of wisdom for the developer - Guillaume Laforge (Pivotal)Little words of wisdom for the developer - Guillaume Laforge (Pivotal)
Little words of wisdom for the developer - Guillaume Laforge (Pivotal)
jaxLondonConference
 
What You Need to Know About Lambdas - Jamie Allen (Typesafe)
What You Need to Know About Lambdas - Jamie Allen (Typesafe)What You Need to Know About Lambdas - Jamie Allen (Typesafe)
What You Need to Know About Lambdas - Jamie Allen (Typesafe)
jaxLondonConference
 
Designing and Building a Graph Database Application - Ian Robinson (Neo Techn...
Designing and Building a Graph Database Application - Ian Robinson (Neo Techn...Designing and Building a Graph Database Application - Ian Robinson (Neo Techn...
Designing and Building a Graph Database Application - Ian Robinson (Neo Techn...
jaxLondonConference
 
Legal and ethical considerations redone
Legal and ethical considerations   redoneLegal and ethical considerations   redone
Legal and ethical considerations redoneNicole174
 
Packed Objects: Fast Talking Java Meets Native Code - Steve Poole (IBM)
Packed Objects: Fast Talking Java Meets Native Code - Steve Poole (IBM)Packed Objects: Fast Talking Java Meets Native Code - Steve Poole (IBM)
Packed Objects: Fast Talking Java Meets Native Code - Steve Poole (IBM)
jaxLondonConference
 

Viewers also liked (20)

How Hailo fuels its growth using NoSQL storage and analytics - Dave Gardner (...
How Hailo fuels its growth using NoSQL storage and analytics - Dave Gardner (...How Hailo fuels its growth using NoSQL storage and analytics - Dave Gardner (...
How Hailo fuels its growth using NoSQL storage and analytics - Dave Gardner (...
 
Big Events, Mob Scale - Darach Ennis (Push Technology)
Big Events, Mob Scale - Darach Ennis (Push Technology)Big Events, Mob Scale - Darach Ennis (Push Technology)
Big Events, Mob Scale - Darach Ennis (Push Technology)
 
Why other ppl_dont_get_it
Why other ppl_dont_get_itWhy other ppl_dont_get_it
Why other ppl_dont_get_it
 
Are Hypermedia APIs Just Hype? - Aaron Phethean (Temenos) & Daniel Feist (Mul...
Are Hypermedia APIs Just Hype? - Aaron Phethean (Temenos) & Daniel Feist (Mul...Are Hypermedia APIs Just Hype? - Aaron Phethean (Temenos) & Daniel Feist (Mul...
Are Hypermedia APIs Just Hype? - Aaron Phethean (Temenos) & Daniel Feist (Mul...
 
Bringing your app to the web with Dart - Chris Buckett (Entity Group)
Bringing your app to the web with Dart - Chris Buckett (Entity Group)Bringing your app to the web with Dart - Chris Buckett (Entity Group)
Bringing your app to the web with Dart - Chris Buckett (Entity Group)
 
Design is a Process, not an Artefact - Trisha Gee (MongoDB)
Design is a Process, not an Artefact - Trisha Gee (MongoDB)Design is a Process, not an Artefact - Trisha Gee (MongoDB)
Design is a Process, not an Artefact - Trisha Gee (MongoDB)
 
Streams and Things - Darach Ennis (Ubiquiti Networks)
Streams and Things - Darach Ennis (Ubiquiti Networks)Streams and Things - Darach Ennis (Ubiquiti Networks)
Streams and Things - Darach Ennis (Ubiquiti Networks)
 
A real-time architecture using Hadoop & Storm - Nathan Bijnens & Geert Van La...
A real-time architecture using Hadoop & Storm - Nathan Bijnens & Geert Van La...A real-time architecture using Hadoop & Storm - Nathan Bijnens & Geert Van La...
A real-time architecture using Hadoop & Storm - Nathan Bijnens & Geert Van La...
 
Garbage Collection: the Useful Parts - Martijn Verburg & Dr John Oliver (jCla...
Garbage Collection: the Useful Parts - Martijn Verburg & Dr John Oliver (jCla...Garbage Collection: the Useful Parts - Martijn Verburg & Dr John Oliver (jCla...
Garbage Collection: the Useful Parts - Martijn Verburg & Dr John Oliver (jCla...
 
Lambda Expressions: Myths and Mistakes - Richard Warburton (jClarity)
Lambda Expressions: Myths and Mistakes - Richard Warburton (jClarity)Lambda Expressions: Myths and Mistakes - Richard Warburton (jClarity)
Lambda Expressions: Myths and Mistakes - Richard Warburton (jClarity)
 
The state of the art biorepository at ILRI
The state of the art biorepository at ILRIThe state of the art biorepository at ILRI
The state of the art biorepository at ILRI
 
Databases and agile development - Dwight Merriman (MongoDB)
Databases and agile development - Dwight Merriman (MongoDB)Databases and agile development - Dwight Merriman (MongoDB)
Databases and agile development - Dwight Merriman (MongoDB)
 
Interactive media applications
Interactive media applicationsInteractive media applications
Interactive media applications
 
Scaling Scala to the database - Stefan Zeiger (Typesafe)
Scaling Scala to the database - Stefan Zeiger (Typesafe)Scaling Scala to the database - Stefan Zeiger (Typesafe)
Scaling Scala to the database - Stefan Zeiger (Typesafe)
 
Introducing Vert.x 2.0 - Taking polyglot application development to the next ...
Introducing Vert.x 2.0 - Taking polyglot application development to the next ...Introducing Vert.x 2.0 - Taking polyglot application development to the next ...
Introducing Vert.x 2.0 - Taking polyglot application development to the next ...
 
Little words of wisdom for the developer - Guillaume Laforge (Pivotal)
Little words of wisdom for the developer - Guillaume Laforge (Pivotal)Little words of wisdom for the developer - Guillaume Laforge (Pivotal)
Little words of wisdom for the developer - Guillaume Laforge (Pivotal)
 
What You Need to Know About Lambdas - Jamie Allen (Typesafe)
What You Need to Know About Lambdas - Jamie Allen (Typesafe)What You Need to Know About Lambdas - Jamie Allen (Typesafe)
What You Need to Know About Lambdas - Jamie Allen (Typesafe)
 
Designing and Building a Graph Database Application - Ian Robinson (Neo Techn...
Designing and Building a Graph Database Application - Ian Robinson (Neo Techn...Designing and Building a Graph Database Application - Ian Robinson (Neo Techn...
Designing and Building a Graph Database Application - Ian Robinson (Neo Techn...
 
Legal and ethical considerations redone
Legal and ethical considerations   redoneLegal and ethical considerations   redone
Legal and ethical considerations redone
 
Packed Objects: Fast Talking Java Meets Native Code - Steve Poole (IBM)
Packed Objects: Fast Talking Java Meets Native Code - Steve Poole (IBM)Packed Objects: Fast Talking Java Meets Native Code - Steve Poole (IBM)
Packed Objects: Fast Talking Java Meets Native Code - Steve Poole (IBM)
 

Similar to Real-world polyglot programming on the JVM - Ben Summers (ONEIS)

Scala Introduction
Scala IntroductionScala Introduction
Scala Introduction
Adrian Spender
 
Charles nutter star techconf 2011 - jvm languages
Charles nutter   star techconf 2011 - jvm languagesCharles nutter   star techconf 2011 - jvm languages
Charles nutter star techconf 2011 - jvm languagesStarTech Conference
 
The Enterprise Strikes Back
The Enterprise Strikes BackThe Enterprise Strikes Back
The Enterprise Strikes Back
Burke Libbey
 
Intro to J Ruby
Intro to J RubyIntro to J Ruby
Intro to J Ruby
Frederic Jean
 
JRuby - Enterprise 2.0
JRuby - Enterprise 2.0JRuby - Enterprise 2.0
JRuby - Enterprise 2.0Jan Sifra
 
Oscon Java Testing on the Fast Lane
Oscon Java Testing on the Fast LaneOscon Java Testing on the Fast Lane
Oscon Java Testing on the Fast Lane
Andres Almiray
 
Ola Bini Evolving The Java Platform
Ola Bini Evolving The Java PlatformOla Bini Evolving The Java Platform
Ola Bini Evolving The Java Platformdeimos
 
Javascript Journey
Javascript JourneyJavascript Journey
Javascript Journey
Wanqiang Ji
 
Static or Dynamic Typing? Why not both?
Static or Dynamic Typing? Why not both?Static or Dynamic Typing? Why not both?
Static or Dynamic Typing? Why not both?
Mario Camou Riveroll
 
Shiksharth com java_topics
Shiksharth com java_topicsShiksharth com java_topics
Shiksharth com java_topics
Rajesh Verma
 
Quick Intro To JRuby
Quick Intro To JRubyQuick Intro To JRuby
Quick Intro To JRuby
Frederic Jean
 
JVM languages "flame wars"
JVM languages "flame wars"JVM languages "flame wars"
JVM languages "flame wars"
Gal Marder
 
Kotlin for Android Developers - 1
Kotlin for Android Developers - 1Kotlin for Android Developers - 1
Kotlin for Android Developers - 1
Mohamed Nabil, MSc.
 
Ruby on the JVM
Ruby on the JVMRuby on the JVM
Ruby on the JVM
Kresten Krab Thorup
 
Developing cross platform desktop application with Ruby
Developing cross platform desktop application with RubyDeveloping cross platform desktop application with Ruby
Developing cross platform desktop application with Ruby
Anis Ahmad
 
Groovy a Scripting Language for Java
Groovy a Scripting Language for JavaGroovy a Scripting Language for Java
Groovy a Scripting Language for Java
Charles Anderson
 
JRoR Deploying Rails on JRuby
JRoR Deploying Rails on JRubyJRoR Deploying Rails on JRuby
JRoR Deploying Rails on JRubyelliando dias
 

Similar to Real-world polyglot programming on the JVM - Ben Summers (ONEIS) (20)

Java script core
Java script coreJava script core
Java script core
 
Scala Introduction
Scala IntroductionScala Introduction
Scala Introduction
 
JavaScript Good Practices
JavaScript Good PracticesJavaScript Good Practices
JavaScript Good Practices
 
Charles nutter star techconf 2011 - jvm languages
Charles nutter   star techconf 2011 - jvm languagesCharles nutter   star techconf 2011 - jvm languages
Charles nutter star techconf 2011 - jvm languages
 
The Enterprise Strikes Back
The Enterprise Strikes BackThe Enterprise Strikes Back
The Enterprise Strikes Back
 
Intro to J Ruby
Intro to J RubyIntro to J Ruby
Intro to J Ruby
 
JRuby - Enterprise 2.0
JRuby - Enterprise 2.0JRuby - Enterprise 2.0
JRuby - Enterprise 2.0
 
Oscon Java Testing on the Fast Lane
Oscon Java Testing on the Fast LaneOscon Java Testing on the Fast Lane
Oscon Java Testing on the Fast Lane
 
Ola Bini Evolving The Java Platform
Ola Bini Evolving The Java PlatformOla Bini Evolving The Java Platform
Ola Bini Evolving The Java Platform
 
Javascript Journey
Javascript JourneyJavascript Journey
Javascript Journey
 
Static or Dynamic Typing? Why not both?
Static or Dynamic Typing? Why not both?Static or Dynamic Typing? Why not both?
Static or Dynamic Typing? Why not both?
 
Shiksharth com java_topics
Shiksharth com java_topicsShiksharth com java_topics
Shiksharth com java_topics
 
Quick Intro To JRuby
Quick Intro To JRubyQuick Intro To JRuby
Quick Intro To JRuby
 
JVM languages "flame wars"
JVM languages "flame wars"JVM languages "flame wars"
JVM languages "flame wars"
 
Kotlin for Android Developers - 1
Kotlin for Android Developers - 1Kotlin for Android Developers - 1
Kotlin for Android Developers - 1
 
Ruby on the JVM
Ruby on the JVMRuby on the JVM
Ruby on the JVM
 
DSLs in JavaScript
DSLs in JavaScriptDSLs in JavaScript
DSLs in JavaScript
 
Developing cross platform desktop application with Ruby
Developing cross platform desktop application with RubyDeveloping cross platform desktop application with Ruby
Developing cross platform desktop application with Ruby
 
Groovy a Scripting Language for Java
Groovy a Scripting Language for JavaGroovy a Scripting Language for Java
Groovy a Scripting Language for Java
 
JRoR Deploying Rails on JRuby
JRoR Deploying Rails on JRubyJRoR Deploying Rails on JRuby
JRoR Deploying Rails on JRuby
 

More from jaxLondonConference

Conflict Free Replicated Data-types in Eventually Consistent Systems - Joel J...
Conflict Free Replicated Data-types in Eventually Consistent Systems - Joel J...Conflict Free Replicated Data-types in Eventually Consistent Systems - Joel J...
Conflict Free Replicated Data-types in Eventually Consistent Systems - Joel J...
jaxLondonConference
 
JVM Support for Multitenant Applications - Steve Poole (IBM)
JVM Support for Multitenant Applications - Steve Poole (IBM)JVM Support for Multitenant Applications - Steve Poole (IBM)
JVM Support for Multitenant Applications - Steve Poole (IBM)
jaxLondonConference
 
How Java got its Mojo Back - James Governor (Redmonk)
How Java got its Mojo Back - James Governor (Redmonk)					How Java got its Mojo Back - James Governor (Redmonk)
How Java got its Mojo Back - James Governor (Redmonk)
jaxLondonConference
 
Java Testing With Spock - Ken Sipe (Trexin Consulting)
Java Testing With Spock - Ken Sipe (Trexin Consulting)Java Testing With Spock - Ken Sipe (Trexin Consulting)
Java Testing With Spock - Ken Sipe (Trexin Consulting)
jaxLondonConference
 
What makes Groovy Groovy - Guillaume Laforge (Pivotal)
What makes Groovy Groovy  - Guillaume Laforge (Pivotal)What makes Groovy Groovy  - Guillaume Laforge (Pivotal)
What makes Groovy Groovy - Guillaume Laforge (Pivotal)
jaxLondonConference
 
The Java Virtual Machine is Over - The Polyglot VM is here - Marcus Lagergren...
The Java Virtual Machine is Over - The Polyglot VM is here - Marcus Lagergren...The Java Virtual Machine is Over - The Polyglot VM is here - Marcus Lagergren...
The Java Virtual Machine is Over - The Polyglot VM is here - Marcus Lagergren...
jaxLondonConference
 
Java EE 7 Platform: Boosting Productivity and Embracing HTML5 - Arun Gupta (R...
Java EE 7 Platform: Boosting Productivity and Embracing HTML5 - Arun Gupta (R...Java EE 7 Platform: Boosting Productivity and Embracing HTML5 - Arun Gupta (R...
Java EE 7 Platform: Boosting Productivity and Embracing HTML5 - Arun Gupta (R...
jaxLondonConference
 
Exploring the Talend unified Big Data toolset for sentiment analysis - Ben Br...
Exploring the Talend unified Big Data toolset for sentiment analysis - Ben Br...Exploring the Talend unified Big Data toolset for sentiment analysis - Ben Br...
Exploring the Talend unified Big Data toolset for sentiment analysis - Ben Br...
jaxLondonConference
 
The Curious Clojurist - Neal Ford (Thoughtworks)
The Curious Clojurist - Neal Ford (Thoughtworks)The Curious Clojurist - Neal Ford (Thoughtworks)
The Curious Clojurist - Neal Ford (Thoughtworks)
jaxLondonConference
 
TDD at scale - Mash Badar (UBS)
TDD at scale - Mash Badar (UBS)TDD at scale - Mash Badar (UBS)
TDD at scale - Mash Badar (UBS)
jaxLondonConference
 
Run Your Java Code on Cloud Foundry - Andy Piper (Pivotal)
Run Your Java Code on Cloud Foundry - Andy Piper (Pivotal)Run Your Java Code on Cloud Foundry - Andy Piper (Pivotal)
Run Your Java Code on Cloud Foundry - Andy Piper (Pivotal)
jaxLondonConference
 
Put your Java apps to sleep? Find out how - John Matthew Holt (Waratek)
Put your Java apps to sleep? Find out how - John Matthew Holt (Waratek)Put your Java apps to sleep? Find out how - John Matthew Holt (Waratek)
Put your Java apps to sleep? Find out how - John Matthew Holt (Waratek)
jaxLondonConference
 
Project Lambda: Functional Programming Constructs in Java - Simon Ritter (Ora...
Project Lambda: Functional Programming Constructs in Java - Simon Ritter (Ora...Project Lambda: Functional Programming Constructs in Java - Simon Ritter (Ora...
Project Lambda: Functional Programming Constructs in Java - Simon Ritter (Ora...
jaxLondonConference
 
Do You Like Coffee with Your dessert? Java and the Raspberry Pi - Simon Ritte...
Do You Like Coffee with Your dessert? Java and the Raspberry Pi - Simon Ritte...Do You Like Coffee with Your dessert? Java and the Raspberry Pi - Simon Ritte...
Do You Like Coffee with Your dessert? Java and the Raspberry Pi - Simon Ritte...
jaxLondonConference
 
Large scale, interactive ad-hoc queries over different datastores with Apache...
Large scale, interactive ad-hoc queries over different datastores with Apache...Large scale, interactive ad-hoc queries over different datastores with Apache...
Large scale, interactive ad-hoc queries over different datastores with Apache...
jaxLondonConference
 
Designing Resilient Application Platforms with Apache Cassandra - Hayato Shim...
Designing Resilient Application Platforms with Apache Cassandra - Hayato Shim...Designing Resilient Application Platforms with Apache Cassandra - Hayato Shim...
Designing Resilient Application Platforms with Apache Cassandra - Hayato Shim...
jaxLondonConference
 
Practical Performance: Understand the Performance of Your Application - Chris...
Practical Performance: Understand the Performance of Your Application - Chris...Practical Performance: Understand the Performance of Your Application - Chris...
Practical Performance: Understand the Performance of Your Application - Chris...
jaxLondonConference
 

More from jaxLondonConference (17)

Conflict Free Replicated Data-types in Eventually Consistent Systems - Joel J...
Conflict Free Replicated Data-types in Eventually Consistent Systems - Joel J...Conflict Free Replicated Data-types in Eventually Consistent Systems - Joel J...
Conflict Free Replicated Data-types in Eventually Consistent Systems - Joel J...
 
JVM Support for Multitenant Applications - Steve Poole (IBM)
JVM Support for Multitenant Applications - Steve Poole (IBM)JVM Support for Multitenant Applications - Steve Poole (IBM)
JVM Support for Multitenant Applications - Steve Poole (IBM)
 
How Java got its Mojo Back - James Governor (Redmonk)
How Java got its Mojo Back - James Governor (Redmonk)					How Java got its Mojo Back - James Governor (Redmonk)
How Java got its Mojo Back - James Governor (Redmonk)
 
Java Testing With Spock - Ken Sipe (Trexin Consulting)
Java Testing With Spock - Ken Sipe (Trexin Consulting)Java Testing With Spock - Ken Sipe (Trexin Consulting)
Java Testing With Spock - Ken Sipe (Trexin Consulting)
 
What makes Groovy Groovy - Guillaume Laforge (Pivotal)
What makes Groovy Groovy  - Guillaume Laforge (Pivotal)What makes Groovy Groovy  - Guillaume Laforge (Pivotal)
What makes Groovy Groovy - Guillaume Laforge (Pivotal)
 
The Java Virtual Machine is Over - The Polyglot VM is here - Marcus Lagergren...
The Java Virtual Machine is Over - The Polyglot VM is here - Marcus Lagergren...The Java Virtual Machine is Over - The Polyglot VM is here - Marcus Lagergren...
The Java Virtual Machine is Over - The Polyglot VM is here - Marcus Lagergren...
 
Java EE 7 Platform: Boosting Productivity and Embracing HTML5 - Arun Gupta (R...
Java EE 7 Platform: Boosting Productivity and Embracing HTML5 - Arun Gupta (R...Java EE 7 Platform: Boosting Productivity and Embracing HTML5 - Arun Gupta (R...
Java EE 7 Platform: Boosting Productivity and Embracing HTML5 - Arun Gupta (R...
 
Exploring the Talend unified Big Data toolset for sentiment analysis - Ben Br...
Exploring the Talend unified Big Data toolset for sentiment analysis - Ben Br...Exploring the Talend unified Big Data toolset for sentiment analysis - Ben Br...
Exploring the Talend unified Big Data toolset for sentiment analysis - Ben Br...
 
The Curious Clojurist - Neal Ford (Thoughtworks)
The Curious Clojurist - Neal Ford (Thoughtworks)The Curious Clojurist - Neal Ford (Thoughtworks)
The Curious Clojurist - Neal Ford (Thoughtworks)
 
TDD at scale - Mash Badar (UBS)
TDD at scale - Mash Badar (UBS)TDD at scale - Mash Badar (UBS)
TDD at scale - Mash Badar (UBS)
 
Run Your Java Code on Cloud Foundry - Andy Piper (Pivotal)
Run Your Java Code on Cloud Foundry - Andy Piper (Pivotal)Run Your Java Code on Cloud Foundry - Andy Piper (Pivotal)
Run Your Java Code on Cloud Foundry - Andy Piper (Pivotal)
 
Put your Java apps to sleep? Find out how - John Matthew Holt (Waratek)
Put your Java apps to sleep? Find out how - John Matthew Holt (Waratek)Put your Java apps to sleep? Find out how - John Matthew Holt (Waratek)
Put your Java apps to sleep? Find out how - John Matthew Holt (Waratek)
 
Project Lambda: Functional Programming Constructs in Java - Simon Ritter (Ora...
Project Lambda: Functional Programming Constructs in Java - Simon Ritter (Ora...Project Lambda: Functional Programming Constructs in Java - Simon Ritter (Ora...
Project Lambda: Functional Programming Constructs in Java - Simon Ritter (Ora...
 
Do You Like Coffee with Your dessert? Java and the Raspberry Pi - Simon Ritte...
Do You Like Coffee with Your dessert? Java and the Raspberry Pi - Simon Ritte...Do You Like Coffee with Your dessert? Java and the Raspberry Pi - Simon Ritte...
Do You Like Coffee with Your dessert? Java and the Raspberry Pi - Simon Ritte...
 
Large scale, interactive ad-hoc queries over different datastores with Apache...
Large scale, interactive ad-hoc queries over different datastores with Apache...Large scale, interactive ad-hoc queries over different datastores with Apache...
Large scale, interactive ad-hoc queries over different datastores with Apache...
 
Designing Resilient Application Platforms with Apache Cassandra - Hayato Shim...
Designing Resilient Application Platforms with Apache Cassandra - Hayato Shim...Designing Resilient Application Platforms with Apache Cassandra - Hayato Shim...
Designing Resilient Application Platforms with Apache Cassandra - Hayato Shim...
 
Practical Performance: Understand the Performance of Your Application - Chris...
Practical Performance: Understand the Performance of Your Application - Chris...Practical Performance: Understand the Performance of Your Application - Chris...
Practical Performance: Understand the Performance of Your Application - Chris...
 

Recently uploaded

From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
Abida Shariff
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 

Recently uploaded (20)

From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 

Real-world polyglot programming on the JVM - Ben Summers (ONEIS)

  • 1. Ben Summers | ONEIS Real-world polyglot programming on the JVM
  • 2. Real-world polyglot programming on the JVM Be n Su m me r s Te c hnic a l d i re ctor, ON EIS @b e nsu mm ers
  • 4.
  • 5.
  • 6. Actual language usage • Primary programming language • Con!guration + build system • Presentation • Miscellaneous scripting
  • 7. Polyglot programming is a formalisation.
  • 9. Table of contents • How I became a polyglot programmer • The case for polyglot programming • Languages, JVM and polyglot apps • Impedance mismatch • Glue code • Language boundaries • Getting started
  • 11.
  • 12. ONEIS architecture JavaScript Ruby Java Java Jetty Internet JVM Worker Worker Worker Worker JVM JVM JVM JVM Sandboxed JavaScript plugins
  • 13. The case for polyglot flickr: dm-set
  • 14. Languages are not equal • Expressiveness • Performance • Readability • Style • Static • Dynamic • Functional • WTF
  • 15. The case for polyglot • “Real artists ship” • You’re doing it already • Formalisation and extension
  • 18. Why the JVM? • Great runtime • Portability • Common underlying VM for lots of languages • Interoperability • Java library for everything
  • 19. Side note: Don’t forget the CLR • Good stu" from Microsoft • Great runtime • DLR • APIs • Di"erent culture • Trap?
  • 20. Side note: Don’t forget IPC • Go old school • Separate processes • Common protocol over sockets and pipes • Thrift, Google Protocol Bu"ers, Avro • or text over HTTP: XML, JSON, etc
  • 21. Languages and the JVM flickr: munksynz
  • 22. What’s the best language? • No such thing as the “best” language • Use the best language for solving your problems • Polyglot is about avoiding compromises
  • 23. Language choice • Don’t use two closely related languages • Don’t forget the standard library • And some have special features eg. concurrency libraries
  • 24. Pick one from each column Static Dynamic Scripting / DSLs Java Ruby JavaScript Scala Groovy Ruby Clojure Groovy Jython
  • 25. Aims • Work in harmony • Choose most appropriate language for each task • Choose carefully as choices are hard to undo
  • 26. Memory usage • Multiple runtimes • Multiple standard libraries • Cloud is memory constrained
  • 28. Impedance mismatch • Type systems • Your languages won’t agree on the simplest things: • Strings, Numbers, Dates, Arrays, null
  • 29. Strings • Java: UTF-16 (ish) strings • JavaScript: implementation dependent • Browsers: UCS-16 usually • JVM: Whatever Java does + optimisations • Ruby • bytes (1.8), or bytes+encoding (1.9) • JVM originated languages: Java Strings
  • 30. Numbers • Java: primitives, java.lang.Number, etc • JavaScript: doubles only. Plus odd Number object. • Ruby: • ints (always Fixnum) with silent promotion to Bignum • doubles, Rational
  • 31. null • Java: null • Ruby: nil • JVM languages: null • JavaScript: null and undefined
  • 32. Javascript’s null and undefined var o = {item: null}; if(o.item === undefined) { console.log("0"); } if(o.noSuchItem === undefined) { console.log("1"); } OUTPUT 1
  • 33. Javascript’s null and undefined var o = {item: null}; if(o.item === undefined) { console.log("0"); } if(o.noSuchItem === undefined) { console.log("1"); } var undefined = 42; if(o.noSuchItem === undefined) { console.log("2"); } OUTPUT 1
  • 34. JavaScript Top Tip Use JSHint in your tests (but not JSLint)
  • 35. Strings, numbers, dates... • Impedance mismatch means you have to think about the boundaries • Use Groovy?
  • 37. Glue code • Work around impedance mismatch • Java: The new assembly language • Rule enforcement & security • Cheat until your pro!ler says it’s slow • Serialise/deserialise to common format, eg JSON
  • 38. undefined is not null JAVA public class Host extends ScriptableObject { public String jsFunction_f(String x) { System.out.println( "x = " + x ); } }
  • 39. undefined is not null JAVA public class Host extends ScriptableObject { public String jsFunction_f(String x) { System.out.println( "x = " + x ); } } JAVASCRIPT var h = new Host(); h.f("Hello"); h.f(2); h.f(null); h.f(undefined);
  • 40. undefined is not null JAVA public class Host extends ScriptableObject { public String VALUES OF X jsFunction_f(String x) { System.out.println( "x = " + x"Hello" ); "2" } null } "undefined" JAVASCRIPT var h = new Host(); h.f("Hello"); h.f(2); h.f(null); h.f(undefined);
  • 41. null and undefined are 0 JAVA public void jsFunction_each( Integer desc, boolean hasDesc, Integer qual, boolean hasQual) JAVASCRIPT Store.prototype.each = function(desc, qual) { return this.$store.each( desc, (desc !== null && desc !== undefined), qual, (qual !== null && qual !== undefined) ); };
  • 42. Conversions public static Date tryConvertJsDate(Object jsObject) { if(jsObject == null) { return null;} if(nativeDateClass == null) { try { nativeDateClass = Class.forName("org.mozilla.javascript.NativeDate"); } catch(ClassNotFoundException e) { /* ... */ } } if(nativeDateClass.isInstance(jsObject)) { Object d = Context.jsToJava(jsObject, Date.class); if(d != null && d instanceof Date) { return (Date)d; } } } return null;
  • 43. Calling Java is easy • Don’t let JavaScript put you o" • Calling Java APIs from any other language is easy
  • 44. Create a JPEG with Java import import import import java.awt.image.BufferedImage; java.awt.Graphics2D; javax.imageio.ImageIO; java.io.File; public class MakeImage { public BufferedImage makeImage(int w, int h) { BufferedImage image = new BufferedImage(w, h, TYPE_INT_RGB); Graphics2D graphics = image.createGraphics(); graphics.drawString("Hello world", w/2, h/2); graphics.dispose(); return image; } } public static void main(String args[]) throws Exception { BufferedImage img = (new MakeImage()).makeImage(200, 400); ImageIO.write(img, "jpeg", new File("test.jpeg")); }
  • 45. Create a JPEG with JRuby require 'java' class MakeImage java_import java.awt.image.BufferedImage; java_import java.awt.Graphics2D; def make_image(w, h) image = BufferedImage.new(w, h, BufferedImage::TYPE_INT_RGB) graphics = image.create_graphics graphics.draw_string("Hello world", w/2, h/2) graphics.dispose image end end java_import javax.imageio.ImageIO; java_import java.io.File; img = MakeImage.new.make_image(200, 400) ImageIO.write(img, "jpeg", File.new("test.jpeg"))
  • 47. Divided by a common language • JRuby: Transparent bridging • JavaScript: Host objects + bridging • Groovy: Java is subset of Groovy • Scala: Write Java with Scala syntax
  • 48. JSR-223 • Java Scripting API • Common API for scripting languages on the JVM • Scripting “engines” available for many languages, variable quality • Su"ers from impedance mismatch itself • Functions may return unexpected types
  • 51. Boundaries • Which language for each module? • Clear boundaries, not a free-for-all. • Well de!ned (and documented) interfaces
  • 52. Java to Ruby public interface Framework { void startApplication(); void startBackgroundTasks(); void stopApplication(); } Response handleFromJava( HttpServletRequest request, Application app, byte[] body, boolean isRequestSSL);
  • 53. Ruby implementation class Framework def start_application # ... end def handle_from_java( servlet_request, application, body, is_ssl) # magic goes here end end
  • 54. JavaScript to Ruby (via Java) public interface AppWorkUnit { public int id(); public public public public } Integer actionableById(); void setActionableById(Integer id); String jsGetDataRaw(); void jsSetDataRaw(String data); public boolean save(); public void destroy();
  • 55. Security • Trust models • Sandboxing interpreters vs sandboxed interpreters
  • 56. Building the team flickr: AaronLMGoodwin
  • 59. Hiring polyglots developers • Find people who can write code, not people who can write Java. • Test to see if programming is instinctive, not syntax and trivia. • Look for people who continuously learn, not those who have learnt.
  • 60. Finding a polyglot job • Smaller companies, or smaller teams within large companies • Early stage projects, not maintenance or enhancements • Talk to really good recruiters • Networking!
  • 62. The Enterprise • It’s just Java the JVM • Implement a servlet • Use tools like Warbler • TorqueBox • New job outside the Enterprise
  • 63. Starting points • Use JRuby to try out an API • Use Ruby testing libraries to test your Java • Use Groovy to a make business rules DSL • Write a layer of a small project in a dynamic language
  • 65. Questions? Be n Su m me r s Te c hnic a l d i re ctor, ON EIS @b e nsu mm ers http://bens.me.u k onei s .co.uk / jo b s