28
© 2014 MapR Technologies ‹#› © 2014 MapR Technologies Proud to be Polyglot! Tugdual Grall @tgrall June 11, 2015

Proud to be Polyglot - Riviera Dev 2015

Embed Size (px)

Citation preview

Page 1: Proud to be Polyglot - Riviera Dev 2015

© 2014 MapR Technologies ‹#›© 2014 MapR Technologies

Proud to be Polyglot!Tugdual Grall @tgrall

June 11, 2015

Page 2: Proud to be Polyglot - Riviera Dev 2015

© 2015 MapR Technologies ‹#›@tgrall

Modern Applications• Modern Applications Must

• Manage any type of data • Scale • Be fault tolerant • Adapt to change

Page 3: Proud to be Polyglot - Riviera Dev 2015

© 2015 MapR Technologies ‹#›@tgrall

Current Architecture• Mono-Technology

• Single “language/architecture” • Single Database : RDBMS

• One size fits all approach

JSP/JSFServices

MessagingJTA

DAO/JPA

Page 4: Proud to be Polyglot - Riviera Dev 2015

© 2015 MapR Technologies ‹#›@tgrall

Is it good for me?• Many Files

• XML, Sources, Configuration, … • Does Hibernate/JPA is good for all?

• Impedance mismatch • Need to scale

• From 0 to 50 millions users in 6 weeks • 1Tb of data each day

• How easy is to add new features? • Changing code, updating data structure, … • And all this for yesterday !

Page 5: Proud to be Polyglot - Riviera Dev 2015

© 2014 MapR Technologies ‹#›@tgrall

One size does NOT fit all!

Page 6: Proud to be Polyglot - Riviera Dev 2015

© 2014 MapR Technologies ‹#›@tgrall

Let’s look at our data…

6

Page 7: Proud to be Polyglot - Riviera Dev 2015

© 2014 MapR Technologies ‹#›

Big Data

Page 8: Proud to be Polyglot - Riviera Dev 2015

© 2014 MapR Technologies ‹#›

Big Users

http://www.theconnectivist.com/ & Cisco

Page 9: Proud to be Polyglot - Riviera Dev 2015

© 2015 MapR Technologies ‹#›@tgrall

. . .App Server

RDBMS

Application

Scale out Add more “Web” servers

RDBMS

Scale Up Get bigger server

Stay up!…. and Scale

Page 10: Proud to be Polyglot - Riviera Dev 2015

© 2015 MapR Technologies ‹#›@tgrall

Scaling out RDBMS• Run many RDBMS Servers

• Data could be partitioned • Done by the application code

• Caching Layer

. . .App Server

. . .Memcached

. . .MySQL

Page 11: Proud to be Polyglot - Riviera Dev 2015

© 2015 MapR Technologies ‹#›@tgrall

NoSQL to Scale Out!

. . .

NoSQL

App Server

. . .

Application

Scale out Add more “Web” servers

NoSQL

Scale Out Add more servers

Page 12: Proud to be Polyglot - Riviera Dev 2015

© 2015 MapR Technologies ‹#›@tgrall

Operational vs Analytics Databases

Warehouse, AnalyticsApplications, Interactions

Page 13: Proud to be Polyglot - Riviera Dev 2015

© 2015 MapR Technologies ‹#›@tgrall

Polyglot Persistence

Big Data/Analysis NoSQL RDBMS

• Log Capture• Recommendations• Predictions• Ad Campaign

• Products• User Profiles• Game Actions• Sessions• Shopping Cart

• Financial Data• Reporting

Page 14: Proud to be Polyglot - Riviera Dev 2015

© 2015 MapR Technologies ‹#›@tgrall

Page 15: Proud to be Polyglot - Riviera Dev 2015

© 2015 MapR Technologies ‹#›@tgrall

Data Service Layer• Wrap data call in Services

– loosely coupled

. . .App Server

Page 16: Proud to be Polyglot - Riviera Dev 2015

© 2015 MapR Technologies ‹#›@tgrall

Use Case : Personalization

WebSite / Application

Personalization Database

Data Processing

Logs

Application

Data

Page 17: Proud to be Polyglot - Riviera Dev 2015

© 2015 MapR Technologies ‹#›@tgrall

Use Case : Mobile / API

PIM Database

• Legacy Application

• Product Information

NoSQL

• REST API

• Product Data

• Additional Metadata

Page 18: Proud to be Polyglot - Riviera Dev 2015

© 2014 MapR Technologies ‹#›

Now What? Now What?

Page 19: Proud to be Polyglot - Riviera Dev 2015

© 2015 MapR Technologies ‹#›@tgrall

Why multiple languages?• Sometimes we have no choice

• HTML/CSS/JavaScript + Server Side • Mobile Native Applications

• Java/.Net are slow movers • Java EE 5.0 is still mainstream (2006!!)

• Many languages and frameworks • Scala, Clojure, Groovy, Dart, Go, Ruby, Python, F#, Erlang,

Node.js, Rails, Play!, Grails, ...

Page 20: Proud to be Polyglot - Riviera Dev 2015

© 2015 MapR Technologies ‹#›@tgrall

Examples• Realtime interaction with WebSockets :

• Wait for Java EE 7 to supported by your IT? • Hack your app server and application with Continuation ? • Use Node.js and Socket.io ?

• Data Collection and Treatment? • Find a library? • Create your library? • Use Java 8 and Lambdas? • Use Scala?

Page 21: Proud to be Polyglot - Riviera Dev 2015

© 2015 MapR Technologies ‹#›@tgrall

Examples• Simple CRUD Application

• Use the JavaEE stack with JPA and JSF? • Use Spring ? • Use tools like Play!, Grails, Rails, MEAN ?

Page 22: Proud to be Polyglot - Riviera Dev 2015

© 2015 MapR Technologies ‹#›@tgrall

How to chose?• Maturity/Supportability • Features Set • Learning Curve • Productivity

Page 23: Proud to be Polyglot - Riviera Dev 2015

© 2015 MapR Technologies ‹#›@tgrall

Use Case : Second Screen Experience

. . .Node.js + Socket IO

Play! ApplicationPython Scripts

Page 24: Proud to be Polyglot - Riviera Dev 2015

© 2015 MapR Technologies ‹#›@tgrall

Use Case : Recommendation

WebSite / Application

Machine Learning / Recommendation

Data Processing

User Activity Application

Data

Page 25: Proud to be Polyglot - Riviera Dev 2015

© 2014 MapR Technologies ‹#›@tgrall

Demonstration

Page 26: Proud to be Polyglot - Riviera Dev 2015

© 2015 MapR Technologies ‹#›@tgrall

Conclusion• Use the good tool for the good task

• Do not try to “hack” something when you have a simpler solution

• Think about your users first... so deliver and get feedback • Learning is part of our job !

• And this will help you and your project • What about maintenance?

• Do you think it is easier to maintain complex old code?

Page 27: Proud to be Polyglot - Riviera Dev 2015

© 2014 MapR Technologies ‹#›

Questions

Page 28: Proud to be Polyglot - Riviera Dev 2015

© 2014 MapR Technologies ‹#›© 2014 MapR Technologies

Proud to be Polyglot!Tugdual Grall @tgrall

June 11, 2015