SlideShare uma empresa Scribd logo
1 de 65
Baixar para ler offline
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

Mais conteúdo relacionado

Mais procurados

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 OMRCharlie 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 WonderlandCharles 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 thisRuslan Shevchenko
 
JRuby and Invokedynamic - Japan JUG 2015
JRuby and Invokedynamic - Japan JUG 2015JRuby and Invokedynamic - Japan JUG 2015
JRuby and Invokedynamic - Japan JUG 2015Charles 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.IOLiran 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 AnatomyMike Fogus
 
The Return of the Living Datalog
The Return of the Living DatalogThe Return of the Living Datalog
The Return of the Living DatalogMike 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 introkabirmahlotra
 
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
 
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
 

Mais procurados (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
 

Destaque

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
 
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 ILRIAbsolomon 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
 

Destaque (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)
 

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

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 BackBurke Libbey
 
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 LaneAndres 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 JourneyWanqiang 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_topicsRajesh Verma
 
Quick Intro To JRuby
Quick Intro To JRubyQuick Intro To JRuby
Quick Intro To JRubyFrederic 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 - 1Mohamed Nabil, MSc.
 
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 RubyAnis Ahmad
 
Groovy a Scripting Language for Java
Groovy a Scripting Language for JavaGroovy a Scripting Language for Java
Groovy a Scripting Language for JavaCharles Anderson
 
JRoR Deploying Rails on JRuby
JRoR Deploying Rails on JRubyJRoR Deploying Rails on JRuby
JRoR Deploying Rails on JRubyelliando dias
 

Semelhante a 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
 

Mais de 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
 
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
 

Mais de 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...
 

Último

Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
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 Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
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
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
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
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
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
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
🐬 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
 
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
 
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
 

Último (20)

Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
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 Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
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
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
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
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
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
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
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
 
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
 

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