One size fit All

1,922
-1

Published on

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

No Downloads
Views
Total Views
1,922
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
0
Comments
0
Likes
5
Embeds 0
No embeds

No notes for slide

One size fit All

  1. 1. One Size fits All David Funarodomenica 3 aprile 2011
  2. 2. - One Size fits-All David Funarodomenica 3 aprile 2011
  3. 3. Why i’m Here “There must be a better way to design this model” ?????????????????????????????????domenica 3 aprile 2011
  4. 4. Evolution of the persistence TIME ’60 Application SINGLE USER Everything in inside the application, every time we have to spend time to reinvent the wheeldomenica 3 aprile 2011
  5. 5. Evolution of the persistence TIME ’60 ’70/80 Application Application Library SINGLE USER SINGLE USER Everything in inside the a good way to develop. All application, every time the business logic is in the we have to spend time Library to reinvent the wheeldomenica 3 aprile 2011
  6. 6. Evolution of the persistence TIME ’60 ’70/80 ’90 Application Application Library RDBMS SINGLE USER SINGLE USER MULTI-USER Everything in inside the a good way to develop. All application, every time the business logic is in the Centralized storage of the we have to spend time Library model to reinvent the wheeldomenica 3 aprile 2011
  7. 7. Data-Driven Application Design Data Applicationdomenica 3 aprile 2011
  8. 8. Way to Develop • Define ER: • Indentify every Entities • Foeach entity find all the attributesdomenica 3 aprile 2011
  9. 9. Active Record “Active record is an approach to accessing data in a database. A database table or view is wrapped into a class.” Wikipediadomenica 3 aprile 2011
  10. 10. ...but NOT alwaysdomenica 3 aprile 2011
  11. 11. ...but NOT always is the right waydomenica 3 aprile 2011
  12. 12. 1:Real Case: plugin UserEvent Event User_id 100 id : 12 event_id 12domenica 3 aprile 2011
  13. 13. 1:Real Case: plugin UserEvent Event User_id 100 id : 12 event_id 12 Document id : 54domenica 3 aprile 2011
  14. 14. 1:Real Case: plugin UserEvent Event User_id 100 id : 12 event_id 12 Document id : 54 Group id : 78domenica 3 aprile 2011
  15. 15. 1:Real Case: plugin UserEvent Event User_id 100 id : 12 event_id 12 Document UserEntity id : 54 User_id 100 Class Document entity_id 12 Group id : 78domenica 3 aprile 2011
  16. 16. 1:Real Case: plugin UserEvent Event User_id 100 id : 12 event_id 12 Document UserEntity id : 54 User_id 100 Class Document entity_id 12 Group id : 78domenica 3 aprile 2011
  17. 17. 1:Real Case: plugin UserEvent Event User_id 100 id : 12 event_id 12 Document UserEntity id : 54 User_id 100 Class Document entity_id 12 Group id : 78domenica 3 aprile 2011
  18. 18. 1:Real Case: plugin UserEvent Event User_id 100 id : 12 event_id 12 Document UserEntity id : 54 User_id 100 Class Document entity_id 12 Group id : 78domenica 3 aprile 2011
  19. 19. 1:Real Case: plugin UserEvent Event User_id 100 id : 12 event_id 12 Document UserEntity id : 54 User_id 100 Class Document entity_id 12 Group id : 78 Integrity : Brokendomenica 3 aprile 2011
  20. 20. 1:Real Case: Redundance UserEvent Event User_id 100 id : 12 event_id 12 UserDocument User_id 100 Document document_id 12 id : 54 UserGroup Group User_id 100 id : 78 document_id 12domenica 3 aprile 2011
  21. 21. 1:Real Case: menu Home: •page •event •group •documentdomenica 3 aprile 2011
  22. 22. 1:Real Case: menu Menu name home Home: menu_item_id 2 •page •event •group •documentdomenica 3 aprile 2011
  23. 23. 1:Real Case: menu Menu name home Home: menu_item_id 2 •page •event MenuItem •group name home •document menu_item_id 2 class Group entity_id iddomenica 3 aprile 2011
  24. 24. 1:Real Case: menu Menu name home Home: menu_item_id 2 •page •event MenuItem •group name home •document menu_item_id 2 class Group entity_id id Event id : 12domenica 3 aprile 2011
  25. 25. 1:Real Case: menu Menu name home Home: menu_item_id 2 •page •event MenuItem •group name home •document menu_item_id 2 class Group entity_id id Event Document id : 12 id : 54domenica 3 aprile 2011
  26. 26. 1:Real Case: menu Menu name home Home: menu_item_id 2 •page •event MenuItem •group name home •document menu_item_id 2 class Group entity_id id Event Group Document id : 12 id : 78 id : 54domenica 3 aprile 2011
  27. 27. 1:Real Case: menu Menu name home Home: menu_item_id 2 •page •event MenuItem •group name home •document menu_item_id 2 class Group entity_id id Event Group Document id : 12 id : 78 id : 54domenica 3 aprile 2011
  28. 28. 1:Real Case: menu Menu name home Home: menu_item_id 2 •page •event MenuItem •group name home •document menu_item_id 2 class Group entity_id id Event Group Document id : 12 id : 78 id : 54domenica 3 aprile 2011
  29. 29. 1:Real Case: menu Menu name home Home: menu_item_id 2 •page •event MenuItem •group name home •document menu_item_id 2 class Group entity_id id Event Group Document id : 12 id : 78 id : 54domenica 3 aprile 2011
  30. 30. Impedence mismatchdomenica 3 aprile 2011
  31. 31. Design Modeldomenica 3 aprile 2011
  32. 32. Design Model Application Needsdomenica 3 aprile 2011
  33. 33. Design Model | = Application Needsdomenica 3 aprile 2011
  34. 34. Design Model | = Application Needs Comportamenti che i modelli non sono in grado di supportaredomenica 3 aprile 2011
  35. 35. Arrangement Design Model | = Application Needs Comportamenti che i modelli non sono in grado di supportaredomenica 3 aprile 2011
  36. 36. Technology focusdomenica 3 aprile 2011
  37. 37. Technology focusdomenica 3 aprile 2011
  38. 38. Bad RDBMS Casesdomenica 3 aprile 2011
  39. 39. Data Mapping Struttura Dati RDBMS id 10 name pippo parent_id 19domenica 3 aprile 2011
  40. 40. The Alien Different Behaviour Different Modeldomenica 3 aprile 2011
  41. 41. Unpredictable Tomorrow • User Story never complete • User Story evolvedomenica 3 aprile 2011
  42. 42. Bad DBMS Cases • Dynamic Pages • Data mapping • The Alien • Producer/Consumer • Overnormalized • Unpredictable tomorrowdomenica 3 aprile 2011
  43. 43. Bad DBMS Cases • Dynamic Pages • Data mapping • The Alien • Producer/Consumer • Overnormalized = • Unpredictable tomorrowdomenica 3 aprile 2011
  44. 44. Bad DBMS Cases • Dynamic Pages • Data mapping • The Alien • Producer/Consumer • Overnormalized = • Unpredictable tomorrowdomenica 3 aprile 2011
  45. 45. NoSqldomenica 3 aprile 2011
  46. 46. NoSql Not Only Sqldomenica 3 aprile 2011
  47. 47. NoSql Not Only Sql Just find the right way to manage our data-setdomenica 3 aprile 2011
  48. 48. NoSqldomenica 3 aprile 2011
  49. 49. document- document- TYPE oriented key-value oriented graph Reliability / Performance / FOCUS doc-oriented Performance doc-oriented edge relations Schema-less SCHEMA Schema-less Schema-less Schema-less Schema-full Mixeddomenica 3 aprile 2011
  50. 50. Performance • Redis : about 110000 SETs per second, about 81000 GETs per second.domenica 3 aprile 2011
  51. 51. TYPE Key - Value ‘nome’ -> ‘Davidino’domenica 3 aprile 2011
  52. 52. TYPE document-Oriented ‘person’ -> ‘{ ‘name’ : ‘david’, ‘surname’ : ‘funaro’, phones: [ 34702323, 233234124, 134014 ] }’ JSondomenica 3 aprile 2011
  53. 53. TYPE Graph DB JSondomenica 3 aprile 2011
  54. 54. More ...domenica 3 aprile 2011
  55. 55. So ?domenica 3 aprile 2011
  56. 56. So ? • Removing impedence mismatch is a good reason to avoid the relational modeldomenica 3 aprile 2011
  57. 57. So ? • Removing impedence mismatch is a good reason to avoid the relational model • Performances aren’t the only reason to choose NoSQLdomenica 3 aprile 2011
  58. 58. So ? • Removing impedence mismatch is a good reason to avoid the relational model • Performances aren’t the only reason to choose NoSQL • A RDBMS isn’t always the proper choicedomenica 3 aprile 2011
  59. 59. Thanks • David Funaro • http://www.davidfunaro.com • @ingdavidino • ing.davidino@gmail.comdomenica 3 aprile 2011

×