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
Git scrapingで始める継続的なデータ追跡 / Git Scraping
ohbarye
5
480
プロポーザルのつくり方 〜個人技編〜 / How to come up with proposals
ohbarye
5
580
Data Migration on Rails
ohbarye
8
9.6k
Unlocking Potential of Property Based Testing with Ractor
ohbarye
3
16k
プロトタイピングによる不確実性の低減 / Reducing Uncertainty through Prototyping
ohbarye
5
1k
My Favorite Protocol: Idempotency-Key Header
ohbarye
7
6.5k
エンジニア9名でプロポーザル提出8件, 採択3件を支える技術と文化 / Proposal Fight Culture
ohbarye
4
6.7k
管理機能アーキテクチャパターンの考察と実践 / Learn Architecture through Admin
ohbarye
33
18k
サブスクリプションサービスをつくる時にエンジニアが考えること / Behind the Scenes: Engineering a Subscription Service
ohbarye
16
18k
Other Decks in Programming
See All in Programming
AHC041解説
terryu16
0
360
Асинхронность неизбежна: как мы проектировали сервис уведомлений
lamodatech
0
1.3k
functionalなアプローチで動的要素を排除する
ryopeko
1
190
Flatt Security XSS Challenge 解答・解説
flatt_security
0
730
KMP와 kotlinx.rpc로 서버와 클라이언트 동기화
kwakeuijin
0
300
快速入門可觀測性
blueswen
0
500
ゼロからの、レトロゲームエンジンの作り方
tokujiros
3
1k
Fibonacci Function Gallery - Part 2
philipschwarz
PRO
0
210
Beyond ORM
77web
11
1.6k
Внедряем бюджетирование, или Как сделать хорошо?
lamodatech
0
940
Simple組み合わせ村から大都会Railsにやってきた俺は / Coming to Rails from the Simple
moznion
3
2.1k
return文におけるstd::moveについて
onihusube
1
1.4k
Featured
See All Featured
Git: the NoSQL Database
bkeepers
PRO
427
64k
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.5k
The Art of Programming - Codeland 2020
erikaheidi
53
13k
Measuring & Analyzing Core Web Vitals
bluesmoon
5
210
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
28
2.2k
Fireside Chat
paigeccino
34
3.1k
Done Done
chrislema
182
16k
Bash Introduction
62gerente
610
210k
Into the Great Unknown - MozCon
thekraken
34
1.6k
GitHub's CSS Performance
jonrohan
1030
460k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
132
33k
Reflections from 52 weeks, 52 projects
jeffersonlam
348
20k
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