"Comics" Is Hard: Alternative Databases

1,625 views
1,544 views

Published on

Given at Developer Day Boston on August 15th

0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,625
On SlideShare
0
From Embeds
0
Number of Embeds
55
Actions
Shares
0
Downloads
20
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

"Comics" Is Hard: Alternative Databases

  1. 1. “Comics” Is Hard: Alternative Databases Ben Scofield – Viget Labs 1
  2. 2. Modeling flickr: bunchofpants 2
  3. 3. Biology 3
  4. 4. Linnean taxonomy 4
  5. 5. Kingdom Animalia Phylum Chordata Class Mammalia Order Carnivora Family Felidae Genus Panthera Species tigris flickr: pandiyan 5
  6. 6. Animalia Chordata Mammalia Carnivora Felidae Panthera tigris flickr: pandiyan 5
  7. 7. kingdom phylum class genus family order species organism 6
  8. 8. Problem The levels are imaginary 7
  9. 9. subphylum kingdom phylum class superclass subclass subfamily suborder superorder genus family order subgenus superfamily subspecies species organism variety 8
  10. 10. subphylum kingdom phylum class ? superclass subclass subfamily suborder superorder genus family order subgenus superfamily subspecies species organism variety 8
  11. 11. subspecies taxon taxon taxon species organism variety 9
  12. 12. Species flickr: cpurrin1 10
  13. 13. Reproductive Isolation flickr: superciliousness 11
  14. 14. Reproductive Isolation flickr: superciliousness 11
  15. 15. 12
  16. 16. 13
  17. 17. flickr: niznoz 14
  18. 18. Numerical taxonomy 15
  19. 19. Cladistics 16
  20. 20. taxon clade taxon organism 17
  21. 21. Problem Cladistics is historical and counter-intuitive 18
  22. 22. flickr: goellnitz 19
  23. 23. flickr: goellnitz pcoin 19
  24. 24. The Challenge Unclear, imprecise domain 20
  25. 25. comics 21
  26. 26. publisher title issue 22
  27. 27. 23
  28. 28. publisher imprint title issue 24
  29. 29. 25
  30. 30. publisher imprint title issue volume 26
  31. 31. 27
  32. 32. 27
  33. 33. 28
  34. 34. 29
  35. 35. publisher imprint title issue volume trade 30
  36. 36. 31
  37. 37. 31
  38. 38. 32
  39. 39. 32
  40. 40. 33
  41. 41. 33
  42. 42. publisher imprint title issue volume variant trade 34
  43. 43. 35
  44. 44. 35
  45. 45. 36
  46. 46. 36
  47. 47. name publisher imprint title issue volume variant trade 37
  48. 48. 38
  49. 49. 38
  50. 50. 38
  51. 51. 39
  52. 52. 39
  53. 53. name publisher imprint title ? issue nested set? volume variant trade 40
  54. 54. 41
  55. 55. 42
  56. 56. imprint ?!?! publisher title name issue storyline volume nested set? variant trade 43
  57. 57. science fiction noir horror genres? independent Martial Arts historical Pirate superhero 44
  58. 58. imprint publisher @#&*! title name genre issue volume nested set? storyline variant trade 45
  59. 59. The Challenge Complete insanity 46
  60. 60. Alternatives databases unite! #?forben flickr: ikhnaton2 47
  61. 61. http://thisisindexed.com/2009/02/just-because-you-can-doesnt-mean-you-should/ 48
  62. 62. Key-Value 49
  63. 63. Redis Tokyo Cabinet Project Voldemort Cassandra* 50
  64. 64. require "rubygems" require "tokyocabinet" include TokyoCabinet bdb = BDB::new # B-Tree database; keys may have multiple values bdb.open("casket.bdb", BDB::OWRITER | BDB::OCREAT) # store records in the database, allowing duplicates bdb.putdup("key1", "value1") bdb.putdup("key1", "value2") bdb.put("key2", "value3") bdb.put("key3", "value4") # retrieve all values p bdb.getlist("key1") # => ["value1", "value2"] # range query, find all matching keys p bdb.range("key1", true, "key3", true) # => ["key1", "key2", "key3"] http://www.igvita.com/2009/02/13/tokyo-cabinet-beyond-key-value-store/ 51
  65. 65. Biology x Comics x 52
  66. 66. Configuration ✓ Caching ✓ Translations ✓ 53
  67. 67. 54
  68. 68. Document 55
  69. 69. 56
  70. 70. { 'name':'Ben Scofield', 'adjective':'awesomesauce' } { 'name':'Magic Pony', 'description':'It is a *lie*!' } 57
  71. 71. Biology ✓ Comics x 58
  72. 72. { 'kingdom':'Animalia', ‘phylum’:‘Chordata’, ‘subphylum’:‘Vertebrata’, ‘class’:‘Mammalia’, ‘subclass’:‘Eutheria’, ‘order’:‘Carnivora’, ‘family’:‘Felidae’, ‘subfamily’:‘Panthernae’, ‘genus’:‘Pantera’, ‘species’:‘tigris’, ‘name’:‘Wanda’ } 59
  73. 73. Graph 60
  74. 74. AllegroGraph Java Java / Lisp 61
  75. 75. http://neotechnology.com/why-neo 62
  76. 76. http://markorodriguez.com/Lectures_files/risk-symposium2009.pdf 63
  77. 77. flickr: 9948354@N08 64
  78. 78. Biology ✓ Comics ✓ 65
  79. 79. Animalia ... Felidae subfamilyof genusof Panthernae genusof Panthera speciesof tigris member 001 age name weight 3 Wanda 300 66
  80. 80. Animalia ... Felidae subfamilyof genusof Panthernae genusof Panthera species speciesof type tigris 010 name tigris member 001 age name weight 3 Wanda 300 66
  81. 81. Group IV orderof Picornavirales familyof Picornaviridae genusof Rhinovirus speciesof human rhinovirus A member 002 67
  82. 82. class Mammalia Group IV group orderof orderof Carnivora Picornavirales familyof familyof Felidae Picornaviridae subfamilyof Panthernae genusof genusof genusof Panthera Rhinovirus speciesof speciesof human tigris rhinovirus A member member 001 002 68
  83. 83. DC imprintof titleof DC Universe Green titleof 001 Lantern nameof genreof volumeof genreof Volume 1 Sci Fi Superhero genreof issueof genreof 002 precedes Issue #2 number coverof #1 003 69
  84. 84. require 'neo4j' Neo4j::Transaction.run do dc = Neo4j::Node.new dc[:name] = 'DC' dc_universe = Neo4j::Node.new dc_universe[:name] = 'DC Universe' dc.relationships.outgoing(:imprints) << dc_universe rel = dc.relationships.outgoing(:imprints).first rel[:started] = 1980 vol1 = Neo4j::Node.new vol1[:started] = 1941 vol1[:ended] = 1949 vol1[:name] = 'Green Lantern' dc.relationships.outgoing(:titles) << vol1 dc_universe.relationships.outgoing(:titles) << vol1 # ... end 70
  85. 85. Hybrid Solutions flickr: joriel 71
  86. 86. 72
  87. 87. 72
  88. 88. post tag document id { 'title':'Post Title' 'content':'Hello!' 'comments':["First!"] } 73
  89. 89. 74
  90. 90. search user accounts and whatnot { 'name':'...' 'attr1':'...' 'attr7':'...' } 75
  91. 91. Thank You ben scofield - @bscofield http://benscofield.com http://www.viget.com/extend http://www.speakerrate.com/bscofield 76

×