Tochigi Ruby Kaigi 08 Keynote

Tochigi Ruby Kaigi 08 Keynote

分散オブジェクトとはアレですか?

40f4d1f2e77078955bd01e9fb4a503ba?s=128

seki at druby.org

June 29, 2019
Tweet

Transcript

  1. 分散オブジェクトとは アレですか? SSID: toruby pass: toruby08 Tochigi RubyKaigi 08 Masatoshi

    SEKI / @m_seki
  2. http://www.druby.org/drb20_tork08.pdf ֎ʹग़Εͳ͍࣮श༻ͷωοτϫʔΫ SSID: toruby pass: toruby08 SSID: toruby pass: toruby08

  3. Agenda 頃 Workshop SSID: toruby pass: toruby08

  4. ࡞Γͳ͕Βߟ͑Δͷ͕޷͖ dRuby SSID: toruby pass: toruby08

  5. OOPͷϑΝϯλδʔ SSID: toruby pass: toruby08

  6. ෼ࢄOOPͷϑΝϯλδʔ SSID: toruby pass: toruby08

  7. dRubyͰ࡞ͬͨ΋ͷ SSID: toruby pass: toruby08

  8. ઌ૆ฦΓ OOP SSID: toruby pass: toruby08

  9. Ͱ͖͔ͯΒߟ͑ͨ͜ͱ SSID: toruby pass: toruby08

  10. ϓϩηεΛ෼͚Δҙຯ SSID: toruby pass: toruby08

  11. dRuby 20th anniversary hands-on workshop @m_seki / seki@ruby-lang.org

  12. ॏཁ 2005 ! SSID: toruby pass: toruby08 dRuby ʹΑΔ ؔকढ़ஶ

    ෼ࢄ ɾ Web ϓϩάϥϛϯά
  13. The dRuby Book 2012 Out of print SSID: toruby pass:

    toruby08
  14. HTML൛ެ։த http://www.druby.org/sidruby/ SSID: toruby pass: toruby08

  15. Rubyͱࢲ 1999 ERB, dRuby, .... 2000 Perl/RubyConference SSID: toruby pass:

    toruby08
  16. ERB Ruby SSID: toruby pass: toruby08

  17. dRuby SSID: toruby pass: toruby08

  18. ࠓ೔͸ dRuby 頃 SSID: toruby pass: toruby08

  19. ࠓ೔͸ SSID: toruby pass: toruby08

  20. RMI Remote Method Invocation SSID: toruby pass: toruby08

  21. αʔό Web SSID: toruby pass: toruby08

  22. dRuby͸ SSID: toruby pass: toruby08

  23. Ruby෩ Web dRuby Ruby Ruby SSID: toruby pass: toruby08

  24. ԋश1 Hello, World. SSID: toruby pass: toruby08

  25. ԋश1 SSID: toruby pass: toruby08 hello_server.rb hello_client.rb hello() "Hello, World."

  26. hello_server.rb require 'drb/drb' class Hello def hello puts('Hello, World.') end

    end DRb.start_service('druby://localhost:54000', Hello.new) while true sleep 1 end
  27. require require 'drb/drb' class Hello def hello puts('Hello, World.') end

    end DRb.start_service('druby://localhost:54000', Hello.new) sleep
  28. DRb.start_service require 'drb/drb' class Hello def hello puts('Hello, World.') end

    end DRb.start_service('druby://localhost:54000', Hello.new) sleep
  29. URI require 'drb/drb' class Hello def hello puts('Hello, World.') end

    end DRb.start_service('druby://localhost:54000', Hello.new) sleep
  30. ऴྃͤ͞ͳ͍ require 'drb/drb' class Hello def hello puts('Hello, World.') end

    end DRb.start_service('druby://localhost:54000', Hello.new) sleep
  31. ໿ଋࣄ require 'drb/drb' DRb.start_service URI SSID: toruby pass: toruby08

  32. hello_client.rb require 'drb/drb' DRb.start_service ro = DRbObject.new_with_uri('druby://localhost:54000') ro.hello

  33. hello_client.rb require 'drb/drb' DRb.start_service ro = DRbObject.new_with_uri('druby://localhost:54000') ro.hello

  34. hello_client.rb require 'drb/drb' DRb.start_service ro = DRbObject.new_with_uri('druby://localhost:54000') ro.hello

  35. hello_client.rb require 'drb/drb' DRb.start_service ro = DRbObject.new_with_uri('druby://localhost:54000') ro.hello

  36. ໿ଋࣄ require 'drb/drb' DRb.start_service DRbObject.new_with_uri SSID: toruby pass: toruby08

  37. ݩ͸͜Ε class Hello def hello puts('Hello, World.') end end ro

    = Hello.new ro.hello
  38. require 'drb/drb' DRb.start_service ro = DRbObject.new_with_uri('druby://localhost:54000') ro.hello require 'drb/drb' class

    Hello def hello puts('Hello, World.') end end DRb.start_service('druby://localhost:54000', Hello.new) sleep
  39. ԋश1 hello_client.rb hello_server.rb hello_client.rb SSID: toruby pass: toruby08

  40. ԋश2 (Hash) SSID: toruby pass: toruby08

  41. Hash ( ) Array ( ) SSID: toruby pass: toruby08

  42. hash_server.rb require 'drb/drb' require 'pp' front = Hash.new DRb.start_service('druby://localhost:54300', front)

    while true sleep 10 pp front end
  43. ԋश2 SSID: toruby pass: toruby08 hash_server.rb irb irb

  44. ԋश2 "String" 2012 Time.now $stdout SSID: toruby pass: toruby08

  45. CGIͷྫ SSID: toruby pass: toruby08 CGI Web App CGI CGI

    CGI long lifetime short lifetime
  46. WEBrickʹΑΔΞϓϦ WEBrick HTTP CGI SSID: toruby pass: toruby08

  47. WEBrick::CGI require 'webrick/cgi' class MyCGI < WEBrick::CGI def do_GET(req, res)

    res["content-type"] = "text/plain" ret = "hoge\n" res.body = ret end end MyCGI.new.start()
  48. start WEBrick::CGI#start(env = ENV, stdin = $stdin, stdout = $stdout)

  49. startϝιου $stdin, $stdout SSID: toruby pass: toruby08

  50. m_seki's cgi require 'drb/drb' DRb.start_service('druby://localhost:0') ro = DRbObject.new_with_uri('druby://localhost:50830') ro.start(ENV.to_hash, $stdin,

    $stdout)
  51. startͷΑ͏͢ SSID: toruby pass: toruby08 CGI Web App $stdin.read $stdout.write

    start(env, $stdin, $stdout)
  52. Δͼ·40߸ SSID: toruby pass: toruby08

  53. ԋश6 Shi-ri-to-ri SSID: toruby pass: toruby08

  54. ·ͱΊ dRuby SSID: toruby pass: toruby08

  55. ;Γ͔͑Γ SSID: toruby pass: toruby08