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
UUIDは衝突の夢を見るか
Search
Dorian
April 26, 2017
Programming
1.3k
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
UUIDは衝突の夢を見るか
Dorian
April 26, 2017
More Decks by Dorian
See All by Dorian
VMとAWS ECSがメインのインフラにKubernetesを導入した効能
doridoridoriand
1
3.6k
オープンSNSフレームワークについて
doridoridoriand
0
1.2k
Other Decks in Programming
See All in Programming
源内ハンズオン概要編
hideg
0
160
仕様駆動開発へのトライを機に チームに適合する手法を模索し続けている話
freee
PRO
0
480
AI Nativeにデータを扱うための組織・基盤のこれまでとこれから
kirimaru
0
110
GDG Korea Android: 2026 I/O Extended ~ What's new in Android development tools
pluu
0
220
170k Jobs a Day on GKE: Scaling Mercari's CI Platform - and What's Next for AI-Native Development
junyaokabe
0
100
楽しそうなつよつよエンジニアと目が死んでる僕/A brilliant engineer having a blast, and dead-eyed me.
3l4l5
2
110
PHP に部分適用が来るぞ!……ところで何それ?おいしいの? #phpcon / phpcon-2026
shogogg
0
620
ここ半年くらいでAIに作らせたR用ツール
eitsupi
0
370
Jindong: Introducing Declarative Haptics in Compose Multiplatform
l2hyunwoo
0
110
複数の Claude Code が"放置"されてしまう問題をCLI ダッシュボードを自作して解決した話
sumihiro3
1
680
JAWS-UG横浜 #102 AWSサ終供養LT会 成仏できない AWS サービスたち 〜本日、三体供養します〜
maroon1st
0
350
Go言語とトイモデルで学ぶTransformerの気持ち / fukuokago23-transformer
monochromegane
0
170
Featured
See All Featured
Test your architecture with Archunit
thirion
1
2.3k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
1.7k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
930
How to train your dragon (web standard)
notwaldorf
97
6.7k
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
760
Building a Scalable Design System with Sketch
lauravandoore
463
34k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
280
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
450
Exploring anti-patterns in Rails
aemeredith
3
460
So, you think you're a good person
axbom
PRO
2
2.1k
Ruling the World: When Life Gets Gamed
codingconduct
0
290
How to Think Like a Performance Engineer
csswizardry
28
2.7k
Transcript
66*% িಥͷເΛݟΔ͔ 4LJMM8FEOFTEBZ
͓·͑ͩΕ w ͍ͩ͠ w --ͱ͔Α͘ॻ͘Α w ࠷͍ۙΜ;ΒΛ͔͍ͬͯ͡·͢ w ͓ञΛࢁҿΊΔਓΛਅʹ୳͍ͯ͠·͢
66*% w ϢχʔΫͳจࣈྻΛಘΔ࣌ྑ͍ͬͯ͘Δͱࢥ͍ ·͢ ҎԼྫ GEEDBCBEDE w ͲΜͳʹੜͯ͠িಥ͠ͳ͍ͱ͔ɻɻ w
ͰຊͳΜͰ͔͢Ͷ
ͦͦ66*%ͱ w ࢄγεςϜ্Ͱͱ౷ແ͠ʹ࡞Ͱ͖Δࣝผࢠͱ ͯ͠ઃܭ͞Εͨ w όʔδϣϯେผͯͭ͠ଘࡏ w ༷3'$ͱͯ͠ެ։͞Ε͍ͯΔ IUUQTUPPMTJFUGPSHQEGSGDQEG
w ࠷ॳͷࣈͷ෦͕όʔδϣϯΛද͍ͯ͠Δ w ࠷ޙͷจࣈͷ෦όϦΞϯτͱݺΕΔ มछͷछྨΛද͍ͯ͠Δ w όʔδϣϯ/*$ͷ."$ΞυϨεΛ༻ͨ͠Γ w όʔδϣϯόʔδϣϯͷҰ෦Λ104*9ͷ6*%(*%Ͱஔ͖ ͑ͨͷ
w όʔδϣϯͱ.%4)"Ͱੜͨ͠ϋογϡΛ༻͍ͯ ͍Δͷͱͳ͍ͬͯΔ GEEDBCBEDE
GEEDBCBEDE w զʑ͕ීஈ༻͍͍ͯΔ66*%όʔδϣϯ w ͦΕʹՃ͑ͯόϦΞϯτͱݺΕΔจࣈྻ͕ՃΘΔ " # ͷ͍ͣΕ͔ʹͳΔ
w શͯཚʹΑΔੜ
GEEDBCBEDE w ্ه66*%ਐͰܻCJU ਐ w ͔͜͜Βόʔδϣϯ ͱόϦΞϯτ
ΛҾ ͘ͱɺCJUͷࣗ༝͕͋Δ w ?º?௨Γ͘͢͝ଟ͍
ຊʹিಥ͠ͳ͍ͷʁ w ҙ֎ͱඦສͱ͔ग़ྗ͢ Δͱ͙͢িಥ͢ΔͷͰʁ w ͍͘Β EFWVSBOEPNͱ͔छʹ ͬͯͯͶ͑ɻɻ
·͋ͬͯΈͬ w 66*%Λͻͨ͢Βੜͯ͠%#ʹ*/4&35 w ͕࣌ؒڐ͢ݶΓͣͬͱ
require 'securerandom' require 'mysql2' client = Mysql2::Client.new(:host => 'localhost', :username
=> 'root', :password => 'password', :database => 'uuid' ) while true do begin uuid = SecureRandom.uuid client.query("insert into uuid.ruby (`uuid`) values ('#{uuid}')") puts uuid rescue => e p e end end
ॏෳνΣοΫ w ੜ͞Εͨ66*%શ݅Λ͖࣋ͬͯͯɺ ཁૉΧϯτ w VOJRϝιουΛར༻ͯ͠ॏෳഉআ ཁૉΧϯτ w ཁૉʹҧ͍͕͋Εॏෳ͍ͯ͠Δͣ ͘͢͝ಥ؏ͳॏෳνΣοΫ
ॏෳνΣοΫ ͘͢͝ಥ؏ͳॏෳνΣοΫ puts 'িಥͨ͠Ͱ' if data.count != data.uniq.count
ॏෳνΣοΫ దʹ#PUʹͭͿ͔ͤͯ֬ೝͱ͔ͯ͠·ͨ͠
ൃੜ w ༻ҙ͍ͯͨ͠%#ͷ༰ྔΛ͑Δ w ૉʹσΟεΫ͕େ͖͍%#Λ࡞Ҡߦ
ൃੜ w ԯ͑ͨ͋ͨΓ͔ΒॏෳνΣοΫͰ͖ͳ͘ͳΔ ͓͍ 1$ͷϝϞϦʹΒͳ͍ w ஞ࣍%#͔ΒಡΈऔͬͯಉҰͷ66*%͕͋Δ͔%#ʹ ͍߹Θͤ͢Δํࣜʹมߋ
ൃੜ w ,74ʹ͢ΕΑ͔ͬͨײ w ฒྻॲཧग़དྷΔΑ͏ʹ͚ͨ͠ΕͲΓ͍ ༻ҙͨ͠%#αʔόʔ͕ශऑͩͬͨ
Ͱɺিಥͨ͠ͷʁ w ੜͨ͠66*%ԯສ w ԯϨίʔυௐͨײͩ͡ͱিಥ͠·ͤΜͰͨ͠
Ͱɺিಥͨ͠ͷʁ w ଟ͠ͳ͍ͱࢥ͏ w 66*%ͩͱিಥ͠ͳ͍ͷ͔͚ͩΕͲɺ୯७ͳIFYͱ͔ Ͳ͏ͳΜͩΖ͏
͓͠·͍