Your SlideShare is downloading. ×

Softshake 2013 Proud to be a Polyglot

2,789

Published on

As presented by Tugdual Grall at Softshake in Geneva Switzerland. In his presentation, attendees will learn the benefits of being polyglot, how developers can mix the Java platform with other …

As presented by Tugdual Grall at Softshake in Geneva Switzerland. In his presentation, attendees will learn the benefits of being polyglot, how developers can mix the Java platform with other technologies like NodeJS and AngularJS to build applications, and the new Command Query Responsibility Segregation pattern.

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
2,789
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
8
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Monday, October 28, 13
  • 2. Polyglot  Applica-on   Development Tugdual  “Tug”  Grall Technical  Evangelist tug@couchbase.com Monday, October 28, 13 @tgrall
  • 3. Modern  Applica-ons • Modern  Applica-ons  Must ­ Manage  any  type  of  data ­ Scale ­ Be  fault  tolerant ­ Adapt  to  change Monday, October 28, 13
  • 4. Standard  Architecture • Mono-­‐Technology ­ Same  “language/architecture” ­ Single  Database  :  RDBMS • One  size  fits  all  approach Monday, October 28, 13 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  (real  life) ­ can  I  do  that  easily  with  such  architecture? • How  to  add  new  features  easily? ­ code,  schema  change,  ... ­ and  all  this  for  yesterday! • Lot  of  code Monday, October 28, 13
  • 6. One  size  does  NOT  fit  all! Monday, October 28, 13
  • 7. Look  at  our  Data.... Monday, October 28, 13
  • 8. Big  Data High  Data  Variety  and  Velocity Trillions  of  Gigabytes  (Ze<abytes) 2.00 1.50 Unstructured  and  Semi-­‐ Structured  Data 1.00 0.50 0 Text,  Log  Files,  Click   Streams,  Blogs,   Tweets,  Audio,   Video,  etc. Structured  Data 2011 2006 Source:  IDC  2011  Digital  Universe  Study  (h<p://www.emc.com/collateral/demos/microsites/emc-­‐digital-­‐universe-­‐2011/index.htm) More  Flexible  Data  Model  Required Monday, October 28, 13 2000
  • 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 10 Monday, October 28, 13 12 14 16 18 20 22 24 26 28 3/1 3 5 7 9 11 13 15 17 19 21
  • 10. How  do  you  take  this  growth? ApplicaIon  Scales  Out Just  add  more  commodity  web  servers System  Cost ApplicaTon  Performance   Web/App  Server  Tier Users RDBMS  Scales  Up Get  a  bigger,  more  complex  server System  Cost ApplicaTon  Performance   Won’t  scale   beyond  this   point Rela:onal  Database Users RDBMS  is  good  for  many  thing,  but  hard  to  scale Monday, October 28, 13
  • 11. NoSQL  Technology  Scales  Out ApplicaIon  Scales  Out Just  add  more  commodity  web  servers System  Cost ApplicaTon  Performance   Web/App  Server  Tier Users NoSQL  Database  Scales  Out Cost  and  performance  mirrors  app  Ier System  Cost ApplicaTon  Performance   NoSQL  Distributed  Data  Store Users Scaling  out  fla?ens  the  cost  and  performance  curves Monday, October 28, 13
  • 12. OperaTonal  vs.  AnalyTc  Databases Real-­‐Fme,   InteracFve  Databases AnalyFc Databases NoSQL Fast  access   to  data Couchbase MongoDB Monday, October 28, 13 Get  insights  from   data Cloudera Cassandra Hortonworks Hbase Mapr
  • 13. Polyglot  Persistence Big  Data/Analysis •  Log  Capture •  RecommendaTons •  AdCampaign Monday, October 28, 13 Document  &  K/V •  Products •  User  Profiles •  Game  AcTons •  Sessions •  Shopping  Cart RDBMS •  Financial  Data •  ReporTng Indexing •Full  Text  Search •Ad  hoc  queries
  • 14. Developer  New  Skills • Understand  the  pros/cons  of  each  solu-ons ­ 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  solu-on  to  your  applica-on • Note:  This  is  something  you  already  do  ! ­ OperaTonal  RDBMS  and  Data  Warehouse Monday, October 28, 13
  • 15. Data  Service  Layer • Wrap  datastore  in  Services ­ loosely  coupled Data  Service Monday, October 28, 13
  • 16. Use  Case  :  Content  Driven  Site Monday, October 28, 13
  • 17. Use  Case:  Mobile  Services Web/App  Server  Tier Web/App  Server  Tier PIM  Database -­‐  Legacy  Applica:on -­‐  Product  Informa:on Monday, October 28, 13 NoSQL -­‐  Product  Data -­‐  Addi:onal  Metada
  • 18. Now  what? Monday, October 28, 13
  • 19. Why  mul-ple  languages? • Some-mes  we  have  no  choice ­ HTML/CSS/JavaScript  +  Server  Side ­ Mobile  NaTve  ApplicaTons • Java/.Net  have  not  evolved  that  must  these  past  years ­ Java  EE  5.0  is  sTll  mainstream  (2006) • Many  languages  and  frameworks ­ Scala,  Clojure,  Groovy,  Dart,  Go,  Ruby,  Python,  F#,  Erlang ­ Node.js,  Rails,  Play!,  Grails,  ... Monday, October 28, 13
  • 20. Examples • Real-me  interac-on  with  WebSockets  : ­ Wait  for  Java  EE  7  to  be  out? ­ Hack  your  app  server  and  applicaTon  with  ConTnuaTon  ? ­ Use  Node.js  and  Socket.io  ? • Data  Collec-on  and  Treatment? ­ ­ ­ ­ Find  a  library? Create  your  library? Wait  for  Java  8  and  Lambdas? Use  Scala?  ...  or  other Monday, October 28, 13
  • 21. Examples • Simple  CRUD  Applica-on ­ Use  the  JavaEE  stack  with  JPA  and  JSF? ­ Use  Spring  ? ­ Use  tools  like  Play!,  Grails,  Rails  ? Monday, October 28, 13
  • 22. How  to  chose? • Maturity/Supportability   • Features  Set • Learning  Curve • Produc-vity Monday, October 28, 13
  • 23. Polyglot  Programming  in  Ac-on • Build  a  distributed  database ­ Manage  distributed  processes ­ Save  and  retrieve  data  on  disk ­ Cache  the  data  on  RAM ­ Build  a  query  engine   Monday, October 28, 13
  • 24. Polyglot  Programming  in  Ac-on • Manage  Distributed  Process ­ Erland  and  OTP  (Open  Telecom  Plaform)  has  been  built  for  that ­ Taking  this  will  bootstrap  a  project  quickly  instead  of  implemenTng  in   another  language • Data  access  and  Caching ­ C/C++  is  the  best/fastest  way  to  interact  with  I/O ­ Leverage  exisTng  Caching  layer,  for  example  Memcached  wrigen  in  C • Query  &  Indexing ­ Easy  to  code  for  developer  :  Let’s  use  JavaScript Monday, October 28, 13
  • 25. Couchbase  Server  Architecture Query  Engine Query  API 11210  /  11211 8091 Admin  Console Data  access  ports hp Object-­‐managed Cache Data  Manager WriOen  in  C/C++ REST  management   API/Web  UI Cluster  Manager ReplicaTon,   ebalance,     WriOen  Sitate  RErlang n   Manager Shard   Erlang  /OTP 8092 Storage  Engine Data  Manager Monday, October 28, 13 Cluster  Manager
  • 26. Use  Case:  Second  Screen  Gaming Administra-on Java/Play  Applica:on Python  scrips Monday, October 28, 13 Node.js  +  Socket  IO
  • 27. Conclusion • Use  the  good  tool  for  the  good  task ­ Do  not  try  to  “hack”  something  when  you  have  a  shorter  soluTon ­ 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? Monday, October 28, 13
  • 28. Q&A @tgrall tug@couchbase.com Monday, October 28, 13

×