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
seki at druby.org
June 29, 2019
Programming
0
410
Tochigi Ruby Kaigi 08 Keynote
分散オブジェクトとはアレですか?
seki at druby.org
June 29, 2019
Tweet
Share
More Decks by seki at druby.org
See All by seki at druby.org
ERB, ancient and future
m_seki
3
750
ERB Hacks
m_seki
1
1.3k
わりこまれるはなし
m_seki
0
680
ぼくのかんがえたさいきょうのけいやくによるプログラミング
m_seki
1
980
Learn Ractor
m_seki
1
2.4k
How many copies did you buy the first print?
m_seki
1
650
Create my own search engine.
m_seki
1
5.2k
Rinda in the real-world embedded systems.
m_seki
0
390
xpjug2019 A-4: チケットシステムの設計と実装、『あのチーム』の運用
m_seki
6
6.4k
Other Decks in Programming
See All in Programming
シェーダーで魅せるMapLibreの動的ラスタータイル
satoshi7190
1
480
Snowflake x dbtで作るセキュアでアジャイルなデータ基盤
tsoshiro
2
520
Amazon Qを使ってIaCを触ろう!
maruto
0
400
2024/11/8 関西Kaggler会 2024 #3 / Kaggle Kernel で Gemma 2 × vLLM を動かす。
kohecchi
5
910
LLM生成文章の精度評価自動化とプロンプトチューニングの効率化について
layerx
PRO
2
190
광고 소재 심사 과정에 AI를 도입하여 광고 서비스 생산성 향상시키기
kakao
PRO
0
170
『ドメイン駆動設計をはじめよう』のモデリングアプローチ
masuda220
PRO
8
530
카카오페이는 어떻게 수천만 결제를 처리할까? 우아한 결제 분산락 노하우
kakao
PRO
0
110
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
0
110
Less waste, more joy, and a lot more green: How Quarkus makes Java better
hollycummins
0
100
タクシーアプリ『GO』のリアルタイムデータ分析基盤における機械学習サービスの活用
mot_techtalk
4
1.4k
.NET のための通信フレームワーク MagicOnion 入門 / Introduction to MagicOnion
mayuki
1
1.4k
Featured
See All Featured
The Cult of Friendly URLs
andyhume
78
6k
Faster Mobile Websites
deanohume
305
30k
[RailsConf 2023] Rails as a piece of cake
palkan
52
4.9k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
42
9.2k
Building Better People: How to give real-time feedback that sticks.
wjessup
364
19k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Raft: Consensus for Rubyists
vanstee
136
6.6k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
16
2.1k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.8k
Documentation Writing (for coders)
carmenintech
65
4.4k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.1k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
6.8k
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