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
Concurrency for distributed Web crawlers
Search
Takumi Sueda
March 01, 2017
Technology
2
3.4k
Concurrency for distributed Web crawlers
golang.tokyo #4 @ eureka, Inc.
Takumi Sueda
March 01, 2017
Tweet
Share
More Decks by Takumi Sueda
See All by Takumi Sueda
組み込みLinuxの時系列
puhitaku
4
1.1k
電子辞書にステータスバーを実装する
puhitaku
0
190
知育おもちゃの遊び方 Lv. 999
puhitaku
5
2.8k
ルーターでプレゼンする
puhitaku
1
4.8k
AST as Black Magic
puhitaku
0
110
次世代の足下を舗装するコミュニティ
puhitaku
5
1.7k
電子辞書で学ぶ Linux のサスペンド
puhitaku
0
600
USB PD で迎える AC アダプター大統一時代
puhitaku
2
2.5k
電子辞書のアイデンティティを消す方法
puhitaku
3
3.9k
Other Decks in Technology
See All in Technology
強いチームと開発生産性
onk
PRO
25
8.5k
製造現場のデジタル化における課題とPLC Data to Cloudによる新しいアプローチ
hamadakoji
0
230
SREの組織類型に応じた リーダシップの考察
kenta_hi
PRO
1
640
Shopifyアプリ開発における Shopifyの機能活用
sonatard
4
210
Lambdaと地方とコミュニティ
miu_crescent
2
310
スクラムチームを立ち上げる〜チーム開発で得られたもの・得られなかったもの〜
ohnoeight
2
320
AWS⼊社という選択肢、⾒えていますか
iwamot
2
1.1k
データの信頼性を支える仕組みと技術
chanyou0311
6
1.7k
AIチャットボット開発への生成AI活用
ryomrt
0
150
マイベストのデータ基盤の現在と未来 / mybest-data-infra-asis-tobe
mybestinc
2
2k
社内で最大の技術的負債のリファクタリングに取り組んだお話し
kidooonn
1
490
TypeScriptの次なる大進化なるか!? 条件型を返り値とする関数の型推論
uhyo
1
650
Featured
See All Featured
[RailsConf 2023] Rails as a piece of cake
palkan
51
4.9k
Visualization
eitanlees
145
15k
Designing on Purpose - Digital PM Summit 2013
jponch
115
7k
The Cult of Friendly URLs
andyhume
78
6k
We Have a Design System, Now What?
morganepeng
50
7.2k
Adopting Sorbet at Scale
ufuk
73
9.1k
Gamification - CAS2011
davidbonilla
80
5k
Building Better People: How to give real-time feedback that sticks.
wjessup
364
19k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
109
49k
A designer walks into a library…
pauljervisheath
202
24k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
27
4.2k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
6
400
Transcript
$PODVSSFODZGPSEJTUSJCVUFE8FCDSBXMFST HPMBOHUPLZP!FVSFLB *OD 5BLVNJ4VFEB
)J 5BLVNJ4VFEB !QVIJUBLV 'VMMFS *OD (PMBOH1ZUIPO$ 4PMEFSJOHFNCFEEFETZTUFN 8SJUJOH(PMBOHTJODF4FQUFNCFS
5PEBZˏTUPQJD JOUFSNTPGDPODVSSFODZ (PQIFS DSFBUFECZ3FOFF'SFODI $$#: GPS8FCDSBXMFST
5PEBZˏTUPQJD 8FCDSBXMFSGPSXIBU
5PEBZˏTUPQJD
5PEBZˏTUPQJD ˖ #SJFGFYQMBOBUJPOPGUIFDSBXMFSTZTUFN ˖ )PXXFVTF(PSPVUJOFBOE$IBOOFM $SBXMNJMMJPOBQQTFWFSZEBZ $POUJOVPVTDPOWFSTBUJPOPO4MBDL ˖
1JUGBMMBOETPMVUJPO
5PEBZˏTUPQJD ˖ #SJFGFYQMBOBUJPOPGUIFDSBXMFSTZTUFN ˖ )PXXFVTF(PSPVUJOFBOE$IBOOFM $SBXMNJMMJPOBQQTFWFSZEBZ $POUJOVPVTDPOWFSTBUJPOPO4MBDL ˖
1JUGBMMBOETPMVUJPO
$IBSBDUFSJTUJDTPGDSBXMUBSHFU ˖ 4JOHMFEPNBJO /PUUPNBLF)551(&5PPEPSZPVˏMM CFCBOOFEGSPNBDDFTT ˖ .BOZ L UBSHFUBQQT ˖
7BSJBCMFDPOUFOUTˏTJ[F *ODMVEJOHJNBHFTEPXOMPBEUJNF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