39
+ Javascript as a data processing language & htlm5 integration Qcon London 2013 – Quentin ADAM

JavaScript as Data Processing Language & HTML5 Integration

Embed Size (px)

DESCRIPTION

These last years, data management has become a trending and very dynamic subject. Subjects and tech trends like NoSQL, localcache, offline synchronization or message brokers are now at the core of projects infrastructures. This is linked to the new trend around functional programing, for data manipulation. The talk goal is to show connections between NoSQL, data processing, message broking and JavaScript. How to quickly prototype with these tools! Are these tools only for mass storage or raw performance? Does it allow you to code faster? http://qconlondon.com/london-2013/presentation/JavaScript%20as%20Data%20Processing%20Language%20&%20HTML5%20Integration

Citation preview

Page 1: JavaScript as Data Processing Language & HTML5 Integration

+

Javascript as a data processing language & htlm5 integration Qcon London 2013 – Quentin ADAM

Page 2: JavaScript as Data Processing Language & HTML5 Integration

+Who I am ?

n  Quentin ADAM

n  @waxzce on twitter

n  CEO of Clever Cloud, the most powerful PaaS in Europe ;-)

cleverc l o ud

Page 3: JavaScript as Data Processing Language & HTML5 Integration

+Why we have to talk about data processing ?

Page 4: JavaScript as Data Processing Language & HTML5 Integration

+Big change in software industry

n  One instance

n  One organization

n  One data repository

n  One instance (distributed)

n  Multiple organization + a lot of users

n  One data repository

Yesteday Now

Multi-tenant

Page 5: JavaScript as Data Processing Language & HTML5 Integration

+

Instance for one Organization

ACID • Atomicity • Consistency •  Isolation • Durability

Powerful data

management

•  Transaction •  User

management •  One above one

Take advantage of ACID database

Page 6: JavaScript as Data Processing Language & HTML5 Integration

+ But it designs a bottleneck

Page 7: JavaScript as Data Processing Language & HTML5 Integration

+Example : e-shop on classic mode

Page 8: JavaScript as Data Processing Language & HTML5 Integration

+Example : e-shop on classic mode

User A buy a hdd

Database Transaction : •  Stock management •  Order management •  Invoice generation •  Customer Account reward •  …

Transaction user A is

processed

Stock & Order are

just perfectly synchronize

Page 9: JavaScript as Data Processing Language & HTML5 Integration

+Example : e-shop on classic mode

User A buy a hdd

Database Transaction : •  Stock management •  Order management •  Invoice generation •  Customer Account reward •  …

Transaction user A is

processed

Stock & Order are

just perfectly synchronize

User B buy a hdd Transaction

user B is processed

then

Page 10: JavaScript as Data Processing Language & HTML5 Integration

+Example : e-shop on multi-tenant mode

n  i.e. : Multiple shop of various sellers on the same instance

Page 11: JavaScript as Data Processing Language & HTML5 Integration

+Example : e-shop on multi-tenant mode

User A buy a hdd on seller A Database Transaction : •  Stock management •  Order management •  Invoice generation •  Customer Account reward •  …

Transaction user A is

processed

Stock & Order are

just perfectly synchronize

User B buy a book on seller B Transaction

user B is processed

then

Page 12: JavaScript as Data Processing Language & HTML5 Integration

+

Who care the synchronization of vendor A & B ?

Page 13: JavaScript as Data Processing Language & HTML5 Integration

+

Destroy the bottle neck and switch to another storage system

This is why the noSQL movement start.

Page 14: JavaScript as Data Processing Language & HTML5 Integration

+noSQL = not only SQL

Page 15: JavaScript as Data Processing Language & HTML5 Integration

+Now talking about how to get data from storage

Page 16: JavaScript as Data Processing Language & HTML5 Integration

+ SQL don’t solve all the data processing expression.

Page 17: JavaScript as Data Processing Language & HTML5 Integration

+Some javascripts facts

n  Run for server needs at the beginning n  Netscape Server in 1996, and then in IIS

n  Clearly a major language n  Run on

n  Browser

n  Mobile

n  Servers

n  Easy to integrate

n  Most peoples know it

n  Most used language

on github

n  Event driven

Page 18: JavaScript as Data Processing Language & HTML5 Integration

+So, can we use

javascript as a data processing language ?

Page 19: JavaScript as Data Processing Language & HTML5 Integration

+Data processing is focus on

n  Find

n  Filter

n  Manage collection

n  CRUD order

Page 20: JavaScript as Data Processing Language & HTML5 Integration

+Map / reduce => the big bang of new data processing

n  Atomize the problem

n  Easy to parallelize

n  From the functional programing model

Get the result

Reduce : filter data & aggregate

Map : transform data to what you need (apply function)

Get a k/v data

Page 21: JavaScript as Data Processing Language & HTML5 Integration

+ Do you wanna some functional programing ? Javascript is so flexible than we can apply several patern on top of the language

Page 22: JavaScript as Data Processing Language & HTML5 Integration

+And map/reduce ?

Page 23: JavaScript as Data Processing Language & HTML5 Integration

+NoSQL we can considerate for example

n  Object Store

n  Key/Value with documents capacities

n  Pure Document

n  Column based

Page 24: JavaScript as Data Processing Language & HTML5 Integration

+NoSQL we can considerate for example

n  Object Store

n  Key/Value with documents capacities

n  Pure Document

n  Column based

Page 25: JavaScript as Data Processing Language & HTML5 Integration

+

And one more ! With localStorage features

Page 26: JavaScript as Data Processing Language & HTML5 Integration

+JSON domination

n  Store

n  Processing n  Access

Page 27: JavaScript as Data Processing Language & HTML5 Integration

+Example with riak

n  Key/Value

n  http REST & protobuff data API

n  Store JSON data on a URL

n  Very good distribution

n  Good performances

Page 28: JavaScript as Data Processing Language & HTML5 Integration

+Example with riak map/reduce

Page 29: JavaScript as Data Processing Language & HTML5 Integration

+Put some real time

n  Lots lots of noSQL DB handle a _change_ pipe : n  All datas and updates stream

n  Bind it on a websocket : put some real time on your application

Page 30: JavaScript as Data Processing Language & HTML5 Integration

+Data as a Service

API clients

•  Full web client : html5 + local storage

•  Mobile : phonegapp or native

•  Other servers app

API RESTFull

Various backen DB

Page 31: JavaScript as Data Processing Language & HTML5 Integration

+Data as a Service

n  Data as others service

n  With the same language the application

n  Build sync algorithm to start offline / online software

n  Some protocol : atom, gdata, oData

n  Some popular API : S3, twitter, EC2…

n  Security and access layer : oauth…

Page 32: JavaScript as Data Processing Language & HTML5 Integration

+DataBase as a Service

n  Xeround

n  Amazon dynamo

n  Lots of heroku addon

n  Kinvey

PaaS

Page 33: JavaScript as Data Processing Language & HTML5 Integration

+Transparent data consumption

n  Webkit JavaScriptCore

n  REST / JSON

n  Data Classes n  auto-updatable

n  accessors

n  events

n  Methods

n  Cool html5 IDE

n  Best use case : work oriented app

Atomatic data access framework

Page 34: JavaScript as Data Processing Language & HTML5 Integration

+Wakanda example

http://play.wakanda.org/

Page 35: JavaScript as Data Processing Language & HTML5 Integration

+How to start ?

Page 36: JavaScript as Data Processing Language & HTML5 Integration

+Find a toy project

Page 37: JavaScript as Data Processing Language & HTML5 Integration

+Use hosted services

n  Less ops footprint

n  No more instalation

n  Quick learn curve

n  Focus on your needs & values

Page 38: JavaScript as Data Processing Language & HTML5 Integration

+ Innovate & write kick ass apps

Page 39: JavaScript as Data Processing Language & HTML5 Integration

+Thx for Listening & Q/A time

cleverc l o ud

http://twitter.com/waxzce

Quentin ADAM on google ;-)

[email protected]

n  http://www.clever-cloud.com

n  http://engineering.clever-cloud.com/

Thx to the

http://qconlondon.com