Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
竝行
Search
さっちゃん
September 14, 2017
Programming
0
230
竝行
Rubyと竝行
concurrent/pararell
さっちゃん
September 14, 2017
Tweet
Share
More Decks by さっちゃん
See All by さっちゃん
みんなのオブザーバビリティプラットフォームを作ってるんだがパフォーマンスがやばい #mackerelio #srenext
ne_sachirou
0
1.6k
作ってよかったgraceful shutdownライブラリ #kyotogo
ne_sachirou
0
1.3k
path 依存型って何?
ne_sachirou
0
720
野生の onbording と onbording 設計 #kyototechtalk
ne_sachirou
0
660
メトリックはいかにして見え續ける樣になったか #devio2022
ne_sachirou
0
110
名實一致
ne_sachirou
0
700
まかれるあなとみあ ―Mackerel のしくみを理解する 30 分― @ Hatena Engineer Seminar #16
ne_sachirou
0
3.2k
tacit programming : Point-free, Concatenatives & J
ne_sachirou
0
1.1k
Monitoring Containerized Elixir
ne_sachirou
1
1k
Other Decks in Programming
See All in Programming
Tinkerbellから学ぶ、Podで DHCPをリッスンする手法
tomokon
0
120
AIコーディングエージェント(skywork)
kondai24
0
150
まだ間に合う!Claude Code元年をふりかえる
nogu66
5
690
Cap'n Webについて
yusukebe
0
130
手が足りない!兼業データエンジニアに必要だったアーキテクチャと立ち回り
zinkosuke
0
600
新卒エンジニアのプルリクエスト with AI駆動
fukunaga2025
0
200
dotfiles 式年遷宮 令和最新版
masawada
1
740
チームをチームにするEM
hitode909
0
300
「コードは上から下へ読むのが一番」と思った時に、思い出してほしい話
panda728
PRO
38
25k
MAP, Jigsaw, Code Golf 振り返り会 by 関東Kaggler会|Jigsaw 15th Solution
hasibirok0
0
230
なあ兄弟、 余白の意味を考えてから UI実装してくれ!
ktcryomm
11
11k
ローターアクトEクラブ アメリカンナイト:川端 柚菜 氏(Japan O.K. ローターアクトEクラブ 会長):2720 Japan O.K. ロータリーEクラブ2025年12月1日卓話
2720japanoke
0
720
Featured
See All Featured
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
48
9.8k
[SF Ruby Conf 2025] Rails X
palkan
0
500
Become a Pro
speakerdeck
PRO
31
5.7k
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
390
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
1.6k
Optimizing for Happiness
mojombo
379
70k
A Modern Web Designer's Workflow
chriscoyier
698
190k
Balancing Empowerment & Direction
lara
5
790
jQuery: Nuts, Bolts and Bling
dougneiner
65
8.2k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
54k
How to Ace a Technical Interview
jacobian
280
24k
Navigating Team Friction
lara
191
16k
Transcript
竝⾏ Pararell
.。oO(さっちゃんですよヾ(〃l _ l)ノ゙☆)
https://hex.pm/packages/holiday_jp https://hex.pm/packages/pqueue2 https://hex.pm/packages/stream_gzip https://hex.pm/packages/stream_hash
竝⾏ Pararell
Node.js is concurrent. Crystal is concurrent. Concurrent
Node.js is concurrent. Crystal is concurrent. Also Ruby is concurrent.
Concurrent
Thread thread1 = Thread.new { } thread2 = Thread.new {
} [thread1, thread2].each &:join Concurrent
Concurrent Ruby https://github.com/ruby-concurrency/concurrent-ruby future = Concurrent::Future.execute { } while future.pending?
sleep 0.1 end future.value Concurrent
Concurrent Ruby https://github.com/ruby-concurrency/concurrent-ruby Concurrent::Promise.execute { }.then { } Concurrent
Concurrent Ruby https://github.com/ruby-concurrency/concurrent-ruby class Echo include Concurrent::Async def echo(msg) print
"#{msg}\n” end End horn = Echo.new horn.async.echo 'oneʼ horn.await.echo 'two' Concurrent
EventMachine https://github.com/eventmachine/eventmachine/ EM::run do client = MyApp.new give_tick = proc
do Gtk::main_iteration_do false EM.next_tick give_tick end give_tick.call end Concurrent
nio4r https://github.com/socketry/nio4r selector = NIO::Selector.new loop do selector.select do |monitor|
end end Concurrent
Crystal https://crystal-lang.org/ ch = Channel(Int).new spawn do ch.send 42 end
value = ch.receive Concurrent
Concurrent ? Pararell ?
Concurrent 竝列 Concurrent Task Task Task
Pararell 竝⾏ Pararell Task Task Task
Go is pararell. Pararell
Go https://golang.org/ ch := make(chan string) go f(“some”, ch) <-
ch Pararell
Go is pararell. Pararell
Go is pararell. Ruby is _ Pararell
pararell https://github.com/grosser/parallel Pararell.map([]) { } Pararell.each([]) { } Pararell.any?([]) {
} Pararell.all?([]) { } Pararell
pararell Inside pararell: Pararell
pararell Inside pararell: Process.fork { } Pararell
pararell Inside pararell: Process.fork { } Pararell
Use Elixir Pararell
Use Elixir Pararell Pararell
Use Elixir Pararell Fault tolerant Pararell
Use Elixir Pararell Fault tolerant Soft realtime Pararell