SlideShare a Scribd company logo
1 of 16
Download to read offline
DEVFEST NANTES 16
Bruno Bonnin - @_bruno_b_
Apache Spark avec NodeJS ?
Oui, c’est possible avec EclairJS !
2DEVFEST NANTES 16
About me
Bruno Bonnin - @_bruno_b_
Architecte / Développeur
http://webdemo.myscript.com/
3DEVFEST NANTES 16
Java, Scala,
Python, R
JavaScript
4DEVFEST NANTES 16
EclairJS
5DEVFEST NANTES 16
Spark Worker
Spark Worker
EclairJS
Cluster
Manager
Spark WorkersSpark Driver
Libs SparkLibs Spark
Script EngineScript Engine
EclairJS
Nashorn
EclairJS
Nashorn
JVM
JVM
App
NodeJS
EclairJS NodeJS
6DEVFEST NANTES 16
EclairJS: implémentation des composants
7DEVFEST NANTES 16
EclairJS: API Spark Core
val lines = sc.textFile("dream.txt")
val words = lines
.flatMap(
line => line.split(" "))
.filter(
word => word.trim.length > 0)
val counts = words
.mapToPair(
word => (word, 1))
.reduceByKey(_ + _)
var lines = sc.textFile("dream.txt");
var words = lines
.flatMap(function (line) {
return line.split(" "); })
.filter(function (word) {
return word.trim().length > 0; });
var counts = words
.mapToPair(function (word, Tuple2) {
return new Tuple2(word, 1); }, [Tuple2])
.reduceByKey(function (a, b) { return a + b; });
8DEVFEST NANTES 16
EclairJS: API Spark SQL
val df = sqlCtx.read.json("people.json")
df.printSchema()
df.select("name", "age")
.filter(col("age").gt(30))
.show()
df.registerTempTable("people")
val sqlDF = sqlCtx
.sql("SELECT * FROM people")
sqlDF.show()
var df = sqlCtx.read().json('people.json');
df.printSchema();
df.select('name', 'age')
.filter(col('age').gt(30))
.show();
df.registerTempTable('people');
var sqlDF = sqlCtx
.sql('SELECT * FROM people');
sqlDF.show();
9DEVFEST NANTES 16
app.get('/words', (req, res) => {
var lines = sc.textFile('dream.txt').cache();
var something = 0;
var words = lines
.flatMap(line => {
something += 1;
console.log('flatmap:' + line);
return line.split(' ');
})
.collect()
});
EclairJS: code dans NodeJS
10DEVFEST NANTES 16
app.get('/words', (req, res) => {
var lines = sc.textFile('dream.txt').cache();
var something = 0;
var words = lines
.flatMap(line => {
something += 1;
console.log('flatmap:' + line);
return line.split(' ');
})
.collect()
});
EclairJS: code dans NodeJS
.then(results => { res.json({result: results}); })
.catch(err => { res.status(500).send(err); });
11DEVFEST NANTES 16
app.get('/words', (req, res) => {
var lines = sc.textFile('dream.txt').cache();
var something = 0;
var words = lines
.flatMap(line => {
something += 1;
console.log('flatmap:' + line);
return line.split(' ');
})
.collect()
});
EclairJS: code dans NodeJS
.then(results => { res.json({result: results}); })
.catch(err => { res.status(500).send(err); });
12DEVFEST NANTES 16
app.get('/words', (req, res) => {
var lines = sc.textFile('dream.txt').cache();
var something = 0;
var words = lines
.flatMap(line => { function (line) {
something += 1;
console.log('flatmap:' + line);
return line.split(' ');
})
.collect()
.then(results => { res.json({result: results}); })
.catch(err => { res.status(500).send(err); });
});
EclairJS: code dans NodeJS
Code métier interpréter dans
Nashorn (pas dans NodeJS) :
● Ne connait pas console
● Est compliant ES5
13DEVFEST NANTES 16
EclairJS: déploiement
Spark WorkerSpark Workers
Application
EclairJS - API
Node
Cluster
Manager EclairJS - API
Nashorn
Apache Toree
(Spark Driver)
EclairJS - API
Nashorn
Jupyter
Notebook
Gateway
EclairJS Shell
EclairJS - API
Nashorn
14DEVFEST NANTES 16
Démo
Client SparkApplication
EclairJS - API Node EclairJS - API Nashorn
Spark Workers
EclairJS - API Nashorn
15DEVFEST NANTES 16
Conclusion
Facile à apprendre (surtout pour ceux qui connaissent l’API Scala/Java)
Idéal pour les développeurs JS que le Scala peut rebuter :-)
Implémentation en cours : dernière version avec le support de Spark 2.0
Pour aller plus loin:
● https://eclairjs.github.io/
● https://github.com/EclairJS/eclairjs
16DEVFEST NANTES 16 16DEVFEST NANTES 16
Merci !
@_bruno_b_
https://github.com/bbonnin/devfestnantes2016

More Related Content

What's hot

Homologous Apache Spark Clusters Using Nomad with Alex Dadgar
Homologous Apache Spark Clusters Using Nomad with Alex DadgarHomologous Apache Spark Clusters Using Nomad with Alex Dadgar
Homologous Apache Spark Clusters Using Nomad with Alex DadgarDatabricks
 
Introduction to df
Introduction to dfIntroduction to df
Introduction to dfMohit Jaggi
 
Paul Dix (Founder InfluxDB) - Organising Metrics at #DOXLON
Paul Dix (Founder InfluxDB) - Organising Metrics at #DOXLONPaul Dix (Founder InfluxDB) - Organising Metrics at #DOXLON
Paul Dix (Founder InfluxDB) - Organising Metrics at #DOXLONOutlyer
 
Spark Summit EU talk by Ted Malaska
Spark Summit EU talk by Ted MalaskaSpark Summit EU talk by Ted Malaska
Spark Summit EU talk by Ted MalaskaSpark Summit
 
Spark Summit EU talk by Nimbus Goehausen
Spark Summit EU talk by Nimbus GoehausenSpark Summit EU talk by Nimbus Goehausen
Spark Summit EU talk by Nimbus GoehausenSpark Summit
 
Building DSLs with Scala
Building DSLs with ScalaBuilding DSLs with Scala
Building DSLs with ScalaMohit Jaggi
 
Operational Tips for Deploying Spark
Operational Tips for Deploying SparkOperational Tips for Deploying Spark
Operational Tips for Deploying SparkDatabricks
 
A really really fast introduction to PySpark - lightning fast cluster computi...
A really really fast introduction to PySpark - lightning fast cluster computi...A really really fast introduction to PySpark - lightning fast cluster computi...
A really really fast introduction to PySpark - lightning fast cluster computi...Holden Karau
 
Ali Asad Lotia (DevOps at Beamly) - Riemann Stream Processing at #DOXLON
Ali Asad Lotia (DevOps at Beamly) - Riemann Stream Processing at #DOXLONAli Asad Lotia (DevOps at Beamly) - Riemann Stream Processing at #DOXLON
Ali Asad Lotia (DevOps at Beamly) - Riemann Stream Processing at #DOXLONOutlyer
 
Hadoop at ayasdi
Hadoop at ayasdiHadoop at ayasdi
Hadoop at ayasdiMohit Jaggi
 
Hadoop ecosystem framework n hadoop in live environment
Hadoop ecosystem framework  n hadoop in live environmentHadoop ecosystem framework  n hadoop in live environment
Hadoop ecosystem framework n hadoop in live environmentDelhi/NCR HUG
 
Multi dimension aggregations using spark and dataframes
Multi dimension aggregations using spark and dataframesMulti dimension aggregations using spark and dataframes
Multi dimension aggregations using spark and dataframesRomi Kuntsman
 
Adios hadoop, Hola Spark! T3chfest 2015
Adios hadoop, Hola Spark! T3chfest 2015Adios hadoop, Hola Spark! T3chfest 2015
Adios hadoop, Hola Spark! T3chfest 2015dhiguero
 
Spark Summit EU talk by Stavros kontopoulos and Justin Pihony
Spark Summit EU talk by Stavros kontopoulos and Justin PihonySpark Summit EU talk by Stavros kontopoulos and Justin Pihony
Spark Summit EU talk by Stavros kontopoulos and Justin PihonySpark Summit
 
Extending Spark With Java Agent (handout)
Extending Spark With Java Agent (handout)Extending Spark With Java Agent (handout)
Extending Spark With Java Agent (handout)Jaroslav Bachorik
 
Spark Summit EU talk by Rolf Jagerman
Spark Summit EU talk by Rolf JagermanSpark Summit EU talk by Rolf Jagerman
Spark Summit EU talk by Rolf JagermanSpark Summit
 

What's hot (20)

Homologous Apache Spark Clusters Using Nomad with Alex Dadgar
Homologous Apache Spark Clusters Using Nomad with Alex DadgarHomologous Apache Spark Clusters Using Nomad with Alex Dadgar
Homologous Apache Spark Clusters Using Nomad with Alex Dadgar
 
Introduction to df
Introduction to dfIntroduction to df
Introduction to df
 
Paul Dix (Founder InfluxDB) - Organising Metrics at #DOXLON
Paul Dix (Founder InfluxDB) - Organising Metrics at #DOXLONPaul Dix (Founder InfluxDB) - Organising Metrics at #DOXLON
Paul Dix (Founder InfluxDB) - Organising Metrics at #DOXLON
 
Spark Summit EU talk by Ted Malaska
Spark Summit EU talk by Ted MalaskaSpark Summit EU talk by Ted Malaska
Spark Summit EU talk by Ted Malaska
 
Overview of the Hive Stinger Initiative
Overview of the Hive Stinger InitiativeOverview of the Hive Stinger Initiative
Overview of the Hive Stinger Initiative
 
Spark Summit EU talk by Nimbus Goehausen
Spark Summit EU talk by Nimbus GoehausenSpark Summit EU talk by Nimbus Goehausen
Spark Summit EU talk by Nimbus Goehausen
 
Up and running with pyspark
Up and running with pysparkUp and running with pyspark
Up and running with pyspark
 
Building DSLs with Scala
Building DSLs with ScalaBuilding DSLs with Scala
Building DSLs with Scala
 
Operational Tips for Deploying Spark
Operational Tips for Deploying SparkOperational Tips for Deploying Spark
Operational Tips for Deploying Spark
 
A really really fast introduction to PySpark - lightning fast cluster computi...
A really really fast introduction to PySpark - lightning fast cluster computi...A really really fast introduction to PySpark - lightning fast cluster computi...
A really really fast introduction to PySpark - lightning fast cluster computi...
 
Ali Asad Lotia (DevOps at Beamly) - Riemann Stream Processing at #DOXLON
Ali Asad Lotia (DevOps at Beamly) - Riemann Stream Processing at #DOXLONAli Asad Lotia (DevOps at Beamly) - Riemann Stream Processing at #DOXLON
Ali Asad Lotia (DevOps at Beamly) - Riemann Stream Processing at #DOXLON
 
Hadoop at ayasdi
Hadoop at ayasdiHadoop at ayasdi
Hadoop at ayasdi
 
Hadoop ecosystem framework n hadoop in live environment
Hadoop ecosystem framework  n hadoop in live environmentHadoop ecosystem framework  n hadoop in live environment
Hadoop ecosystem framework n hadoop in live environment
 
Spark tutorial
Spark tutorialSpark tutorial
Spark tutorial
 
PySaprk
PySaprkPySaprk
PySaprk
 
Multi dimension aggregations using spark and dataframes
Multi dimension aggregations using spark and dataframesMulti dimension aggregations using spark and dataframes
Multi dimension aggregations using spark and dataframes
 
Adios hadoop, Hola Spark! T3chfest 2015
Adios hadoop, Hola Spark! T3chfest 2015Adios hadoop, Hola Spark! T3chfest 2015
Adios hadoop, Hola Spark! T3chfest 2015
 
Spark Summit EU talk by Stavros kontopoulos and Justin Pihony
Spark Summit EU talk by Stavros kontopoulos and Justin PihonySpark Summit EU talk by Stavros kontopoulos and Justin Pihony
Spark Summit EU talk by Stavros kontopoulos and Justin Pihony
 
Extending Spark With Java Agent (handout)
Extending Spark With Java Agent (handout)Extending Spark With Java Agent (handout)
Extending Spark With Java Agent (handout)
 
Spark Summit EU talk by Rolf Jagerman
Spark Summit EU talk by Rolf JagermanSpark Summit EU talk by Rolf Jagerman
Spark Summit EU talk by Rolf Jagerman
 

Viewers also liked

Big Data Viz (and much more!) with Apache Zeppelin
Big Data Viz (and much more!) with Apache ZeppelinBig Data Viz (and much more!) with Apache Zeppelin
Big Data Viz (and much more!) with Apache ZeppelinBruno Bonnin
 
Apache Kafka, Un système distribué de messagerie hautement performant
Apache Kafka, Un système distribué de messagerie hautement performantApache Kafka, Un système distribué de messagerie hautement performant
Apache Kafka, Un système distribué de messagerie hautement performantALTIC Altic
 
Camping at Roosevelt Lake, AZ: Artsy Shots
Camping at Roosevelt Lake, AZ: Artsy ShotsCamping at Roosevelt Lake, AZ: Artsy Shots
Camping at Roosevelt Lake, AZ: Artsy ShotsRyn Gargulinski
 
Principios basicos dela ecologia
Principios basicos dela ecologiaPrincipios basicos dela ecologia
Principios basicos dela ecologiaHeriLeon
 
Halloween Displays to Die for (not literally)
Halloween Displays to Die for (not literally)Halloween Displays to Die for (not literally)
Halloween Displays to Die for (not literally)Ryn Gargulinski
 
Tout ce que le getting started mongodb ne vous dira pas
Tout ce que le getting started mongodb ne vous dira pasTout ce que le getting started mongodb ne vous dira pas
Tout ce que le getting started mongodb ne vous dira pasBruno Bonnin
 
Explorez vos données avec apache zeppelin
Explorez vos données avec apache zeppelinExplorez vos données avec apache zeppelin
Explorez vos données avec apache zeppelinBruno Bonnin
 
Inocencio meléndez julio. la empresa, las sociedades comerciales y su clas...
 Inocencio meléndez julio. la empresa, las sociedades comerciales  y su clas... Inocencio meléndez julio. la empresa, las sociedades comerciales  y su clas...
Inocencio meléndez julio. la empresa, las sociedades comerciales y su clas...INOCENCIO MELÉNDEZ JULIO
 
Inocencio meléndez julio. carrusel de la academia. ensayo sobre la negociaci...
Inocencio meléndez julio. carrusel de la academia. ensayo sobre la negociaci...Inocencio meléndez julio. carrusel de la academia. ensayo sobre la negociaci...
Inocencio meléndez julio. carrusel de la academia. ensayo sobre la negociaci...INOCENCIO MELÉNDEZ JULIO
 

Viewers also liked (20)

Big Data Viz (and much more!) with Apache Zeppelin
Big Data Viz (and much more!) with Apache ZeppelinBig Data Viz (and much more!) with Apache Zeppelin
Big Data Viz (and much more!) with Apache Zeppelin
 
Apache Kafka, Un système distribué de messagerie hautement performant
Apache Kafka, Un système distribué de messagerie hautement performantApache Kafka, Un système distribué de messagerie hautement performant
Apache Kafka, Un système distribué de messagerie hautement performant
 
Diseño & Manejo De Paginas Web !
Diseño & Manejo De Paginas Web !Diseño & Manejo De Paginas Web !
Diseño & Manejo De Paginas Web !
 
Camping at Roosevelt Lake, AZ: Artsy Shots
Camping at Roosevelt Lake, AZ: Artsy ShotsCamping at Roosevelt Lake, AZ: Artsy Shots
Camping at Roosevelt Lake, AZ: Artsy Shots
 
Principios basicos dela ecologia
Principios basicos dela ecologiaPrincipios basicos dela ecologia
Principios basicos dela ecologia
 
Prueba
PruebaPrueba
Prueba
 
Prueba
PruebaPrueba
Prueba
 
Halloween Displays to Die for (not literally)
Halloween Displays to Die for (not literally)Halloween Displays to Die for (not literally)
Halloween Displays to Die for (not literally)
 
Trabajo de ntics
Trabajo de nticsTrabajo de ntics
Trabajo de ntics
 
5 metros de_poemas
5 metros de_poemas5 metros de_poemas
5 metros de_poemas
 
Lenymat03
Lenymat03Lenymat03
Lenymat03
 
1 trabajo
1 trabajo 1 trabajo
1 trabajo
 
Tout ce que le getting started mongodb ne vous dira pas
Tout ce que le getting started mongodb ne vous dira pasTout ce que le getting started mongodb ne vous dira pas
Tout ce que le getting started mongodb ne vous dira pas
 
Informe comite deportivo
Informe comite deportivoInforme comite deportivo
Informe comite deportivo
 
Explorez vos données avec apache zeppelin
Explorez vos données avec apache zeppelinExplorez vos données avec apache zeppelin
Explorez vos données avec apache zeppelin
 
MATEMATICA
MATEMATICAMATEMATICA
MATEMATICA
 
5 infatec03
5 infatec035 infatec03
5 infatec03
 
3 infatec03
3 infatec033 infatec03
3 infatec03
 
Inocencio meléndez julio. la empresa, las sociedades comerciales y su clas...
 Inocencio meléndez julio. la empresa, las sociedades comerciales  y su clas... Inocencio meléndez julio. la empresa, las sociedades comerciales  y su clas...
Inocencio meléndez julio. la empresa, las sociedades comerciales y su clas...
 
Inocencio meléndez julio. carrusel de la academia. ensayo sobre la negociaci...
Inocencio meléndez julio. carrusel de la academia. ensayo sobre la negociaci...Inocencio meléndez julio. carrusel de la academia. ensayo sobre la negociaci...
Inocencio meléndez julio. carrusel de la academia. ensayo sobre la negociaci...
 

Similar to Apache Spark avec NodeJS ? Oui, c'est possible avec EclairJS !

Building HTTP API's with NodeJS and MongoDB
Building HTTP API's with NodeJS and MongoDBBuilding HTTP API's with NodeJS and MongoDB
Building HTTP API's with NodeJS and MongoDBdonnfelker
 
RESTful API In Node Js using Express
RESTful API In Node Js using Express RESTful API In Node Js using Express
RESTful API In Node Js using Express Jeetendra singh
 
MunichJS - node.js - from the beginning
MunichJS - node.js - from the beginningMunichJS - node.js - from the beginning
MunichJS - node.js - from the beginningRobert Prediger
 
Joker'16 Spark 2 (API changes; Structured Streaming; Encoders)
Joker'16 Spark 2 (API changes; Structured Streaming; Encoders)Joker'16 Spark 2 (API changes; Structured Streaming; Encoders)
Joker'16 Spark 2 (API changes; Structured Streaming; Encoders)Alexey Zinoviev
 
Developing web-apps like it's 2013
Developing web-apps like it's 2013Developing web-apps like it's 2013
Developing web-apps like it's 2013Laurent_VB
 
Spark with Elasticsearch - umd version 2014
Spark with Elasticsearch - umd version 2014Spark with Elasticsearch - umd version 2014
Spark with Elasticsearch - umd version 2014Holden Karau
 
Internet and Web Technology (CLASS-10) [Node.js] | NIC/NIELIT Web Technology
Internet and Web Technology (CLASS-10) [Node.js] | NIC/NIELIT Web Technology Internet and Web Technology (CLASS-10) [Node.js] | NIC/NIELIT Web Technology
Internet and Web Technology (CLASS-10) [Node.js] | NIC/NIELIT Web Technology Ayes Chinmay
 
Node.js - async for the rest of us.
Node.js - async for the rest of us.Node.js - async for the rest of us.
Node.js - async for the rest of us.Mike Brevoort
 
Event-driven IO server-side JavaScript environment based on V8 Engine
Event-driven IO server-side JavaScript environment based on V8 EngineEvent-driven IO server-side JavaScript environment based on V8 Engine
Event-driven IO server-side JavaScript environment based on V8 EngineRicardo Silva
 
NoSQL and JavaScript: a Love Story
NoSQL and JavaScript: a Love StoryNoSQL and JavaScript: a Love Story
NoSQL and JavaScript: a Love StoryAlexandre Morgaut
 
Memulai Data Processing dengan Spark dan Python
Memulai Data Processing dengan Spark dan PythonMemulai Data Processing dengan Spark dan Python
Memulai Data Processing dengan Spark dan PythonRidwan Fadjar
 
Kafka pours and Spark resolves
Kafka pours and Spark resolvesKafka pours and Spark resolves
Kafka pours and Spark resolvesAlexey Zinoviev
 
The Art and Science of Shipping Ember Apps
The Art and Science of Shipping Ember AppsThe Art and Science of Shipping Ember Apps
The Art and Science of Shipping Ember AppsJesse Cravens
 
Scala js (kyiv js 30-01)
Scala js (kyiv js 30-01)Scala js (kyiv js 30-01)
Scala js (kyiv js 30-01)Eugene Safronov
 
Going crazy with Node.JS and CakePHP
Going crazy with Node.JS and CakePHPGoing crazy with Node.JS and CakePHP
Going crazy with Node.JS and CakePHPMariano Iglesias
 
MapReduce with Scalding @ 24th Hadoop London Meetup
MapReduce with Scalding @ 24th Hadoop London MeetupMapReduce with Scalding @ 24th Hadoop London Meetup
MapReduce with Scalding @ 24th Hadoop London MeetupLandoop Ltd
 

Similar to Apache Spark avec NodeJS ? Oui, c'est possible avec EclairJS ! (20)

Building HTTP API's with NodeJS and MongoDB
Building HTTP API's with NodeJS and MongoDBBuilding HTTP API's with NodeJS and MongoDB
Building HTTP API's with NodeJS and MongoDB
 
NodeJS
NodeJSNodeJS
NodeJS
 
RESTful API In Node Js using Express
RESTful API In Node Js using Express RESTful API In Node Js using Express
RESTful API In Node Js using Express
 
MunichJS - node.js - from the beginning
MunichJS - node.js - from the beginningMunichJS - node.js - from the beginning
MunichJS - node.js - from the beginning
 
Joker'16 Spark 2 (API changes; Structured Streaming; Encoders)
Joker'16 Spark 2 (API changes; Structured Streaming; Encoders)Joker'16 Spark 2 (API changes; Structured Streaming; Encoders)
Joker'16 Spark 2 (API changes; Structured Streaming; Encoders)
 
Developing web-apps like it's 2013
Developing web-apps like it's 2013Developing web-apps like it's 2013
Developing web-apps like it's 2013
 
Spark with Elasticsearch - umd version 2014
Spark with Elasticsearch - umd version 2014Spark with Elasticsearch - umd version 2014
Spark with Elasticsearch - umd version 2014
 
Internet and Web Technology (CLASS-10) [Node.js] | NIC/NIELIT Web Technology
Internet and Web Technology (CLASS-10) [Node.js] | NIC/NIELIT Web Technology Internet and Web Technology (CLASS-10) [Node.js] | NIC/NIELIT Web Technology
Internet and Web Technology (CLASS-10) [Node.js] | NIC/NIELIT Web Technology
 
Node.js - async for the rest of us.
Node.js - async for the rest of us.Node.js - async for the rest of us.
Node.js - async for the rest of us.
 
Event-driven IO server-side JavaScript environment based on V8 Engine
Event-driven IO server-side JavaScript environment based on V8 EngineEvent-driven IO server-side JavaScript environment based on V8 Engine
Event-driven IO server-side JavaScript environment based on V8 Engine
 
NoSQL and JavaScript: a Love Story
NoSQL and JavaScript: a Love StoryNoSQL and JavaScript: a Love Story
NoSQL and JavaScript: a Love Story
 
jsDay 2016 recap
jsDay 2016 recapjsDay 2016 recap
jsDay 2016 recap
 
Memulai Data Processing dengan Spark dan Python
Memulai Data Processing dengan Spark dan PythonMemulai Data Processing dengan Spark dan Python
Memulai Data Processing dengan Spark dan Python
 
Kafka pours and Spark resolves
Kafka pours and Spark resolvesKafka pours and Spark resolves
Kafka pours and Spark resolves
 
The Art and Science of Shipping Ember Apps
The Art and Science of Shipping Ember AppsThe Art and Science of Shipping Ember Apps
The Art and Science of Shipping Ember Apps
 
Scala js (kyiv js 30-01)
Scala js (kyiv js 30-01)Scala js (kyiv js 30-01)
Scala js (kyiv js 30-01)
 
How to Add Original Library to Android NDK
How to Add Original Library to Android NDKHow to Add Original Library to Android NDK
How to Add Original Library to Android NDK
 
Going crazy with Node.JS and CakePHP
Going crazy with Node.JS and CakePHPGoing crazy with Node.JS and CakePHP
Going crazy with Node.JS and CakePHP
 
MapReduce with Scalding @ 24th Hadoop London Meetup
MapReduce with Scalding @ 24th Hadoop London MeetupMapReduce with Scalding @ 24th Hadoop London Meetup
MapReduce with Scalding @ 24th Hadoop London Meetup
 
Node.jsやってみた
Node.jsやってみたNode.jsやってみた
Node.jsやってみた
 

More from Bruno Bonnin

[Devoxx MA 2023] R2DBC = R2D2 + JDBC (enfin presque...)
[Devoxx MA 2023] R2DBC = R2D2 + JDBC (enfin presque...)[Devoxx MA 2023] R2DBC = R2D2 + JDBC (enfin presque...)
[Devoxx MA 2023] R2DBC = R2D2 + JDBC (enfin presque...)Bruno Bonnin
 
Stream processing avec Apache Pulsar
Stream processing avec Apache PulsarStream processing avec Apache Pulsar
Stream processing avec Apache PulsarBruno Bonnin
 
Stream processing et SQL
Stream processing et SQLStream processing et SQL
Stream processing et SQLBruno Bonnin
 
Stream processing et SQL
Stream processing et SQLStream processing et SQL
Stream processing et SQLBruno Bonnin
 
Guide (un tout petit peu) pratique (et totalement subjectif) du stream proces...
Guide (un tout petit peu) pratique (et totalement subjectif) du stream proces...Guide (un tout petit peu) pratique (et totalement subjectif) du stream proces...
Guide (un tout petit peu) pratique (et totalement subjectif) du stream proces...Bruno Bonnin
 
Stream processing et SQL
Stream processing et SQLStream processing et SQL
Stream processing et SQLBruno Bonnin
 
Stream processing et SQL
Stream processing et SQLStream processing et SQL
Stream processing et SQLBruno Bonnin
 
Jug summer camp 2017 - Vue.js, même un dev java peut en faire !
Jug summer camp 2017 - Vue.js, même un dev java peut en faire !Jug summer camp 2017 - Vue.js, même un dev java peut en faire !
Jug summer camp 2017 - Vue.js, même un dev java peut en faire !Bruno Bonnin
 
A la découverte de vue.js
A la découverte de vue.jsA la découverte de vue.js
A la découverte de vue.jsBruno Bonnin
 
Vue.js, même un dev java peut en faire !
Vue.js, même un dev java peut en faire !Vue.js, même un dev java peut en faire !
Vue.js, même un dev java peut en faire !Bruno Bonnin
 
Explorez vos données présentes dans MongoDB avec Apache Zeppelin
Explorez vos données présentes dans MongoDB avec Apache ZeppelinExplorez vos données présentes dans MongoDB avec Apache Zeppelin
Explorez vos données présentes dans MongoDB avec Apache ZeppelinBruno Bonnin
 
Vue, j’avais pas vu !
Vue, j’avais pas vu !Vue, j’avais pas vu !
Vue, j’avais pas vu !Bruno Bonnin
 
Tout ce que le getting started MongoDB ne vous dira pas
Tout ce que le getting started MongoDB ne vous dira pasTout ce que le getting started MongoDB ne vous dira pas
Tout ce que le getting started MongoDB ne vous dira pasBruno Bonnin
 
MUG Nantes - MongoDB et son connecteur pour hadoop
MUG Nantes - MongoDB et son connecteur pour hadoopMUG Nantes - MongoDB et son connecteur pour hadoop
MUG Nantes - MongoDB et son connecteur pour hadoopBruno Bonnin
 
Breizhcamp 2015 - Comment (ne pas réussir à) modéliser ses data dans elastics...
Breizhcamp 2015 - Comment (ne pas réussir à) modéliser ses data dans elastics...Breizhcamp 2015 - Comment (ne pas réussir à) modéliser ses data dans elastics...
Breizhcamp 2015 - Comment (ne pas réussir à) modéliser ses data dans elastics...Bruno Bonnin
 

More from Bruno Bonnin (15)

[Devoxx MA 2023] R2DBC = R2D2 + JDBC (enfin presque...)
[Devoxx MA 2023] R2DBC = R2D2 + JDBC (enfin presque...)[Devoxx MA 2023] R2DBC = R2D2 + JDBC (enfin presque...)
[Devoxx MA 2023] R2DBC = R2D2 + JDBC (enfin presque...)
 
Stream processing avec Apache Pulsar
Stream processing avec Apache PulsarStream processing avec Apache Pulsar
Stream processing avec Apache Pulsar
 
Stream processing et SQL
Stream processing et SQLStream processing et SQL
Stream processing et SQL
 
Stream processing et SQL
Stream processing et SQLStream processing et SQL
Stream processing et SQL
 
Guide (un tout petit peu) pratique (et totalement subjectif) du stream proces...
Guide (un tout petit peu) pratique (et totalement subjectif) du stream proces...Guide (un tout petit peu) pratique (et totalement subjectif) du stream proces...
Guide (un tout petit peu) pratique (et totalement subjectif) du stream proces...
 
Stream processing et SQL
Stream processing et SQLStream processing et SQL
Stream processing et SQL
 
Stream processing et SQL
Stream processing et SQLStream processing et SQL
Stream processing et SQL
 
Jug summer camp 2017 - Vue.js, même un dev java peut en faire !
Jug summer camp 2017 - Vue.js, même un dev java peut en faire !Jug summer camp 2017 - Vue.js, même un dev java peut en faire !
Jug summer camp 2017 - Vue.js, même un dev java peut en faire !
 
A la découverte de vue.js
A la découverte de vue.jsA la découverte de vue.js
A la découverte de vue.js
 
Vue.js, même un dev java peut en faire !
Vue.js, même un dev java peut en faire !Vue.js, même un dev java peut en faire !
Vue.js, même un dev java peut en faire !
 
Explorez vos données présentes dans MongoDB avec Apache Zeppelin
Explorez vos données présentes dans MongoDB avec Apache ZeppelinExplorez vos données présentes dans MongoDB avec Apache Zeppelin
Explorez vos données présentes dans MongoDB avec Apache Zeppelin
 
Vue, j’avais pas vu !
Vue, j’avais pas vu !Vue, j’avais pas vu !
Vue, j’avais pas vu !
 
Tout ce que le getting started MongoDB ne vous dira pas
Tout ce que le getting started MongoDB ne vous dira pasTout ce que le getting started MongoDB ne vous dira pas
Tout ce que le getting started MongoDB ne vous dira pas
 
MUG Nantes - MongoDB et son connecteur pour hadoop
MUG Nantes - MongoDB et son connecteur pour hadoopMUG Nantes - MongoDB et son connecteur pour hadoop
MUG Nantes - MongoDB et son connecteur pour hadoop
 
Breizhcamp 2015 - Comment (ne pas réussir à) modéliser ses data dans elastics...
Breizhcamp 2015 - Comment (ne pas réussir à) modéliser ses data dans elastics...Breizhcamp 2015 - Comment (ne pas réussir à) modéliser ses data dans elastics...
Breizhcamp 2015 - Comment (ne pas réussir à) modéliser ses data dans elastics...
 

Recently uploaded

W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 

Recently uploaded (20)

W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 

Apache Spark avec NodeJS ? Oui, c'est possible avec EclairJS !

  • 1. DEVFEST NANTES 16 Bruno Bonnin - @_bruno_b_ Apache Spark avec NodeJS ? Oui, c’est possible avec EclairJS !
  • 2. 2DEVFEST NANTES 16 About me Bruno Bonnin - @_bruno_b_ Architecte / Développeur http://webdemo.myscript.com/
  • 3. 3DEVFEST NANTES 16 Java, Scala, Python, R JavaScript
  • 5. 5DEVFEST NANTES 16 Spark Worker Spark Worker EclairJS Cluster Manager Spark WorkersSpark Driver Libs SparkLibs Spark Script EngineScript Engine EclairJS Nashorn EclairJS Nashorn JVM JVM App NodeJS EclairJS NodeJS
  • 6. 6DEVFEST NANTES 16 EclairJS: implémentation des composants
  • 7. 7DEVFEST NANTES 16 EclairJS: API Spark Core val lines = sc.textFile("dream.txt") val words = lines .flatMap( line => line.split(" ")) .filter( word => word.trim.length > 0) val counts = words .mapToPair( word => (word, 1)) .reduceByKey(_ + _) var lines = sc.textFile("dream.txt"); var words = lines .flatMap(function (line) { return line.split(" "); }) .filter(function (word) { return word.trim().length > 0; }); var counts = words .mapToPair(function (word, Tuple2) { return new Tuple2(word, 1); }, [Tuple2]) .reduceByKey(function (a, b) { return a + b; });
  • 8. 8DEVFEST NANTES 16 EclairJS: API Spark SQL val df = sqlCtx.read.json("people.json") df.printSchema() df.select("name", "age") .filter(col("age").gt(30)) .show() df.registerTempTable("people") val sqlDF = sqlCtx .sql("SELECT * FROM people") sqlDF.show() var df = sqlCtx.read().json('people.json'); df.printSchema(); df.select('name', 'age') .filter(col('age').gt(30)) .show(); df.registerTempTable('people'); var sqlDF = sqlCtx .sql('SELECT * FROM people'); sqlDF.show();
  • 9. 9DEVFEST NANTES 16 app.get('/words', (req, res) => { var lines = sc.textFile('dream.txt').cache(); var something = 0; var words = lines .flatMap(line => { something += 1; console.log('flatmap:' + line); return line.split(' '); }) .collect() }); EclairJS: code dans NodeJS
  • 10. 10DEVFEST NANTES 16 app.get('/words', (req, res) => { var lines = sc.textFile('dream.txt').cache(); var something = 0; var words = lines .flatMap(line => { something += 1; console.log('flatmap:' + line); return line.split(' '); }) .collect() }); EclairJS: code dans NodeJS .then(results => { res.json({result: results}); }) .catch(err => { res.status(500).send(err); });
  • 11. 11DEVFEST NANTES 16 app.get('/words', (req, res) => { var lines = sc.textFile('dream.txt').cache(); var something = 0; var words = lines .flatMap(line => { something += 1; console.log('flatmap:' + line); return line.split(' '); }) .collect() }); EclairJS: code dans NodeJS .then(results => { res.json({result: results}); }) .catch(err => { res.status(500).send(err); });
  • 12. 12DEVFEST NANTES 16 app.get('/words', (req, res) => { var lines = sc.textFile('dream.txt').cache(); var something = 0; var words = lines .flatMap(line => { function (line) { something += 1; console.log('flatmap:' + line); return line.split(' '); }) .collect() .then(results => { res.json({result: results}); }) .catch(err => { res.status(500).send(err); }); }); EclairJS: code dans NodeJS Code métier interpréter dans Nashorn (pas dans NodeJS) : ● Ne connait pas console ● Est compliant ES5
  • 13. 13DEVFEST NANTES 16 EclairJS: déploiement Spark WorkerSpark Workers Application EclairJS - API Node Cluster Manager EclairJS - API Nashorn Apache Toree (Spark Driver) EclairJS - API Nashorn Jupyter Notebook Gateway EclairJS Shell EclairJS - API Nashorn
  • 14. 14DEVFEST NANTES 16 Démo Client SparkApplication EclairJS - API Node EclairJS - API Nashorn Spark Workers EclairJS - API Nashorn
  • 15. 15DEVFEST NANTES 16 Conclusion Facile à apprendre (surtout pour ceux qui connaissent l’API Scala/Java) Idéal pour les développeurs JS que le Scala peut rebuter :-) Implémentation en cours : dernière version avec le support de Spark 2.0 Pour aller plus loin: ● https://eclairjs.github.io/ ● https://github.com/EclairJS/eclairjs
  • 16. 16DEVFEST NANTES 16 16DEVFEST NANTES 16 Merci ! @_bruno_b_ https://github.com/bbonnin/devfestnantes2016