Successfully reported this slideshow.
Your SlideShare is downloading. ×

The Future of Data

Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Loading in …3
×

Check these out next

1 of 55 Ad

More Related Content

More from Ben Scofield (20)

Recently uploaded (20)

Advertisement

The Future of Data

  1. 1. Ben Sco eld - @bsco eld Refresh the Triangle, Sept ’09
  2. 2. relational databases
  3. 3. Type Price Location Mellow Mushroom Pizza $$ ATHD Chubby’s Tacos Tacos $ Ninth St Dos Perros Mexican $$ Downtown Revolution Fancy $$$$ Downtown Person Restaurant Ben Scofield Mellow Mushroom Ben Scofield Dos Perros David Eisinger Dos Perros Office Preference Ben Scofield Viget Labs Tacos David Eisinger Viget Labs Pizza Jess Martin Relevance Mexican
  4. 4. Type Price Location Mellow Mushroom Pizza $$ ATHD Chubby’s Tacos Tacos $ Ninth St Dos Perros Mexican $$ Downtown Revolution Fancy $$$$ Downtown Person Restaurant Ben Scofield =restaurants!A1 Mellow Mushroom Ben Scofield Dos Perros David Eisinger Dos Perros Office Preference Ben Scofield Viget Labs Tacos David Eisinger Viget Labs Pizza Jess Martin Relevance Mexican
  5. 5. the internet
  6. 6. html5 dom storage
  7. 7. 4096 5242880 10485760
  8. 8. session* persistent
  9. 9. http://www.quirksmode.org/dom/html5.html
  10. 10. localStorage.setItem('visitor', 'Ben'); var visitor = localStorage.getItem('visitor'); localStorage.removeItem('visitor');
  11. 11. nosql altdb postrelational
  12. 12. imprint publisher title name genre issue volume nested set? storyline variant trade
  13. 13. http://internetmindmap.com/database_software
  14. 14. traditional hyper-relational non-relational key-value relational complex simple stores databases x x x x document graph databases databases
  15. 15. key-value stores
  16. 16. Type Price Location Mellow Mushroom Pizza $$ ATHD Chubby’s Tacos Tacos $ Ninth St Dos Perros Mexican $$ Downtown Revolution Fancy $$$$ Downtown
  17. 17. dynomite memcached project voldemort pstore redis
  18. 18. non-relational domains
  19. 19. graph databases
  20. 20. Type Price Location Mellow Mushroom Pizza $$ ATHD Chubby’s Tacos Tacos $ Ninth St Dos Perros Mexican $$ Downtown Revolution Fancy $$$$ Downtown Person Restaurant Ben Scofield Mellow Mushroom Ben Scofield Dos Perros David Eisinger Dos Perros Office Preference Ben Scofield Viget Labs Tacos David Eisinger Viget Labs Pizza Jess Martin Relevance Mexican
  21. 21. allegograph hypergraphdb neo4j
  22. 22. allegograph hypergraphdb neo4j rdf
  23. 23. hyper-relational domains
  24. 24. document databases
  25. 25. Type Price Location Mellow Mushroom Pizza $$ ATHD Chubby’s Tacos Tacos $ Ninth St Dos Perros Mexican $$ Downtown Revolution Fancy $$$$ Downtown
  26. 26. couchdb jackrabbit mongodb rddb riak
  27. 27. { ‘name’:‘Mellow Mushroom’ ‘type’:‘Pizza’ ‘price’:’$$’ ‘location’:‘ATHD’ }
  28. 28. { ‘title’:‘I Love Cheese’ ‘content’:‘Cheese is...’ ‘posted’:’24 Sept 2009’ ‘comments’:[{ ‘author’:‘Joe Schmoe’ ‘posted’:’24 Sept 2009’ ‘content’:‘First!’ }, {...}] }
  29. 29. semi-relational domains
  30. 30. other alternatives
  31. 31. column-oriented constant in-memory streaming temporal
  32. 32. polyglot persistence
  33. 33. { ‘title’:‘I Love Cheese’ ‘content’:‘Cheese is...’ ‘posted’:’24 Sept 2009’ ‘comments’:[{ ‘author’:‘Joe Schmoe’ ‘posted’:’24 Sept 2009’ ‘content’:‘First!’ }, {...}] }
  34. 34. Tag Tag Post General Life 1ec8264 Work Food 1ec8264 Fitness Writing bae294a Life Food Writing { ‘title’:‘I Love Cheese’ Family ‘content’:‘Cheese is...’ ‘posted’:’24 Sept 2009’ ‘comments’:[{ ‘author’:‘Joe Schmoe’ ‘posted’:’24 Sept 2009’ ‘content’:‘First!’ }, {...}] }
  35. 35. HTTP application application
  36. 36. HTTP application
  37. 37. application
  38. 38. application
  39. 39. Thank You ben sco eld - @bsco eld - http://www.viget.com/extend - http://www.speakerrate.com/bsco eld

Editor's Notes

  • supported in FF2+, IE8, Safari, ?
  • cookies for persistence since 1994
    key-value stores with expiration/metadata
  • cookies limited to 4k; FF DB is 5MB; IE DB is 10MB
    yeah, we’ll need to standardize
  • dom session storage is PER-WINDOW, not just per session
    local storage persists across sessions
  • Fluid/Prism - Site-specific browsers
    apps that people use, could be locally backed-up, etc.
  • entire applications in JS - no need for server-side storage
  • easy migration to appcelerator/phonegap
  • scalability - replacing one DB with lots of smaller ones
    CONTINGENT PROBLEM, could be fixed
  • scalability - replacing one DB with lots of smaller ones
    CONTINGENT PROBLEM, could be fixed
  • domain modeling is a more basic issue
  • lots of options - check out the scroll bar!
  • least complicated domains - no relationships
  • the spreadsheet metaphor breaks down for key-values
  • best for flat, non-relational domains - caching, for instance
    can also fire up new stores for a one-level relation (users on hurl)
  • most complicated domains - lots of relationships
  • best for hyper-relational domains, where the relationships carry lots of data
    in rails, that’d be HMTs with data on the T
  • between key-value and relational - one or a few simple relationships
    no many-to-many
  • couch and mongo use JSON (or BSON) as the serialization format
  • embedded documents
  • best for domains where there aren’t any/many many-many relationships

    simulated in key-value stores with DB-per-user
  • use the database that fits the domain
  • spiritual sibling to polyglot programming

    polygotting between apps (mongo here, mysql there) is step 1; polyglotting within an app is step 2
  • back to the blog example
  • tags don’t fit in the document model
  • baby steps: polyglotting applications and/or web services
  • step two: connect to couch via HTTP directly (couch application)
  • step three: polyglot away!
  • step three: polyglot away!

×