Your SlideShare is downloading. ×
Great BigTable and my toys
Great BigTable and my toys
Great BigTable and my toys
Great BigTable and my toys
Great BigTable and my toys
Great BigTable and my toys
Great BigTable and my toys
Great BigTable and my toys
Great BigTable and my toys
Great BigTable and my toys
Great BigTable and my toys
Great BigTable and my toys
Great BigTable and my toys
Great BigTable and my toys
Great BigTable and my toys
Great BigTable and my toys
Great BigTable and my toys
Great BigTable and my toys
Great BigTable and my toys
Great BigTable and my toys
Great BigTable and my toys
Great BigTable and my toys
Great BigTable and my toys
Great BigTable and my toys
Great BigTable and my toys
Great BigTable and my toys
Great BigTable and my toys
Great BigTable and my toys
Great BigTable and my toys
Great BigTable and my toys
Great BigTable and my toys
Great BigTable and my toys
Great BigTable and my toys
Great BigTable and my toys
Great BigTable and my toys
Great BigTable and my toys
Great BigTable and my toys
Great BigTable and my toys
Great BigTable and my toys
Great BigTable and my toys
Great BigTable and my toys
Great BigTable and my toys
Great BigTable and my toys
Great BigTable and my toys
Great BigTable and my toys
Great BigTable and my toys
Great BigTable and my toys
Great BigTable and my toys
Great BigTable and my toys
Great BigTable and my toys
Great BigTable and my toys
Great BigTable and my toys
Great BigTable and my toys
Great BigTable and my toys
Great BigTable and my toys
Great BigTable and my toys
Great BigTable and my toys
Great BigTable and my toys
Great BigTable and my toys
Great BigTable and my toys
Great BigTable and my toys
Great BigTable and my toys
Great BigTable and my toys
Great BigTable and my toys
Great BigTable and my toys
Great BigTable and my toys
Great BigTable and my toys
Great BigTable and my toys
Great BigTable and my toys
Great BigTable and my toys
Great BigTable and my toys
Great BigTable and my toys
Great BigTable and my toys
Great BigTable and my toys
Great BigTable and my toys
Great BigTable and my toys
Great BigTable and my toys
Great BigTable and my toys
Great BigTable and my toys
Great BigTable and my toys
Great BigTable and my toys
Great BigTable and my toys
Great BigTable and my toys
Great BigTable and my toys
Great BigTable and my toys
Great BigTable and my toys
Great BigTable and my toys
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Great BigTable and my toys

1,664

Published on

RubyKaigi 2009

RubyKaigi 2009

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

No Downloads
Views
Total Views
1,664
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
8
Comments
0
Likes
2
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. RubyKaigi2009 COBOL seki@druby.org
  • 2. 3360 dRuby • Web • Pragmatic Bookshelf •
  • 3. $32.00 • International Journal of PARALLEL PROGRAMING
  • 4. !?
  • 5. MapReduce Rinda
  • 6. (map, reduce) map reduce
  • 7. key value [ , ] [ , ID]
  • 8. map() ["Applied", 1] ["rb_binding_new", 1] ["ruby", 1] ["eval", 1] ["Communication", 1] ["void", 1] ["if", 1] ["c", 1] ["Laboratory", 1] ["NORETURN", 1] ["defined", 1] ["void", 1] ["Author", 1] ["Inc", 1] ["void", 1] ["__APPLE__", 1] ["Init_heap", 1] ["nobu", 1] ["Copyright", 1] ["rb_raise_jump", 1] ["define", 1] ["void", 1] ["created", 1] ["C", 1] ["VALUE", 1] ["environ", 1] ["void", 1] ["at", 1] ["2000", 1] ["ID", 1] ["_NSGetEnviron", 1] ["Init_BareVM", 1] ["Thu", 1] ["Information", 1] ["rb_frame_callee", 1] ["elif", 1] ["void", 1] ["Jun", 1] ["technology", 1] ["void", 1] ["defined", 1] ["void", 1] ["10", 1] ["Promotion", 1] ["VALUE", 1] ["_WIN32", 1] ["ruby_init", 1] ["14", 1] ["Agency", 1] ["rb_eLocalJumpError", 1] ["extern", 1] ["void", 1] ["22", 1] ["Japan", 1] ["VALUE", 1] ["char", 1] ["static", 1] ["17", 1] ["include", 1] ["rb_eSysStackError", 1] ["environ", 1] ["int", 1] ["JST", 1] ["eval_intern", 1] ["define", 1] ["endif", 1] ["initialized", 1] ["1993", 1] ["h", 1] ["exception_error", 1] ["char", 1] ["0", 1] ["Copyright", 1] ["include", 1] ["GET_VM", 1] ["rb_origenviron", 1] ["int", 1] ["C", 1] ["iseq", 1] ["special_exceptions", 1] ["void", 1] ["state", 1] ["1993", 1] ["h", 1] ["ruby_error_reenter", 1] ["rb_clear_trace_func", 1] ["if", 1] ["2007", 1] ["VALUE", 1] ["include", 1] ["void", 1] ["initialized", 1] ["Yukihiro", 1] ["proc_invoke", 1] ["eval_error", 1] ["void", 1] ["return", 1] ["Matsumoto", 1] ["VALUE", 1] ["c", 1] ["rb_thread_stop_timer_thread", 1] ["initialized", 1] ["Copyright", 1] ["VALUE", 1] ["include", 1] ["void", 1] ["1", 1] ["C", 1] ["VALUE", 1] ["eval_jump", 1] ["void", 1] ["rb_origenviron", 1] ["2000", 1] ["VALUE", 1] ["c", 1] ["rb_call_inits", 1] ["Network", 1] ["VALUE", 1] ["initialize", 1] ["void", 1]
  • 9. map() reduce() ordered list BigTable
  • 10. map key value key value [ , ]
  • 11. reduce() ["ANYARGS", 1] ["Author", 1] ["ANYARGS", 1] ["Author", 1] ["Communication", 1] ["ANYARGS", 1] ["Bignum", 1] ["Communication", 1] ["ANYARGS", 1] ["Bignum", 1] ["Copyright", 1] ["ANYARGS", 1] ["Binding", 1] ["Copyright", 1] ["ANYARGS", 1] ["Binding", 1] ["Copyright", 1] ["ANYARGS", 6] ["C", 1] ["Copyright", 3] ["ARGV", 1] ["C", 1] ["EXEC_EVENT_HOOK", 1] ["ARGV", 1] ["C", 1] ["EXEC_EVENT_HOOK", 1] ["Adds", 1] ["C", 3] ["EXEC_TAG", 1] ["Adds", 1] ["CONST_ID", 1] ["EXEC_TAG", 1] ["Agency", 1] ["CONST_ID", 1] ["EXEC_TAG", 1] ["Agency", 1] ["Call", 1] ["EXEC_TAG", 1] ["Applied", 1] ["Call", 1] ["EXEC_TAG", 1] ["Applied", 1] ["Can", 1] ["EXEC_TAG", 1] ["ArgumentError", 1] ["Can", 1] ["EXEC_TAG", 1] ["ArgumentError", 1] ["Can", 2] ["EXEC_TAG", 1] ["ArgumentError", 2] ["Check_Type", 1] ["EXEC_TAG", 1] ["Array", 1] ["Check_Type", 1] ["EXEC_TAG", 1] ["Array", 1] ["Check_Type", 1] ["EXEC_TAG", 1] ["Array", 1] ["Check_Type", 3] ["Array", 3]
  • 12. key
  • 13. group_by
  • 14. COBOL RubyKaigi2009 COBOL
  • 15. key
  • 16. [key, value] ↑
  • 17. Rinda
  • 18. tuple, tuple space out, in rd
  • 19. Tuple Space Engine Client Engine TupleSpace Client Engine
  • 20. Ruby Linda dRuby Tuple Array
  • 21. Tuple [:chopstick, 2] [:room_ticket] [‘abc’, 2, 5] [:matrix, 1.6, 3.14] [‘family’, ‘is-sister’, ’Carolyn’, ’Elinor’]
  • 22. Tuple === case equals Regexp, Range, Class nil
  • 23. Pattern [/^A/, nil, nil] [:matrix, Numeric, Numeric] [’family’, ’is-sister’, ’Carolyn’, nil] [nil, ’age’, (0..18)]
  • 24. [’seki’, ’age’, 20] >> require ‘rinda/tuplespace’ >> ts = Rinda::TupleSpace.new >> ts.write([’seki’, ’age’, 20]) >> ts.write([’sougo’, ’age’, 18]) >> ts.write([’leonard’, ’age’, 18]) >> ts.read_all([nil, ’age’, 0..19]) => [["sougo", "age", 18], ["leonard", "age", 18]] >> ts.read_all([/^s/, ’age’, Numeric]) => [["seki", "age", 20], ["sougo", "age", 18]]
  • 25. >> ts.write([:seki, :age, 20]) => #<Rinda::TupleEntry:...> >> TupleSpace :seki :age 20
  • 26. >> ts.write([:seki, :age, 20]) => #<Rinda::TupleEntry:...> >> TupleSpace >> ts.take([:seki, :age, nil]) => [:seki, :age, 20] >> :seki :age 20
  • 27. >> ts.take([:seki, :age, nil]) TupleSpace
  • 28. >> ts.take([:seki, :age, nil]) >> ts.write([:seki, :age, 20]) TupleSpace => #<Rinda::TupleEntry:...> >> :seki :age 20
  • 29. >> ts.take([:seki, :age, nil]) >> ts.write([:seki, :age, 20]) TupleSpace => #<Rinda::TupleEntry:...> >> => [:seki, :age, 20] >> :seki :age 20
  • 30. toRuby
  • 31. Rinda MapReduce
  • 32. [String, Integer] map reduce
  • 33. while line = gets line.scan(/w+/) do |w| ts.write([w, 1]) end end
  • 34. word = ts.read_all.sort_by {|t| t[0]}.first[0] ‥ O(n)
  • 35. ary = ts.read_all([word, nil])
  • 36. ts.read_all.sort_by {|t| t[0]}.first !! O(n)
  • 37. hash.keys.sort keys.sort key hash key
  • 38. Hash TupleSpace key key key read_all, keys
  • 39. reduce Linda
  • 40. RDB
  • 41. Ruby Hash
  • 42. Hash key-values key key
  • 43. key
  • 44. ID
  • 45. [ , ID ]
  • 46. http://chalow.net/2008-01-18-1.html [ ]
  • 47. and, or
  • 48. ID
  • 49. [[ , ID], nil] key value key
  • 50. BigTable Tokyo Cabinet RBTree
  • 51. QDBM B+ key String C
  • 52. sqlite→QDBM→Tokyo Cabinet OODB Ruby key, value key value
  • 53. # memory [“m.#{oid}”, class.to_s] # property [“p.#{oid}@#{name}”, Marshal.dump([klass, value])] key
  • 54. OODB dRuby OODB Koya
  • 55. Ruby transaction
  • 56. RB (≠Ruby ) Key Ruby Object - MultiRBTree Ruby
  • 57. dRuby in-memory + logging memcached ( )
  • 58. dRuby dRuby
  • 59. FUD
  • 60. !!!
  • 61. CVS ! add/delete add/delete commit
  • 62. akr Ruby/CVS add/delete
  • 63. ,v
  • 64. [[word, doc_id, rev_id, mode, lineno], nil] , ID, revision ID, add|del|log,
  • 65. Tokyo Cabinet BDD WEBrick::CGI 4 cgi
  • 66. 10
  • 67. > Google
  • 68. 3360 dRuby • Web • Pragmatic Bookshelf •
  • 69. RubyKaigi2009 COBOL

×