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.1k
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
380
Data Migration on Rails
ohbarye
7
7.3k
Unlocking Potential of Property Based Testing with Ractor
ohbarye
3
15k
プロトタイピングによる不確実性の低減 / Reducing Uncertainty through Prototyping
ohbarye
5
840
My Favorite Protocol: Idempotency-Key Header
ohbarye
7
6.2k
エンジニア9名でプロポーザル提出8件, 採択3件を支える技術と文化 / Proposal Fight Culture
ohbarye
4
5.7k
管理機能アーキテクチャパターンの考察と実践 / 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.3k
Other Decks in Programming
See All in Programming
Pinia Colada が実現するスマートな非同期処理
naokihaba
4
220
Jakarta EE meets AI
ivargrimstad
0
120
EventSourcingの理想と現実
wenas
6
2.3k
Kaigi on Rails 2024 〜運営の裏側〜
krpk1900
1
190
Flutterを言い訳にしない!アプリの使い心地改善テクニック5選🔥
kno3a87
1
140
AI時代におけるSRE、 あるいはエンジニアの生存戦略
pyama86
6
1.1k
WebフロントエンドにおけるGraphQL(あるいはバックエンドのAPI)との向き合い方 / #241106_plk_frontend
izumin5210
4
1.4k
NSOutlineView何もわからん:( 前編 / I Don't Understand About NSOutlineView :( Pt. 1
usagimaru
0
330
CSC509 Lecture 11
javiergs
PRO
0
180
subpath importsで始めるモック生活
10tera
0
300
Make Impossible States Impossibleを 意識してReactのPropsを設計しよう
ikumatadokoro
0
170
What’s New in Compose Multiplatform - A Live Tour (droidcon London 2024)
zsmb
1
470
Featured
See All Featured
Producing Creativity
orderedlist
PRO
341
39k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.5k
Side Projects
sachag
452
42k
GitHub's CSS Performance
jonrohan
1030
460k
Embracing the Ebb and Flow
colly
84
4.5k
Gamification - CAS2011
davidbonilla
80
5k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
47
2.1k
Visualization
eitanlees
145
15k
Why You Should Never Use an ORM
jnunemaker
PRO
54
9.1k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
329
21k
The Cost Of JavaScript in 2023
addyosmani
45
6.7k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
506
140k
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