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
1.2k
UUIDは衝突の夢を見るか
Dorian
April 26, 2017
Tweet
Share
More Decks by Dorian
See All by Dorian
VMとAWS ECSがメインのインフラにKubernetesを導入した効能
doridoridoriand
1
3.4k
オープンSNSフレームワークについて
doridoridoriand
0
1.1k
Other Decks in Programming
See All in Programming
最新TCAキャッチアップ
0si43
0
140
Hotwire or React? ~アフタートーク・本編に含めなかった話~ / Hotwire or React? after talk
harunatsujita
1
120
광고 소재 심사 과정에 AI를 도입하여 광고 서비스 생산성 향상시키기
kakao
PRO
0
170
Pinia Colada が実現するスマートな非同期処理
naokihaba
4
220
とにかくAWS GameDay!AWSは世界の共通言語! / Anyway, AWS GameDay! AWS is the world's lingua franca!
seike460
PRO
1
860
OnlineTestConf: Test Automation Friend or Foe
maaretp
0
110
Make Impossible States Impossibleを 意識してReactのPropsを設計しよう
ikumatadokoro
0
170
受け取る人から提供する人になるということ
little_rubyist
0
230
Compose 1.7のTextFieldはPOBox Plusで日本語変換できない
tomoya0x00
0
190
役立つログに取り組もう
irof
28
9.6k
タクシーアプリ『GO』のリアルタイムデータ分析基盤における機械学習サービスの活用
mot_techtalk
4
1.4k
Amazon Qを使ってIaCを触ろう!
maruto
0
400
Featured
See All Featured
Fireside Chat
paigeccino
34
3k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
126
18k
Navigating Team Friction
lara
183
14k
Designing the Hi-DPI Web
ddemaree
280
34k
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.2k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
31
2.7k
Intergalactic Javascript Robots from Outer Space
tanoku
269
27k
A Modern Web Designer's Workflow
chriscoyier
693
190k
Ruby is Unlike a Banana
tanoku
97
11k
Statistics for Hackers
jakevdp
796
220k
Fashionably flexible responsive web design (full day workshop)
malarkey
405
65k
Six Lessons from altMBA
skipperchong
27
3.5k
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ͱ͔ Ͳ͏ͳΜͩΖ͏
͓͠·͍