© 2014 MapR Technologies ‹#›© 2014 MapR Technologies
Proud to be Polyglot!
Tugdual Grall
@tgrall
June 11, 2015
© 2015 MapR Technologies ‹#›@tgrall
Modern Applications
• Modern Applications Must
• Manage any type of data
• Scale
• Be fault tolerant
• Adapt to change
© 2015 MapR Technologies ‹#›@tgrall
Current Architecture
• Mono-Technology
• Single “language/architecture”
• Single Database : RDBMS
• One size fits all approach
JSP/JSF
Services
Messaging
JTA
DAO/JPA
© 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 !
© 2014 MapR Technologies ‹#›@tgrall
One size does NOT fit all!
© 2014 MapR Technologies ‹#›@tgrall
Let’s look at our data…
6
© 2014 MapR Technologies ‹#›
Big Data
© 2014 MapR Technologies ‹#›
Big Users
http://www.theconnectivist.com/ & Cisco
© 2015 MapR Technologies ‹#›@tgrall
. . .
App Server
RDBMS
Application
Scale out
Add more “Web” servers
RDBMS
Scale Up
Get bigger server
Stay up!…. and Scale
© 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
© 2015 MapR Technologies ‹#›@tgrall
NoSQL to Scale Out!
. . .
NoSQL
App Server
. . .
Application
Scale out
Add more “Web” servers
NoSQL
Scale Out
Add more servers
© 2015 MapR Technologies ‹#›@tgrall
Operational vs Analytics Databases
Warehouse,AnalyticsApplications, Interactions
© 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
© 2015 MapR Technologies ‹#›@tgrall
© 2015 MapR Technologies ‹#›@tgrall
Data Service Layer
• Wrap data call in Services
– loosely coupled
. . .
App Server
© 2015 MapR Technologies ‹#›@tgrall
Use Case : Personalization
WebSite / Application
Personalization Database
Data Processing
Logs
Application
Data
© 2015 MapR Technologies ‹#›@tgrall
Use Case : Mobile / API
PIM Database
• Legacy Application
• Product Information
NoSQL
• REST API
• Product Data
• Additional Metadata
© 2014 MapR Technologies ‹#›
Now What?
Now What?
© 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, ...
© 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?
© 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 ?
© 2015 MapR Technologies ‹#›@tgrall
How to chose?
• Maturity/Supportability
• Features Set
• Learning Curve
• Productivity
© 2015 MapR Technologies ‹#›@tgrall
Use Case : Second Screen Experience
. . .
Node.js + Socket IO
Play! Application
Python Scripts
© 2015 MapR Technologies ‹#›@tgrall
Use Case : Recommendation
WebSite / Application
Machine Learning / Recommendation
Data Processing
UserActivity
Application
Data
© 2014 MapR Technologies ‹#›@tgrall
Demonstration
© 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?
© 2014 MapR Technologies ‹#›
Questions
© 2014 MapR Technologies ‹#›© 2014 MapR Technologies
Proud to be Polyglot!
Tugdual Grall
@tgrall
June 11, 2015

Proud to be Polyglot - Riviera Dev 2015

  • 1.
    © 2014 MapRTechnologies ‹#›© 2014 MapR Technologies Proud to be Polyglot! Tugdual Grall @tgrall June 11, 2015
  • 2.
    © 2015 MapRTechnologies ‹#›@tgrall Modern Applications • Modern Applications Must • Manage any type of data • Scale • Be fault tolerant • Adapt to change
  • 3.
    © 2015 MapRTechnologies ‹#›@tgrall Current Architecture • Mono-Technology • Single “language/architecture” • Single Database : RDBMS • One size fits all approach JSP/JSF Services Messaging JTA DAO/JPA
  • 4.
    © 2015 MapRTechnologies ‹#›@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 !
  • 5.
    © 2014 MapRTechnologies ‹#›@tgrall One size does NOT fit all!
  • 6.
    © 2014 MapRTechnologies ‹#›@tgrall Let’s look at our data… 6
  • 7.
    © 2014 MapRTechnologies ‹#› Big Data
  • 8.
    © 2014 MapRTechnologies ‹#› Big Users http://www.theconnectivist.com/ & Cisco
  • 9.
    © 2015 MapRTechnologies ‹#›@tgrall . . . App Server RDBMS Application Scale out Add more “Web” servers RDBMS Scale Up Get bigger server Stay up!…. and Scale
  • 10.
    © 2015 MapRTechnologies ‹#›@tgrall Scaling out RDBMS • Run many RDBMS Servers • Data could be partitioned • Done by the application code • Caching Layer . . . App Server . . . Memcached . . . MySQL
  • 11.
    © 2015 MapRTechnologies ‹#›@tgrall NoSQL to Scale Out! . . . NoSQL App Server . . . Application Scale out Add more “Web” servers NoSQL Scale Out Add more servers
  • 12.
    © 2015 MapRTechnologies ‹#›@tgrall Operational vs Analytics Databases Warehouse,AnalyticsApplications, Interactions
  • 13.
    © 2015 MapRTechnologies ‹#›@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
  • 14.
    © 2015 MapRTechnologies ‹#›@tgrall
  • 15.
    © 2015 MapRTechnologies ‹#›@tgrall Data Service Layer • Wrap data call in Services – loosely coupled . . . App Server
  • 16.
    © 2015 MapRTechnologies ‹#›@tgrall Use Case : Personalization WebSite / Application Personalization Database Data Processing Logs Application Data
  • 17.
    © 2015 MapRTechnologies ‹#›@tgrall Use Case : Mobile / API PIM Database • Legacy Application • Product Information NoSQL • REST API • Product Data • Additional Metadata
  • 18.
    © 2014 MapRTechnologies ‹#› Now What? Now What?
  • 19.
    © 2015 MapRTechnologies ‹#›@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, ...
  • 20.
    © 2015 MapRTechnologies ‹#›@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?
  • 21.
    © 2015 MapRTechnologies ‹#›@tgrall Examples • Simple CRUD Application • Use the JavaEE stack with JPA and JSF? • Use Spring ? • Use tools like Play!, Grails, Rails, MEAN ?
  • 22.
    © 2015 MapRTechnologies ‹#›@tgrall How to chose? • Maturity/Supportability • Features Set • Learning Curve • Productivity
  • 23.
    © 2015 MapRTechnologies ‹#›@tgrall Use Case : Second Screen Experience . . . Node.js + Socket IO Play! Application Python Scripts
  • 24.
    © 2015 MapRTechnologies ‹#›@tgrall Use Case : Recommendation WebSite / Application Machine Learning / Recommendation Data Processing UserActivity Application Data
  • 25.
    © 2014 MapRTechnologies ‹#›@tgrall Demonstration
  • 26.
    © 2015 MapRTechnologies ‹#›@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?
  • 27.
    © 2014 MapRTechnologies ‹#› Questions
  • 28.
    © 2014 MapRTechnologies ‹#›© 2014 MapR Technologies Proud to be Polyglot! Tugdual Grall @tgrall June 11, 2015