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
From Subtype Polymorphism To Typeclass-based Ad hoc Polymorphism- An Example
philipschwarz
PRO
0
170
シールドクラスをはじめよう / Getting Started with Sealed Classes
mackey0225
3
410
Go言語でターミナルフレンドリーなAIコマンド、afaを作った/fukuokago20_afa
monochromegane
2
140
Honoの来た道とこれから
yusukebe
19
3.1k
Java ジェネリクス入門 2024
nagise
0
630
デプロイを任されたので、教わった通りにデプロイしたら障害になった件 ~俺のやらかしを越えてゆけ~
techouse
52
33k
CPython 인터프리터 구조 파헤치기 - PyCon Korea 24
kennethanceyer
0
250
What’s New in Compose Multiplatform - A Live Tour (droidcon London 2024)
zsmb
1
390
Kotlin2でdataクラスの copyメソッドを禁止する/Data class copy function to have the same visibility as constructor
eichisanden
1
150
Modern Angular: Renovation for Your Applications
manfredsteyer
PRO
0
230
Generative AI Use Cases JP (略称:GenU)奮闘記
hideg
0
170
飲食業界向けマルチプロダクトを実現させる開発体制とリアルな現状
hiroya0601
1
400
Featured
See All Featured
Building a Scalable Design System with Sketch
lauravandoore
459
33k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
43
6.6k
GitHub's CSS Performance
jonrohan
1030
460k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
42
9.2k
KATA
mclloyd
29
13k
Navigating Team Friction
lara
183
14k
How To Stay Up To Date on Web Technology
chriscoyier
788
250k
Facilitating Awesome Meetings
lara
49
6.1k
Teambox: Starting and Learning
jrom
132
8.7k
Fontdeck: Realign not Redesign
paulrobertlloyd
81
5.2k
GraphQLの誤解/rethinking-graphql
sonatard
67
10k
GraphQLとの向き合い方2022年版
quramy
43
13k
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ͷతҐஔ͚͕ͮͪΌΜͱΘΔͱɺ ߟྀ࿙ΕͷࢦఠɺΑΓΑ͍ํ๏ͷఏҊ Λͯ͠Β͑Δ͜ͱ͕͋Δ
ͯͳϒϩάͰѻ͏σʔλͷେ͖͞Λ࣮ײ ԿΛ͢Δʹ͕͔͔ͯ࣌ؒ͠ΔͷͰɺ ಠཱͯ͠ฒߦॲཧͰ͖Δ෦͢Δͷ͕େࣄ
طଘͷهࣄΛकΔ͜ͱ͕େ Ϣʔβʔͷࢿ࢈Ͱ͋ΔهࣄΛյ͞ͳ͍Α͏ʹ͢Δͷ͕ ࠷༏ઌ
Ҏ্Ͱ͢