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
はてなブログチームでの働き方
Search
YaaMaa
December 23, 2020
Programming
0
1.4k
はてなブログチームでの働き方
YaaMaa
December 23, 2020
Tweet
Share
Other Decks in Programming
See All in Programming
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
1
100
Amazon Bedrock Agentsを用いてアプリ開発してみた!
har1101
0
340
OSSで起業してもうすぐ10年 / Open Source Conference 2024 Shimane
furukawayasuto
0
110
What’s New in Compose Multiplatform - A Live Tour (droidcon London 2024)
zsmb
1
480
NSOutlineView何もわからん:( 前編 / I Don't Understand About NSOutlineView :( Pt. 1
usagimaru
0
340
ヤプリ新卒SREの オンボーディング
masaki12
0
130
2024/11/8 関西Kaggler会 2024 #3 / Kaggle Kernel で Gemma 2 × vLLM を動かす。
kohecchi
5
940
Duckdb-Wasmでローカルダッシュボードを作ってみた
nkforwork
0
130
タクシーアプリ『GO』のリアルタイムデータ分析基盤における機械学習サービスの活用
mot_techtalk
4
1.5k
Creating a Free Video Ad Network on the Edge
mizoguchicoji
0
120
Make Impossible States Impossibleを 意識してReactのPropsを設計しよう
ikumatadokoro
0
240
みんなでプロポーザルを書いてみた
yuriko1211
0
280
Featured
See All Featured
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.9k
Thoughts on Productivity
jonyablonski
67
4.3k
Agile that works and the tools we love
rasmusluckow
327
21k
Site-Speed That Sticks
csswizardry
0
28
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.3k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
364
24k
YesSQL, Process and Tooling at Scale
rocio
169
14k
GraphQLの誤解/rethinking-graphql
sonatard
67
10k
For a Future-Friendly Web
brad_frost
175
9.4k
Side Projects
sachag
452
42k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
42
9.2k
Product Roadmaps are Hard
iamctodd
PRO
49
11k
Transcript
ͯͳϒϩάνʔϜͰͷ ಇ͖ํ )BUFOB&OHJOFFS4FNJOBS JE:BB.BB
ࣗݾհ JE:BB.BB ৽ଔ ͯͳϒϩάνʔϜ ओʹݸਓϢʔβʔ͚ͷ։ൃΛ͍ͯ͠·͢
ࣄͰ͏ͷ 1FSM ϒϩάຊମͷαʔόʔαΠυ (P ϒϩάपลαʔϏεʢͯͳϒϩάλάͳͲʣͷαʔόʔαΠυ +BWB4DSJQU 5ZQF4DSJQU ओʹϑϩϯτΤϯυ
͢͜ͱ ೖࣾͯͬͨ͠தͰҰ൪େมͩͬͨλεΫʹ͍ͭͯ ɾͲ͏ͬͯਐΊ͍͔ͯͬͨ ɾͲ͏͍͏͕͔͋ͬͨ͠͞ ɾࣦഊͨ͜͠ͱͳͲ
λεΫͷ༰ ϒϩάهࣄʹషΓ͚ΒΕͨը૾ͷதͰɺ (PPHMFϑΥτ͔ΒషΓ͚ΒΕͨը૾͕ ӾཡͰ͖ͳ͘ͳͬͯ͠·ͬͨͷͰɺ ͦΕΒΛͯͳϑΥτϥΠϑʹҠߦ͢Δ (PPHMFϑΥτ(PPHMFͷը૾ϗεςΟϯάαʔϏε ͯͳϑΥτϥΠϑͯͳ͕։ൃ͍ͯ͠Δը૾ϗεςΟϯάαʔϏε
λεΫͷ༰ <p>ཱྀߦʹߦͬͨͱ͖ͷࣸਅͰ͢ɻ</p> <img src=“https://hosted-image/0000.jpg”> ϑΥτϥΠϑ 63-ͷ ϑΝΠϧ໊Λ खֻ͔Γʹ ը૾Λ୳͢ ϑΥτϥΠϑͷ
63-ʹॻ͖͑ (PPHMFϑΥτ औಘͨ͠ը૾σʔλΛ Ξοϓϩʔυ
ܭը
ܭը Ҡߦͷඞཁ͕͋Δը૾63-Λચ͍ग़͢ ը૾σʔλΛ63-͔ΒऔಘͰ͖Δͷͱ Ͱ͖ͳ͍ͷʹબผ औಘͰ͖Δ Ͱ͖ͳ͍ Ϣʔβʔʹ(PPHMFೝূͯ͠Βͬͯɺ (PPHMFϑΥτͷ"1*Λͬͯ
ը૾Λ୳ͯ͠औಘ
ܭը औಘͨ͠ը૾σʔλΛ ϢʔβʔͷϑΥτϥΠϑʹΞοϓϩʔυ هࣄͷը૾63-Λ ϑΥτϥΠϑͰͷ63-ʹஔ͖͍͑ͯ͘
ܭը ը૾ͷใΛೖΕΔ%#ςʔϒϧ܈ͷઃܭ id original_url ⋯ status xxxxxx https://… ⋯ initial
id image_id entry_id exists xxxxxx xxxxxx xxxxxx TRUE id image_id s3_url xxxxxx xxxxxx https://… ը૾ هࣄͱը૾ͷ Ϛοϐϯά (PPHMFϑΥτͷ "1*͔Βऔಘͨ͠ը૾
ܭը ܭըΛཱͯͨΒҰ୴ϨϏϡʔͯ͠Β͏ ɾσΟϨΫλʔ ϢʔβʔʹͲΕ͘Β͍ͷखؒΛ͔͚ͤͯ͞͠·͏͔ͳͲ૬ஊ ɾϝϯλʔΤϯδχΞ ٕज़తͳ෦ͷيಓमਖ਼ ے͕ѱ͍͜ͱɾඇޮͳ͜ͱΛ͠Α͏ͱ͍ͯ͠ͳ͍͔
ଞ৬छͱͷ࿈ܞ ϢʔβʔೝূͷҊը໘ σβΠφʔͱ૬ஊ͠ͳ͕ΒڞಉͰը໘Λ࡞͍ͬͯ͘ɻ Ͳ͜ʹ௨Λஔ͔͘ͱ͔͠߹͏ɻ ࠂɾϔϧϓϖʔδ ༷ૢ࡞ํ๏Λ·ͱΊ͔ͯΒɺฤूͷํʹݪߘΛ͓ئ͍͢Δɻ ٬؍తͳࢹͰΘ͔ΓͮΒ͍ͱ͜ΖΛิͯ͠Β͏ɻ
՝ͱରॲ
ϑϩʔ͕ෳࡶ ॳظঢ়ଶ 63-͔Β ը૾औಘޭ 63-͔Β ը૾औಘࣦഊ Ϣʔβʔͷ (PPHMFೝূ "1*Ͱ ը૾Λ୳͠த
ը૾Λ୳͢ͷʹ ࣦഊ ީิ͕ू·ͬͨ ީิ͔Β ߜΓࠐΊͳ͍ ީิ͔Β ҰͭʹಛఆͰ͖ͨ ϑΥτϥΠϑʹ Ξοϓϩʔυத Ξοϓϩʔυ ࣦഊ Ξοϓϩʔυ ྃ هࣄͷॻ͖͑ ྃ هࣄͷॻ͖͑ ࣦഊ ঢ়ଶΛચ͍ग़͢ͷ͕େม
ϑϩʔ͕ෳࡶ ͦΕͰߟྀෆͩͬͨ ɾҠߦ͍ͯ͠Δ్தʹϢʔβʔ͕ୀձͯ͠͠·ͬͨΒʁ ɾҠߦ͍ͯ͠Δ్தʹϢʔβʔ͕ࣗͰҠߦରͷը૾Λॻ͖͑ͨΒʁ ɾϢʔβʔ͕ೝূ͢Δ(PPHMFΞΧϯτΛؒҧ͍͑ͯͯɺ ผͷΞΧϯτͰೝূ͔ͨͬͨ͠͠Βʁ
ϑϩʔͷߟྀෆͷରԠ Ϣʔβʔͷ (PPHMFೝূ "1*Ͱ ը૾Λ୳͠த ը૾Λ୳͢ͷʹ ࣦഊ ީิ͕ू·ͬͨ ީิ͔Β ߜΓࠐΊͳ͍
ෳճϢʔβʔೝূ Ͱ͖ΔΑ͏ʹ ީิ͔Β ҰͭʹಛఆͰ͖ͨ ϑϩʔΛՃ هࣄฤूͷλΠϛϯάͰɺ (PPHMFϑΥτ͔ΒషΓ͚ΒΕͨը૾͕͍ͬͯΔ͔ΛνΣοΫ͢Δ ॲཧΛՃ
ίʔυϨϏϡʔͯ͠Β͏ͷ͕େม ͳΔ͘ϨϏϡʔ͍͢͠Α͏ʹ13Λখ͚ʹ͢Δ͚Ͳɺ ͦ͏͢Δͱݸʑͷ13ͷతҐஔ͚͕Θ͔ΓͮΒ͍ ࡉΕͷ13ͷ༷ࢠ
ίʔυϨϏϡʔͯ͠Β͏ͷ͕େม ϨϏϡϫʔϥϯυϩϏϯͰܾ·ΔͷͰɺ 13ͷܦҢจ຺Βͳ͍
ίʔυϨϏϡʔͯ͠Β͏ͷ͕େม ɾը૾Ͳ͏͍͏ঢ়ଶΛͱΓ͏Δͷ͔ ɾ͜ͷ13ͰͲͷঢ়ଶͷը૾ΛͲͷঢ়ଶʹ͍͖͍࣋ͬͯͨͷ͔ ɾͦΕશମͷఔͷͲͷ͋ͨΓʹҐஔ͢Δͷ͔ Λຖճઆ໌
ྔ͕ଟ͍ ը૾ͷ͕ͻͨ͢Βଟͯ͘ɺ શͯͷॲཧʹ͕͔͔࣌ؒΔ
ྔ͕ଟ͍ ϒϩάຊମͷδϣϒΩϡʔϫʔΧʔͷ ෛ୲Λߟ͑ͣʹɺಠཱͯ͠Ұؾʹ࣮ߦͰ͖Δ ॳظঢ়ଶ 63-͔Β ը૾औಘޭ 63-͔Β ը૾औಘࣦഊ Ϣʔβʔͷ (PPHMFೝূ
"1*Ͱ ը૾Λ୳͠த ը૾Λ୳͢ͷʹ ࣦഊ ީิ͕ू·ͬͨ ީิ͔Β ߜΓࠐΊͳ͍ ީิ͔Β ҰͭʹಛఆͰ͖ͨ ϑΥτϥΠϑʹ Ξοϓϩʔυத Ξοϓϩʔυ ࣦഊ Ξοϓϩʔυ ྃ هࣄͷॻ͖͑ ྃ هࣄͷॻ͖͑ ࣦഊ ϢʔβʔೝূҎલͷॲཧ Ұؾʹͬͯ͠·͑Δ &$4ͰཱͯͨίϯςφΛͬͯߦͬͨ
ྔ͕ଟ͍ (PPHMFϑΥτͷ"1*Λݺͼग़͢ճ͕ଟ͘ͳΔ ը૾σʔλΛ୳ͨ͢Ίͷ"1*ίʔϧ Ϣʔβʔͷʹൺྫͯ͠ଟ͘ͳΔͷͰɺ ͷ੍ݶճʹ͙ͨͬͯ͢͠·͏ɻ ॳظঢ়ଶ 63-͔Β ը૾औಘޭ 63-͔Β ը૾औಘࣦഊ
Ϣʔβʔͷ (PPHMFೝূ "1*Ͱ ը૾Λ୳͠த ը૾Λ୳͢ͷʹ ࣦഊ ީิ͕ू·ͬͨ ީิ͔Β ߜΓࠐΊͳ͍ ީิ͔Β ҰͭʹಛఆͰ͖ͨ ϑΥτϥΠϑʹ Ξοϓϩʔυத Ξοϓϩʔυ ࣦഊ Ξοϓϩʔυ ྃ هࣄͷॻ͖͑ ྃ هࣄͷॻ͖͑ ࣦഊ ͜͜
ྔ͕ଟ͍ ɾ"1*ݺͼग़͠ճ੍ݶͷ؇Λਃ ɾຖ্ݶʹͨΔ·Ͱݺͼग़ͯ͠ɺ ্ݶʹͨͬͨΒΓ࣍ͷҎ߱ʹճ͢
ਐḿ֬ೝ ์ஔ͍ͯͨ͠Βগͣͭ͠ॲཧ͕ਐΜͰ͍͘λΠϓͷ λεΫͳͷͰɺਐḿ֬ೝ͕େม SELECT COUNT(*) FROM image WHERE status =
‘…’; ͋ΔظؒͰͷਪҠΛάϥϑͰݟ͍ͨ .BDLFSFMͷग़൪ ͦΕͧΕͷঢ়ଶͷը૾͕ͲΕ͘Β͍͋Δͷ͔֬ೝ͍͚ͨ͠Ͳɺ ຖճ͜Μͳ͜ͱˣͨ͘͠ͳ͍
ͯͳͷαʔόʔࢹαʔϏε ه͍ͨ͠ΛαʔϏεϝτϦοΫ ͱͯ͠ఆظతʹ.BDLFSFMʹ ϙετ͢Δ ࠓճͳΒɺͦΕͧΕͷঢ়ଶͷ ը૾ͷຕ উखʹάϥϑԽͯ͘͠ΕΔ ਐḿ֬ೝ
.BDLFSFMͰμογϡϘʔυΛ࡞ͬͯຬ͍͚ͯͨ͠ΕͲʜ ผͷλεΫΛ͍ͬͯͨΒͪ͜Βͷॲཧ͕ ࢭ·ͬͯ͠·͍ͬͯͨ ࢭ·͍ͬͯΔͷʹ ؾ͚ͮΔΈ͕ඞཁ ਐḿ֬ೝ
.BDLFSFMͷʮࣜʹΑΔࢹʯ͕͑Δ UJNF4IJGU EJ⒎ ͳͲͷؔΛͬͯ ҰఆظؒͰͲΕ͘Β͍ਐΜ͔ͩΛԽ ͦΕ͕ҰఆҎԼʹͳͬͨΒΞϥʔτΛग़͢ ਐḿ֬ೝ diff( timeShift( ◦◦,
7d ), ◦◦ ) ࣜࢹͷྫ
ࣦഊͨ͜͠ͱ
ࣦഊͨ͜͠ͱ ݟੵΓ (PPHMFϑΥτͷ"1*ʹ͝ͱʹճ੍ݶ͕͋Δ ͦΕΛ͘ݟ͍ͯͨͷͰݟੵΓݟҧ͍ʹͳͬͯ͠·ͬͨ
ࣦഊͨ͜͠ͱ δϣϒೖ͗͢͠ δϣϒΩϡʔ DSPOδϣϒ ϒϩάͷ ΞϓϦέʔγϣϯ ϫʔΧʔ ϫʔΧʔ ϫʔΧʔ ͍Ζ͍Ζͳछྨͷ
δϣϒ͕ू·Δ ͜͜
ࣦഊͨ͜͠ͱ δϣϒೖ͗͢͠ δϣϒΩϡʔ͕ͲΕ͘Β͍Ͱࡹ͚Δ͔͋·ΓΘ͔ͬͯͳͯ͘ δϣϒΛೖΕ͗͢Δ ϒϩάͷଞͷδϣϒʹӨڹ ɾ༧ߘ ɾهࣄߘޙͷॲཧɹɹͳͲ
ࣦഊͨ͜͠ͱ use constant { JOB_COUNT = 20 }; σϓϩΠ͠ͳ͍ͱมߋͰ͖ͳ͍ ཧը໘ͱ͔Ͱαοͱ
มߋͰ͖ΔΑ͏ʹ͢Δ ճʹೖΕΔδϣϒͷ ద༻ ࡹ͚۩߹ʹΑͬͯௐͰ͖Δ
ֶΜͩ͜ͱ
ෳࡶͳλεΫ͔ͩΒͦ͜આ໌ஸೡʹ ϨϏϡϫʔʹ13ͷతҐஔ͚͕ͮͪΌΜͱΘΔͱɺ ߟྀ࿙ΕͷࢦఠɺΑΓΑ͍ํ๏ͷఏҊ Λͯ͠Β͑Δ͜ͱ͕͋Δ
ͯͳϒϩάͰѻ͏σʔλͷେ͖͞Λ࣮ײ ԿΛ͢Δʹ͕͔͔ͯ࣌ؒ͠ΔͷͰɺ ಠཱͯ͠ฒߦॲཧͰ͖Δ෦͢Δͷ͕େࣄ
طଘͷهࣄΛकΔ͜ͱ͕େ Ϣʔβʔͷࢿ࢈Ͱ͋ΔهࣄΛյ͞ͳ͍Α͏ʹ͢Δͷ͕ ࠷༏ઌ
Ҏ্Ͱ͢