Proud to be Polygot!
Tugdual “Tug” Grall
@tgrall
Technical Evangelist at

Wednesday, November 6, 13

.
{about : “me”}
• Tugdual “Tug” Grall
­ Couchbase
­ Technical Evangelist
­ eXo
­ CTO
­ Oracle
­ Developer/Product Manager
­...
Modern Applications
• Modern Applications Must
­ Manage any type of data
­ Scale
­ Be fault	
  tolerant
­ Adapt to change
...
Standard Architecture
• Mono-Technology
­ Same “language/architecture”
­ Single Database : RDBMS

• One size fits all appro...
Is it good for me?
• Many files
- XML, Sources, ..
• Hibernate/JPA is good for all?
- Impedance mismatch
• Need to scale
- ...
One	
  size	
  does	
  NOT	
  fit	
  all!

Wednesday, November 6, 13
Look at our Data....

Wednesday, November 6, 13
Big	
  Data

High Data Variety and Velocity

Trillions	
  of	
  Gigabytes	
  (Ze:abytes)

2.00

1.50

Unstructured	
  and	...
50	
  Million	
  Users	
  in	
  50	
  Days
Draw	
  Something	
  by	
  OMGPOP
Daily	
  Ac)ve	
  Users	
  (millions)
16

14
...
How do you take this growth?
ApplicaXon	
  Scales	
  Out
Just	
  add	
  more	
  commodity	
  web	
  servers
System	
  Cost...
NoSQL Technology Scales Out
ApplicaXon	
  Scales	
  Out
Just	
  add	
  more	
  commodity	
  web	
  servers
System	
  Cost
...
OperaMonal	
  vs.	
  AnalyMc	
  Databases
Real-­‐Xme,	
  
InteracXve	
  Databases

AnalyXc
Databases

NoSQL
Fast	
  access...
Polyglot Persistence

Big	
  Data/Analysis

•	
  Log	
  Capture
•	
  RecommendaMons
•	
  AdCampaign

Wednesday, November 6...
Developer New Skills
• Understand the pros/cons of each solutions
­ Programming API
­ How to access the data? (API, Query ...
Data Service Layer
• Wrap datastore in Services
- Loosely coupled
Data	
  Service

Wednesday, November 6, 13
Use Case : Content Driven Site

Wednesday, November 6, 13
Use Case: Mobile Services
Web/App	
  Server	
  Tier

Web/App	
  Server	
  Tier

Rabbit	
  MQ
PIM	
  Database
-­‐	
  Legacy...
Now what?

Wednesday, November 6, 13
Why multiple languages?
• Sometimes we have no choice
­ HTML/CSS/JavaScript + Server Side
­ Mobile Native Applications
• J...
Examples
• Realtime interaction with WebSockets
- Wait for Java EE 7 to be out?
- Hack your app server and application wit...
Examples
• Simple CRUD Application
­ Use the JavaEE stack with JPA and JSF?
­ Use Spring ?
­ Use tools like Play!, Grails,...
How to chose?
• Maturity/Supportability
• Features Set
• Learning Curve
• Productivity

Wednesday, November 6, 13
Polyglot Programming in Action
• Build a distributed database
­ Manage distributed
processes
­ Save and retrieve data on
d...
Polyglot Programming in Action
• Manage Distributed Process
­ Erlang and OTP (Open Telecom Platform) has been built for th...
Couchbase Server

Query	
  Engine

Query	
  API

11210	
  /	
  11211

8091
Admin	
  Console

Data	
  access	
  ports

hbp
...
Use Case: Second Screen Gaming
AdministraXon

Java/Play	
  ApplicaXon
Python	
  scrips

Wednesday, November 6, 13

Users

...
Conclusion
• Use the good tool for the good task
­ Do not try to “hack” something when you have a shorter solution
­ Think...
Q&A
@tgrall
tug@couchbase.com

Wednesday, November 6, 13
Upcoming SlideShare
Loading in …5
×

Proud to be polyglot!

494 views
325 views

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
494
On SlideShare
0
From Embeds
0
Number of Embeds
59
Actions
Shares
0
Downloads
4
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Proud to be polyglot!

  1. 1. Proud to be Polygot! Tugdual “Tug” Grall @tgrall Technical Evangelist at Wednesday, November 6, 13 .
  2. 2. {about : “me”} • Tugdual “Tug” Grall ­ Couchbase ­ Technical Evangelist ­ eXo ­ CTO ­ Oracle ­ Developer/Product Manager ­ Mainly Java/SOA ­ Developer in consulting firms Wednesday, November 6, 13 • Web ­ @tgrall ­ http://blog.grallandco.com ­ tgrall ­ NantesJUG co-founder ­ Pet Project : ­ http://www.resultri.com ­ tug@couchbase.com ­ tugdual@gmail.com
  3. 3. Modern Applications • Modern Applications Must ­ Manage any type of data ­ Scale ­ Be fault  tolerant ­ Adapt to change Wednesday, November 6, 13
  4. 4. Standard Architecture • Mono-Technology ­ Same “language/architecture” ­ Single Database : RDBMS • One size fits all approach Wednesday, November 6, 13 JSP/JSF Services Messaging JTA DAO/JPA
  5. 5. Is it good for me? • Many files - XML, Sources, .. • Hibernate/JPA is good for all? - Impedance mismatch • Need to scale - from 0 to 50millions users in 6 weeks (real life) - can I do that easily with such architecture? Wednesday, November 6, 13 • How to add new features easily? - code, schema change, ... - and all this for yesterday! • Lot of code
  6. 6. One  size  does  NOT  fit  all! Wednesday, November 6, 13
  7. 7. Look at our Data.... Wednesday, November 6, 13
  8. 8. Big  Data High Data Variety and Velocity Trillions  of  Gigabytes  (Ze:abytes) 2.00 1.50 Unstructured  and  Semi-­‐ Structured  Data 1.00 Text,  Log  Files,  Click   Streams,  Blogs,   Tweets,  Audio,  Video,   etc. 0.50 0 Structured  Data 2006 2009 Source:  IDC   Wednesday, November 6, 13 More  Flexible  Data  Model  Required 2012
  9. 9. 50  Million  Users  in  50  Days Draw  Something  by  OMGPOP Daily  Ac)ve  Users  (millions) 16 14 12 10 8 6 4 2 2/6 8 Wednesday, November 6, 13 10 12 14 16 18 20 22 24 26 28 3/1 3 5 7 9 11 13 15 17 19 21
  10. 10. How do you take this growth? ApplicaXon  Scales  Out Just  add  more  commodity  web  servers System  Cost ApplicaMon  Performance   Web/App  Server  Tier Users RDBMS  Scales  Up Get  a  bigger,  more  complex  server System  Cost ApplicaMon  Performance   Won’t  scale   beyond  this   point RelaXonal  Database Users Wednesday, November 6, 13
  11. 11. NoSQL Technology Scales Out ApplicaXon  Scales  Out Just  add  more  commodity  web  servers System  Cost ApplicaMon  Performance   Web/App  Server  Tier Users NoSQL  Database  Scales  Out Cost  and  performance  mirrors  app  Xer System  Cost ApplicaMon  Performance   NoSQL  Distributed  Data  Store Users Wednesday, November 6, 13
  12. 12. OperaMonal  vs.  AnalyMc  Databases Real-­‐Xme,   InteracXve  Databases AnalyXc Databases NoSQL Fast  access   to  data Couchbase MongoDB Wednesday, November 6, 13 Get  insights  from   data Cloudera Hortonworks Mapr
  13. 13. Polyglot Persistence Big  Data/Analysis •  Log  Capture •  RecommendaMons •  AdCampaign Wednesday, November 6, 13 Document  &  K/V •  Products •  User  Profiles •  Game  AcMons •  Sessions •  Shopping  Cart RDBMS •  Financial  Data •  ReporMng Indexing •Full  Text  Search •Ad  hoc  queries
  14. 14. Developer New Skills • 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 Wednesday, November 6, 13
  15. 15. Data Service Layer • Wrap datastore in Services - Loosely coupled Data  Service Wednesday, November 6, 13
  16. 16. Use Case : Content Driven Site Wednesday, November 6, 13
  17. 17. Use Case: Mobile Services Web/App  Server  Tier Web/App  Server  Tier Rabbit  MQ PIM  Database -­‐  Legacy  ApplicaXon -­‐  Product  InformaXon Wednesday, November 6, 13 NoSQL -­‐  Product  Data -­‐  AddiXonal  Metada
  18. 18. Now what? Wednesday, November 6, 13
  19. 19. Why multiple languages? • Sometimes we have no choice ­ HTML/CSS/JavaScript + Server Side ­ Mobile Native Applications • Java/.Net have not evolved that must these past years ­ 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, ... Wednesday, November 6, 13
  20. 20. Examples • Realtime interaction with WebSockets - Wait for Java EE 7 to be out? - Hack your app server and application with Continuation ? - Use Node.js and Socket.io ? • Data Collection and Treatment? - Find a library? - Create your library? - Wait for Java 8 and Lambdas? - Use Scala? ... or other Wednesday, November 6, 13
  21. 21. Examples • Simple CRUD Application ­ Use the JavaEE stack with JPA and JSF? ­ Use Spring ? ­ Use tools like Play!, Grails, Rails ? Wednesday, November 6, 13
  22. 22. How to chose? • Maturity/Supportability • Features Set • Learning Curve • Productivity Wednesday, November 6, 13
  23. 23. Polyglot Programming in Action • Build a distributed database ­ Manage distributed processes ­ Save and retrieve data on disk ­ Cache the data on RAM ­ Build a query engine Wednesday, November 6, 13
  24. 24. Polyglot Programming in Action • Manage Distributed Process ­ Erlang and OTP (Open Telecom Platform) has been built for that ­ Taking this will bootstrap a project quickly instead of implementing in another language • Data access and Caching ­ C/C++ is the best/fastest way to interact with I/O ­ Leverage existing Caching layer, for example Memcached written in C • Query & Indexing ­ Easy to code for developer : Let’s use JavaScript Wednesday, November 6, 13
  25. 25. Couchbase Server Query  Engine Query  API 11210  /  11211 8091 Admin  Console Data  access  ports hbp Object-­‐managed Cache Data  Manager Wriben  in  C/C++ REST  management   API/Web  UI Cluster  Manager ReplicaMon,   ebalance,     Wriben  Sitate  RErlang n   Manager Shard   Erlang  /OTP 8092 Storage  Engine Data  Manager Wednesday, November 6, 13 Cluster  Manager
  26. 26. Use Case: Second Screen Gaming AdministraXon Java/Play  ApplicaXon Python  scrips Wednesday, November 6, 13 Users Node.js  +  Socket  IO
  27. 27. Conclusion • Use the good tool for the good task ­ Do not try to “hack” something when you have a shorter 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 • Operations / DevOps ­ Think about it from day one... as a developer • What about maintenance? ­ Do you think it is easier to maintain complex code? Wednesday, November 6, 13
  28. 28. Q&A @tgrall tug@couchbase.com Wednesday, November 6, 13

×