Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Proud to be polyglot (persistence and programming)

Proud to be polyglot (persistence and programming)

New developers and teams are now polyglot :
- they use multiple programming languages (Java, Javascript, Ruby, ...)
- they use multiple persistence store (RDBMS, NoSQL, Hadoop)
In this talk you will learn about the benefits if being polyglot: use the good language or framework for the good cause, select the good persistence for specific constraints.
This presentation will show how developer could mix the Java platform with other technologies such as NodeJS and AngularJS to build application in a more productive way. This is also the opportunity to talk about the new Command Query Responsibility Segregation (CQRS) pattern to allow developers to be more effective and deliver the proper application to the user quicker.

This presentation was delivered during Devfest Nantes 2014

Aab9ac774f61c5d9bf143b5a1bfe901b?s=128

Tugdual Grall

November 07, 2014
Tweet

More Decks by Tugdual Grall

Other Decks in Technology

Transcript

  1. DevFest Tugdual Grall Technical Evangelist tug@mongodb.com @tgrall

  2. Proud to be Polyglot! Tugdual Grall Technical Evangelist tug@mongodb.com @tgrall

  3. • Modern Applications Must Manage any type of data Scale

    Be fault tolerant Adapt to change Modern Applications
  4. • Mono-Technology • Single “language/architecture” • Single Database : RDBMS

    • One size fits all approach Current Architecture JSP/JSF   Services   Messaging   JTA   DAO/JPA
  5. Is it good for me? • Many files • XML,

    Sources, .. • Does Hibernate/JPA is good for all? • Impedance mismatch • Need to scale • from 0 to 50millions users in 6 weeks • How to add new features easily? • changing code, updating data structure, ... • and all this for yesterday!
  6. One size does NOT fit all!

  7. Look at our data….

  8. Big Data

  9. Big Users http://www.theconnectivist.com/    &  Cisco

  10. Stay up! .  .  . Application Scale out Add more

    “Web” servers RDBMS Scale Up Get bigger server RDBMS App  Server
  11. Scaling out RDBMS .  .  . App  Server .  .

     . Memcached .  .  . MySQL • Run Many SQL Servers • Data could be sharded • Done by the application code • Caching Layer
  12. NoSQL to Scale out! .  .  . Application Scale out

    Add more “Web” servers NoSQL Scale Out Add more servers NoSQL App  Server .  .  .
  13. Operational vs Analytics Databases Warehouse, Analytics Applications, Interactions

  14. Polyglot Persistence Big  Data/Analysis Document RDBMS • Log  Capture  

    • Recommendations   • Predictions   • Ad  Campaign • Products   • User  Profiles   • Game  Actions   • Sessions   • Shopping  Cart • Financial  Data   • Reporting
  15. • Understand the pros/cons of each solutions – Programming API

    – How to access the data? (API, Query Languages) • Learn how to design data model – De-normalizing and duplicate data is not a problem • Integrate each solution to your application • Note: This is something you already do ! – Operational RDBMS and Data Warehouse Developer New Skills
  16. • Wrap data call in Services – loosely coupled Data

    Service Layer .  .  . App  Server
  17. Use Case : Personalization WebSite  /  Application Personalization Database Data

    Processing Logs Logs Application Data
  18. Use Case : Mobile / API PIM Database • Legacy

    Application • Product Information NoSQL • REST API • Product Data • Additional Metadata
  19. Now  What?

  20. 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, ...
  21. • 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? Examples
  22. • Simple CRUD Application – Use the JavaEE stack with

    JPA and JSF? – Use Spring ? – Use tools like Play!, Grails, Rails, MEAN ? Examples
  23. • Maturity/Supportability • Features Set • Learning Curve • Productivity

    How to chose?
  24. • Build a new database – Save and retrieve data

    on disk – Cache the data on RAM – Build a query engine – Build replication and sharding – Build a Monitoring engine & console – Build a Backup/Restore Solution Polyglot Programming in Action
  25. • Data access, caching, and replication – C/C++ is the

    fastest way to interact with I/O – Leverage existing Caching layer & I/O – memory-mapped file • Query & Indexing – Leverage C/C++, and expose native JS engine • Management – Web Console : Java & HTML/CSS – Agent : GoLang Polyglot Programming in Action
  26. MongoDB & MMS

  27. Use Case : Second Screen Experience .  .  . Node.js

     +  Socket  IO Play!  ApplicaIon   Python  Scripts
  28. Demonstration Sentiment  Analysis

  29. 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 code?
  30. Tugdual Grall Technical Evangelist tug@mongodb.com @tgrall Questions?