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
agreed-typed
Search
Recruit Technologies
October 12, 2018
Technology
1
4.1k
agreed-typed
2018/10/12 フューチャーアーキテクトとのLTバトルでの、伊藤の講演資料になります
Recruit Technologies
October 12, 2018
Tweet
Share
More Decks by Recruit Technologies
See All by Recruit Technologies
障害はチャンスだ! 障害を前向きに捉える
rtechkouhou
1
700
Flutter移行の苦労と、乗り越えた先に得られたもの
rtechkouhou
3
12k
ここ数年間のタウンワークiOSアプリのエンジニアのチャレンジ
rtechkouhou
1
1.5k
大規模環境をAWS Transit Gatewayで設計/移行する前に考える3つのポイントと移行への挑戦
rtechkouhou
1
1.9k
【61期 新人BootCamp】TOC入門
rtechkouhou
3
42k
【RTC新人研修 】 TPS
rtechkouhou
1
41k
Android Boot Camp 2020
rtechkouhou
0
41k
HTML/CSS
rtechkouhou
10
51k
TypeScript Bootcamp 2020
rtechkouhou
9
46k
Other Decks in Technology
See All in Technology
Understanding_Thread_Tuning_for_Inference_Servers_of_Deep_Models.pdf
lycorptech_jp
PRO
0
120
低レイヤを知りたいPHPerのためのCコンパイラ作成入門 完全版 / Building a C Compiler for PHPers Who Want to Dive into Low-Level Programming - Expanded
tomzoh
4
3.2k
生成AI活用の組織格差を解消する 〜ビジネス職のCursor導入が開発効率に与えた好循環〜 / Closing the Organizational Gap in AI Adoption
upamune
3
2.4k
A2Aのクライアントを自作する
rynsuke
1
170
より良いプロダクトの開発を目指して - 情報を中心としたプロダクト開発 #phpcon #phpcon2025
bengo4com
1
3.1k
AIのAIによるAIのための出力評価と改善
chocoyama
2
550
ひとり情シスなCTOがLLMと始めるオペレーション最適化 / CTO's LLM-Powered Ops
yamitzky
0
440
登壇ネタの見つけ方 / How to find talk topics
pinkumohikan
5
480
Fabric + Databricks 2025.6 の最新情報ピックアップ
ryomaru0825
1
140
米国国防総省のDevSecOpsライフサイクルをAWSのセキュリティサービスとOSSで実現
syoshie
2
1.1k
Oracle Audit Vault and Database Firewall 20 概要
oracle4engineer
PRO
3
1.7k
データプラットフォーム技術におけるメダリオンアーキテクチャという考え方/DataPlatformWithMedallionArchitecture
smdmts
5
630
Featured
See All Featured
Raft: Consensus for Rubyists
vanstee
140
7k
Reflections from 52 weeks, 52 projects
jeffersonlam
351
20k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
34
5.9k
How GitHub (no longer) Works
holman
314
140k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
31
1.2k
Fireside Chat
paigeccino
37
3.5k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
657
60k
Writing Fast Ruby
sferik
628
61k
Code Review Best Practice
trishagee
68
18k
How to train your dragon (web standard)
notwaldorf
93
6.1k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
8
790
Mobile First: as difficult as doing things right
swwweet
223
9.7k
Transcript
agreed-typed ҏ౻ɹӯ
ࣗݾհ • ҏ౻ɹӯʢ͍ͱ͏ɹ͖͋ͱʣ • @akito0107 • 2015 ϦΫϧʔτೖࣾ • ιϑτΣΞΤϯδχΞ
• Go / Node.jsΛॻ͍͍ͯ·͢
ͳ͢͜ͱ • RTCͷΑ͋͘ΔΞʔΩςΫνϟ • AgreedͱConsumer-Driven Contract • Agreed-Typed • ·ͱΊ
from: https://speakerdeck.com/yosuke_furukawa/rikurutotekufalserozizufalseji-shu-dong-xiang?slide=11
None
None
͜͜
͍ͭ ͜͜Ͱ ݂͕ྲྀ ΕΔ
APIͷI/Fʹؔ͢Δ • ୭͕͍ܾͭΊΔ • Backend͕উखʹܾΊͯFront͔Β͍ͮΒ͍ (ex, N + 1 http
requestͳͲ) • ϝϯςφϯεਏ͍ • DocumentͱͷෆҰகɺͦͦDocͳͲͳ͍ɺ etc…
Agreed • https://github.com/recruit-tech/agreed • Consumer-Driven Contract&Specification By Exampleͷπʔϧ • APIΛ͏ଆʢFEʣ͕request
/ responseΛJSONͳͲͰ ࣗ༝ʹࢦఆͰ͖Δ • FEͷͨΊʹMock Serverͱͯ͠ৼΔ͏ • BEͷͨΊʹE2E testing toolsͱͯ͠ৼΔ͏
Agreed Sample • agreed.js
Agreed Server Sample • Run Server • curl
Agreed fileͷදݱྗͷ • AgreedFE͕खܰʹmock serverΛཱͯΔͨΊͷΈ • Agreed fileΛਖ਼͘͠ॻ͘͜ͱࣗମ͕͍͠ • ex)
ඞਢɾඇඞਢΛදݱͰ͖ͳ͍, ύϥϝʔλͷൈ͚͕ ݕͰ͖ͳ͍ͳͲ • agreedͰrequest / responseΛఆٛͯ͠ɺFE/BEͰਖ਼ ͘͠ॲཧͰ͖ͯΔ͔Λ֬ೝ͢Δํ๏͕ͳ͍
agreed-typed • Agreed fileͷAPIఆٛʹܕΛ͚ͭΔͨΊͷϥΠϒ ϥϦ • APIΛܕͰදݱ • requestͷPathܕ, responseͷstatusCodeܕ
• agreedͷఆٛΛ੩తղੳ͢Δ
agreed-typed sample 1 • APIDef<>͔ΒͷܕΤΠϦΞεͰAPIΛఆٛ
agreed-typed sample 2 • ܕʹैͬͯexampleΛఆٛ
agreed-typed sample 3 • Run Server • curl
agreed-typed sample 4 • ͍Ζ͍ΖͳܕνΣοΫΛ͔͚ΒΕΔ ະఆٛͷCPEZ ఆ͞Εͳ͍ TUBUVTDPEF QBUI͕ؒҧͬͯΔ
ଞʹίϯύΠϥ͕νΣοΫͰ ͖Δ͜ͱ • GETʹbody͚ͭΔͱίϯύΠϥౖ͕Δ • Status codeʹΑΓbodyग़͚͠ • etc…
Future of API design • Specification by example or
Specification by design • Consumer / Producerͷඇରশੑ • ܕͰAPIΛදݱ͠ɺਖ਼ੑΛίϯύΠϥ͕ݕূ͢Δ ੈք͕དྷΔ • Haskell servant / Protobuf
·ͱΊ • agreedͱconsumer driven contractͷհ • agreed-typedͷհ • APIఆٛΛܕͰදݱ͠Α͏
͋Γ͕ͱ͏͍͟͝·ͨ͠