Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Tochigi Ruby Kaigi 08 Keynote
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
seki at druby.org
June 29, 2019
Programming
580
0
Share
Tochigi Ruby Kaigi 08 Keynote
分散オブジェクトとはアレですか?
seki at druby.org
June 29, 2019
More Decks by seki at druby.org
See All by seki at druby.org
Programming with a DJ Controller — not vibe coding
m_seki
3
940
Agile Leadership Summit Keynote 2026
m_seki
1
1.3k
RWC2025 Ninja-testing with smart playlist
m_seki
4
1.3k
XP, Testing and ninja testing ZOZ5
m_seki
3
2.7k
XP, Testing and ninja testing
m_seki
3
1.1k
RWC 2024 DICOM & ISO/IEC 2022
m_seki
0
570
ERB, ancient and future
m_seki
3
1k
ERB Hacks
m_seki
1
1.7k
わりこまれるはなし
m_seki
0
1.1k
Other Decks in Programming
See All in Programming
OCRを使ってゲームのアイテムをデータ化する
kishikawakatsumi
0
110
開発とはなにか、Essenceカーネルで見えるもの
ukin0k0
0
210
Stage 3 Decorators でできること / できないこと / TSKaigi 2026
susisu
1
840
Talking to terminals (and how they talk back) (KotlinConf 2026)
jakewharton
PRO
1
110
cloudnative conference 2026 flyle
azihsoyn
1
210
The Arts and Crafts of Work in the AI Era — Toward Mastery in Software Development
kuranuki
0
330
サークル参加から学ぶ、小さな事業の回し方
yuzneri
0
230
tsserverとは何だったのか、これからどうなるのか
nowaki28
1
380
AI時代になぜ書くのか
mutsumix
0
450
CSC307 Lecture 17
javiergs
PRO
0
230
生成AI時代にこそ効くGo | Why Go Works in the Age of Generative AI
mom0tomo
1
570
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
280
Featured
See All Featured
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
We Are The Robots
honzajavorek
0
230
Building AI with AI
inesmontani
PRO
1
1k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
120
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
3.1k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
230
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.7k
Design in an AI World
tapps
1
220
AI: The stuff that nobody shows you
jnunemaker
PRO
7
660
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
150
ラッコキーワード サービス紹介資料
rakko
1
3.4M
Testing 201, or: Great Expectations
jmmastey
46
8.2k
Transcript
分散オブジェクトとは アレですか? SSID: toruby pass: toruby08 Tochigi RubyKaigi 08 Masatoshi
SEKI / @m_seki
http://www.druby.org/drb20_tork08.pdf ֎ʹग़Εͳ͍࣮श༻ͷωοτϫʔΫ SSID: toruby pass: toruby08 SSID: toruby pass: toruby08
Agenda 頃 Workshop SSID: toruby pass: toruby08
࡞Γͳ͕Βߟ͑Δͷ͕͖ dRuby SSID: toruby pass: toruby08
OOPͷϑΝϯλδʔ SSID: toruby pass: toruby08
ࢄOOPͷϑΝϯλδʔ SSID: toruby pass: toruby08
dRubyͰ࡞ͬͨͷ SSID: toruby pass: toruby08
ઌฦΓ OOP SSID: toruby pass: toruby08
Ͱ͖͔ͯΒߟ͑ͨ͜ͱ SSID: toruby pass: toruby08
ϓϩηεΛ͚Δҙຯ SSID: toruby pass: toruby08
dRuby 20th anniversary hands-on workshop @m_seki /
[email protected]
ॏཁ 2005 ! SSID: toruby pass: toruby08 dRuby ʹΑΔ ؔকढ़ஶ
ࢄ ɾ Web ϓϩάϥϛϯά
The dRuby Book 2012 Out of print SSID: toruby pass:
toruby08
HTML൛ެ։த http://www.druby.org/sidruby/ SSID: toruby pass: toruby08
Rubyͱࢲ 1999 ERB, dRuby, .... 2000 Perl/RubyConference SSID: toruby pass:
toruby08
ERB Ruby SSID: toruby pass: toruby08
dRuby SSID: toruby pass: toruby08
ࠓ dRuby 頃 SSID: toruby pass: toruby08
ࠓ SSID: toruby pass: toruby08
RMI Remote Method Invocation SSID: toruby pass: toruby08
αʔό Web SSID: toruby pass: toruby08
dRuby SSID: toruby pass: toruby08
Ruby෩ Web dRuby Ruby Ruby SSID: toruby pass: toruby08
ԋश1 Hello, World. SSID: toruby pass: toruby08
ԋश1 SSID: toruby pass: toruby08 hello_server.rb hello_client.rb hello() "Hello, World."
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
require require 'drb/drb' class Hello def hello puts('Hello, World.') end
end DRb.start_service('druby://localhost:54000', Hello.new) sleep
DRb.start_service require 'drb/drb' class Hello def hello puts('Hello, World.') end
end DRb.start_service('druby://localhost:54000', Hello.new) sleep
URI require 'drb/drb' class Hello def hello puts('Hello, World.') end
end DRb.start_service('druby://localhost:54000', Hello.new) sleep
ऴྃͤ͞ͳ͍ require 'drb/drb' class Hello def hello puts('Hello, World.') end
end DRb.start_service('druby://localhost:54000', Hello.new) sleep
ଋࣄ require 'drb/drb' DRb.start_service URI SSID: toruby pass: toruby08
hello_client.rb require 'drb/drb' DRb.start_service ro = DRbObject.new_with_uri('druby://localhost:54000') ro.hello
hello_client.rb require 'drb/drb' DRb.start_service ro = DRbObject.new_with_uri('druby://localhost:54000') ro.hello
hello_client.rb require 'drb/drb' DRb.start_service ro = DRbObject.new_with_uri('druby://localhost:54000') ro.hello
hello_client.rb require 'drb/drb' DRb.start_service ro = DRbObject.new_with_uri('druby://localhost:54000') ro.hello
ଋࣄ require 'drb/drb' DRb.start_service DRbObject.new_with_uri SSID: toruby pass: toruby08
ݩ͜Ε class Hello def hello puts('Hello, World.') end end ro
= Hello.new ro.hello
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
ԋश1 hello_client.rb hello_server.rb hello_client.rb SSID: toruby pass: toruby08
ԋश2 (Hash) SSID: toruby pass: toruby08
Hash ( ) Array ( ) SSID: toruby pass: toruby08
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
ԋश2 SSID: toruby pass: toruby08 hash_server.rb irb irb
ԋश2 "String" 2012 Time.now $stdout SSID: toruby pass: toruby08
CGIͷྫ SSID: toruby pass: toruby08 CGI Web App CGI CGI
CGI long lifetime short lifetime
WEBrickʹΑΔΞϓϦ WEBrick HTTP CGI SSID: toruby pass: toruby08
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()
start WEBrick::CGI#start(env = ENV, stdin = $stdin, stdout = $stdout)
startϝιου $stdin, $stdout SSID: toruby pass: toruby08
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)
startͷΑ͏͢ SSID: toruby pass: toruby08 CGI Web App $stdin.read $stdout.write
start(env, $stdin, $stdout)
Δͼ·40߸ SSID: toruby pass: toruby08
ԋश6 Shi-ri-to-ri SSID: toruby pass: toruby08
·ͱΊ dRuby SSID: toruby pass: toruby08
;Γ͔͑Γ SSID: toruby pass: toruby08