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
DB外の副作用をトランザクションから分離しよう / Isolate out-of-DB sid...
Search
Masato Ohba
April 20, 2023
Programming
8
4.2k
DB外の副作用をトランザクションから分離しよう / Isolate out-of-DB side effects from transactions
gotanda.rb#52@オンライン "DB外の副作用をトランザクションから分離しよう"
Masato Ohba
April 20, 2023
Tweet
Share
More Decks by Masato Ohba
See All by Masato Ohba
プロポーザルのつくり方 〜個人技編〜 / How to come up with proposals
ohbarye
5
440
Data Migration on Rails
ohbarye
8
8.8k
Unlocking Potential of Property Based Testing with Ractor
ohbarye
3
15k
プロトタイピングによる不確実性の低減 / Reducing Uncertainty through Prototyping
ohbarye
5
880
My Favorite Protocol: Idempotency-Key Header
ohbarye
7
6.3k
エンジニア9名でプロポーザル提出8件, 採択3件を支える技術と文化 / Proposal Fight Culture
ohbarye
4
6.6k
管理機能アーキテクチャパターンの考察と実践 / Learn Architecture through Admin
ohbarye
33
18k
サブスクリプションサービスをつくる時にエンジニアが考えること / Behind the Scenes: Engineering a Subscription Service
ohbarye
15
18k
RuboCop Custom Formatter for Reviewdog Diagnostic Format
ohbarye
2
2.4k
Other Decks in Programming
See All in Programming
これが俺の”自分戦略” プロセスを楽しんでいこう! - Developers CAREER Boost 2024
niftycorp
PRO
0
190
「とりあえず動く」コードはよい、「読みやすい」コードはもっとよい / Code that 'just works' is good, but code that is 'readable' is even better.
mkmk884
3
420
「Chatwork」Android版アプリを 支える単体テストの現在
okuzawats
0
180
RWC 2024 DICOM & ISO/IEC 2022
m_seki
0
210
StarlingMonkeyを触ってみた話 - 2024冬
syumai
3
270
見えないメモリを観測する: PHP 8.4 `pg_result_memory_size()` とSQL結果のメモリ管理
kentaroutakeda
0
360
良いユニットテストを書こう
mototakatsu
8
2.5k
Monixと常駐プログラムの勘どころ / Scalaわいわい勉強会 #4
stoneream
0
280
PHPで作るWebSocketサーバー ~リアクティブなアプリケーションを知るために~ / WebSocket Server in PHP - To know reactive applications
seike460
PRO
2
430
php-conference-japan-2024
tasuku43
0
300
競技プログラミングへのお誘い@阪大BOOSTセミナー
kotamanegi
0
360
fs2-io を試してたらバグを見つけて直した話
chencmd
0
230
Featured
See All Featured
How to Think Like a Performance Engineer
csswizardry
22
1.2k
Building Applications with DynamoDB
mza
91
6.1k
For a Future-Friendly Web
brad_frost
175
9.4k
Producing Creativity
orderedlist
PRO
341
39k
How STYLIGHT went responsive
nonsquared
95
5.2k
Building Adaptive Systems
keathley
38
2.3k
Become a Pro
speakerdeck
PRO
26
5k
Fashionably flexible responsive web design (full day workshop)
malarkey
405
66k
Building Better People: How to give real-time feedback that sticks.
wjessup
365
19k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.5k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
810
Documentation Writing (for coders)
carmenintech
66
4.5k
Transcript
%#֎ͷ෭࡞༻Λ τϥϯβΫγϣϯ͔Β͠Α͏ !HPUBOEBSC PICBSZF
τϥϯβΫγϣϯͷ"UPNJDJUZ ͚Δ͜ͱͷͰ͖ͳ͍Ұ࿈ͷใॲ ཧͷ୯Ґɻ͜͜Ͱ3%#.4ͷػೳΛ Πϝʔδ͢Δɻ τϥϯβΫγϣϯͷॲཧ͕શ࣮ͯ ߦ͞ΕΔ͔ɺ͋Δ͍·࣮ͬͨ͘ߦ ͞Εͳ͍͔Λอূ͠ͳ͚ΕͳΒͳ ͍ʢ"UPNJDJUZݪࢠੑʣɻ τϥϯβΫγϣϯͱʁ
จσʔλͷ࡞ ૹσʔλͷ࡞ Λ·ͱΊͯߦ͏
τϥϯβΫγϣϯͷ"UPNJDJUZ τϥϯβΫγϣϯʹσʔλϕʔε ͕อޢͰ͖ͳ͍෭࡞༻ΛಥͬࠐΉ ϒϩοΫͷॲཧ͕શ࣮ͯߦ͞ΕΔ ͔ɺ͋Δ͍·࣮ͬͨ͘ߦ͞Εͳ͍ ͔Λอূ͢Δ͜ͱ͕Ͱ͖ͳ͘ͳΔ "UPNJDJUZͷյ͠ํ จྃϝʔϧ ૹ৴ΛՃ
ϝʔϧωοτϫʔΫΛܦ༝ͯ͠ૹ৴͞ΕΔͷͱ͢Δ
ͳͥյΕΔʁ ʮจσʔλ࡞ʯ ʮૹσʔλ࡞ʯ ʮϝʔϧૹ৴ʯ ͕ͯ͢Ұ؏ͯ͠ޭ͢Ε Α͍ ΫϥΠΞϯτ αʔό ϝʔϧαʔό
ޭ
ͳͥյΕΔʁ )551ϦΫΤετͰωοτ ϫʔΫΤϥʔ͕ى͖ɺϩʔϧ όοΫ͢Δέʔε Ϣʔβʔʹจྃϝʔϧ ͕ૹΒΕͨͷʹจɾૹ σʔλ͕ଘࡏ͠ͳ͍ͱݴͬ ͕ͨى͖͏Δ 💥
αʔόͰૹ৴൱Λ Δ͜ͱͰ͖ͳ͍ ωοτϫʔΫΤϥʔඞͣى͖ΔIUUQTFOXJLJQFEJBPSHXJLJ'BMMBDJFT@PG@EJTUSJCVUFE@DPNQVUJOH ଞʹίϛοτͰࣦഊ͢ΔέʔεͳͲ͕͋Γ͏Δ ΫϥΠΞϯτ αʔό ϝʔϧαʔό
ͷຊ࣭ w ʮจσʔλ࡞ʯʮૹσʔλ࡞ʯʮϝʔϧૹ৴ʯΛͭͷ ཧτϥϯβΫγϣϯʹ͍ͨ͠ w ͔͠͠3%#.4ͷཧτϥϯβΫγϣϯͰαϙʔτͰ͖ͳ͍ w ݎ࿚ੑΛอͭʹ%#τϥϯβΫγϣϯͱɺ%#֎ͷ෭࡞༻͠ ͳ͚ΕͳΒͳ͍
ࢄτϥϯβΫγϣϯΛؤுΔɺͱ͍͏ಓ͋Δ͕ଟ͘ͷέʔεͰίετ͕ߴͭ͘͘ͱࢥΘΕΔ ͜ͷଞʹτϥϯβΫγϣϯͷ࣌ؒԽɺϩοΫղ์ͪͳͲͷى͖Δ
4NBSU#BOLͷࣄ w δϣϒΩϡʔγεςϜʹEFMBZFEKPCΛ͍ͬͯͨ w Ωϡʔͱͯ͠3%#.4Λ͏ w ΤϯΩϡʔ·ͰͷBUPNJDJUZΛอূͰ͖ΔͨΊɺઌड़ͷྫͷΑ͏ʹ %#τϥϯβΫγϣϯͰΤϯΩϡʔ͍ͯ͠ΔՕॴ͕͋ͬͨ w
424ʹҠߦ͢Δ͜ͱʹͳΓɺݕग़ͯ͢͠Δඞཁ͕ੜͨ͡ IUUQTHJUIVCDPNDPMMFDUJWFJEFBEFMBZFE@KPC
ͳΜ͔࡞Εͦ͏ͳؾ͕ͨ͠ͷͰ ࣗ࡞ͯ͠ΈΔ
ݕग़ʢࣗ࡞Ҋʣ w "DUJWF3FDPSE#BTFDPOOFDUJPOUSBOTBDUJPO@PQFO PQFO@USBOTBDUJPOTͰτϥϯβΫγϣϯ͔Ͳ͏͔ఆͰ͖Δ w )551ϦΫΤετʢ/FU)551 OFXʣδϣϒΤϯΩϡʔ ʢ"DUJWF+PC&ORVFVJOHFORVFVFʣͰݺͼग़͞ΕΔϝιουʹ
ఆϑοΫΛࠐΊΑ͍ τϥϯβΫγϣϯ͔Ͳ͏͔ಈతʹఆ͢Δํ๏
ݕग़ʢࣗ࡞Ҋʣ ࠷ॳʹࢼΈͨࣗ࡞ྫ τϥϯβΫγϣϯதʹݺͼग़͢ͱ raiseͯ͘͠ΕΔ
ʢࣗ࡞Ҋʣ w ಓʹ%#τϥϯβΫγϣϯͷ֎ʹҠ͢ w "DUJWF3FDPSE#BTFΛܧঝͯ͠ΔΫϥεͰ͋ΕBGUFS@DPNNJUϑο ΫΛ͏ τϥϯβΫγϣϯ͔Β͢Δํ๏
ࣗ࡞Ͱ͖ͦ͏͚ͩͲ ΑΓચ࿅͞ΕͨHFN͕͋Δ͜ͱʹؾͮ͘
ݕग़ʢHFNʣ τϥϯβΫγϣϯͷ෭࡞༻Λݕग़ ͯ͘͠ΕΔ "DUJWF+PC͚ͩͰͳ͘4JEFLJR 3FTRVFΛαϙʔτ )551ϦΫΤετͷࢹʹ4OJ ff FS Λ༻͠ɺ/FU)551Ҏ֎ͷϥΠϒ
ϥϦαϙʔτ *TPMBUPS IUUQTHJUIVCDPNQBMLBOJTPMBUPS
ݕग़ʢHFNʣ "DUJWF4VQQPSU/PUJ fi DBUJPOTVCTDSJCF ͰTRMBDUJWF@SFDPSEΠϕϯτΛ TVCTDSJCF͢ΔMJTUFOFSΛ࣮͠ɺHFNͷ ίʔυͰτϥϯβΫγϣϯཧΛͯ͠ ͍Δ VTF@USBOTBDUJPOBM@UFTUTαϙʔτͯ͠
͍Δ 💭JOTUSVNFOUBUJPOରԠ͍ͯ͠Ε"3Ҏ ֎Ͱ͑ΔΑ͏ʹ͍ͯ͠Δ *TPMBUPS IUUQTHJUIVCDPNQBMLBOJTPMBUPS
ʢHFNʣ BGUFS@DPNNJU BGUFS@SPMMCBDLΛίʔ υϕʔεͷͲ͜ʹͰॻ͚ΔΑ͏ʹ ͯ͘͠ΕΔ 💭ϏδωεϩδοΫΛूͨ͠·· τϥϯβΫγϣϯͰ͖Δͷ͕ͱ ͯྑ͍ "GUFS$PNNJU&WFSZXIFSF
IUUQTHJUIVCDPN&OWFLBGUFS@DPNNJU@FWFSZXIFSF
ʢHFNʣ "DUJWF3FDPSE$POOFDUJPO"EBQUFST%BUBCB TF4UBUFNFOUTBEE@USBOTBDUJPO@SFDPSEʹϞ σϧ෩ͷΦϒδΣΫτΛ͠ɺτϥϯβΫ γϣϯίϛοτޙͷίʔϧόοΫΛݺͤͯ ͍Δ 💭ͦΜͳ͜ͱͰ͖ΔΜͩ "GUFS$PNNJU&WFSZXIFSF
͜ΕΒΛΈ߹Θͤͯ ίʔυϕʔε্Ͱͯ͢ͷ෭࡞༻Λ %#τϥϯβΫγϣϯ͔Βྃ✅
·ͱΊ *TPMBUPS "GUFS$PNNJU&WFSZXIFSFศར 📡 *TPMBUPSFOWJSPONFOUUFTUͰಥͬࠐΜͰҰ$*ΒͤͯΈΔͱίʔυϕʔεͷ݈શ ੑ͕Θ͔ΔͷͰΦεεϝɻฐࣾͩͱՕॴ͔͠ͳ͘ɺΑ͘Ͱ͖ͯͯײಈͨ͠ 👐 طଘͷHFNΛ͏࣌ʮࣗ࡞͢ΔͳΒͲ͏͢Δ͔ʁʯΛߟ͑Δͱ໘ന͍ 👁
ͦͷ্ͰίʔυϦʔσΟϯά͢Δͱ৽ͨͳൃݟ͕ੜ·Εͯ͞Βʹ໘ന͍ 3BJMTͷJOTUSVNFOUBUJPODBMMCBDLػߏʹ͍ͭͯΔ͜ͱ͕Ͱ͖ͨ
4NBSU#BOL *OD 4PGUXBSF&OHJOFFS .BTBUP0ICB !PICBSZF 8IP*BN !PICBSZF