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
Api Builder - Scala Up North 2017
Search
sullis
July 21, 2017
Technology
0
410
Api Builder - Scala Up North 2017
July 21, 2017
Scala Up North
Vancouver BC
#scala #apibuilder #rest #canada
sullis
July 21, 2017
Tweet
Share
More Decks by sullis
See All by sullis
Amazon S3 NYJavaSIG 2024-12-12
sullis
0
97
Amazon S3 - Portland Java User Group 2024-09-17
sullis
0
64
Netty - Montreal Java User Group 2024-05-21
sullis
0
140
Netty Chicago Java User Group 2024-04-17
sullis
0
880
Java 21 - Portland Java User Group 2023-10-24
sullis
0
290
Microbenchmarking with JMH - Portland 2023-03-14
sullis
0
130
Code generation on the Java VM 2022-04-19
sullis
0
110
Mockito 2022-01-25
sullis
0
170
GitHub Actions 2021-12-16
sullis
0
37
Other Decks in Technology
See All in Technology
サーバレスアプリ開発者向けアップデートをキャッチアップしてきた #AWSreInvent #regrowth_fuk
drumnistnakano
0
190
Turing × atmaCup #18 - 1st Place Solution
hakubishin3
0
470
Oracle Cloudの生成AIサービスって実際どこまで使えるの? エンジニア目線で試してみた
minorun365
PRO
4
280
開発生産性向上! 育成を「改善」と捉えるエンジニア育成戦略
shoota
1
230
権威ドキュメントで振り返る2024 #年忘れセキュリティ2024
hirotomotaguchi
2
730
生成AIをより賢く エンジニアのための RAG入門 - Oracle AI Jam Session #20
kutsushitaneko
4
220
KubeCon NA 2024 Recap: How to Move from Ingress to Gateway API with Minimal Hassle
ysakotch
0
200
あの日俺達が夢見たサーバレスアーキテクチャ/the-serverless-architecture-we-dreamed-of
tomoki10
0
420
社外コミュニティで学び社内に活かす共に学ぶプロジェクトの実践/backlogworld2024
nishiuma
0
250
AWS re:Invent 2024で発表された コードを書く開発者向け機能について
maruto
0
180
20241220_S3 tablesの使い方を検証してみた
handy
3
320
日本版とグローバル版のモバイルアプリ統合の開発の裏側と今後の展望
miichan
1
130
Featured
See All Featured
It's Worth the Effort
3n
183
28k
For a Future-Friendly Web
brad_frost
175
9.4k
Facilitating Awesome Meetings
lara
50
6.1k
Product Roadmaps are Hard
iamctodd
PRO
49
11k
How to Ace a Technical Interview
jacobian
276
23k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
29
2k
Imperfection Machines: The Place of Print at Facebook
scottboms
266
13k
Building Applications with DynamoDB
mza
91
6.1k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
2
290
Making the Leap to Tech Lead
cromwellryan
133
9k
YesSQL, Process and Tooling at Scale
rocio
169
14k
Optimizing for Happiness
mojombo
376
70k
Transcript
Sean Sullivan July 21, 2017 Scala Up North
• software engineer • 21 years on the JVM •
back office systems @ HBC About me
https://en.wikipedia.org/wiki/Hudson%27s_Bay_Company
None
saksfifthavenue.com saksoff5th.com lordandtaylor.com gilt.com thebay.com
API driven development
API descriptors
API descriptors are not a new concept
• 2000: WSDL 1.0 (SOAP) • 2006: WADL (REST) •
2011: Swagger (REST) • 2014: ApiDoc (REST) • 2017: ApiDoc rebranded to ApiBuilder
www.apibuilder.io
None
describe REST API in a JSON file
1. start by describing your models 2. map your models
to resources
"models": { "credit_card": { "fields": [ { "name": "guid", "type":
"uuid" }, { "name": "user_guid", "type": "uuid" }, { "name": "type", "type": "credit_card_type" }, { "name": "issuer", "type": “string", “required": false }, { "name": "last_four", "type": "string" }, { "name": "expire_date", "type": "string" }, { "name": "billing_address", "type": "address" } ] } }
"resources": { "credit_card": { "operations": [ { "method": "GET", "path":
"/:guid", "description": "Get a credit card.", "responses": { "200": { "type": "credit_card" }, "404": { "type": “unit”, "description": "Card not found." } } } }
gilt.com
www.gilt.com
• Rails app • one Git repo • monolith! Gilt:
2007 => 2008
• Rails app • JSP web framework • ~10 services
(Java) • handcrafted Java clients • weak typing (java.util.HashMap) Gilt: 2009 => 2010
• JSP’s • 100+ services (Java, Scala) • strongly typed
client libraries • Gilt “Commons” library Gilt: 2011 => 2013
• Gilt Commons library • 250+ services • binary coupling
• dependency hell • ApiBuilder project started on Github Gilt: 2014
Dependency hell Java runtime hell
• java.lang.NoClassDefFoundError • java.lang.NoSuchFieldError • java.lang.NoSuchMethodError Java runtime hell
Dependency hell kills productivity
None
Mitigating dependency hell • API design must be first class
• backwards and forward compatibility • accurate documentation • generated client libraries
• 350+ services • new services built with ApiBuilder +
generated clients • Gilt Commons library is deprecated Gilt: 2015 => 2017
Web Checkout Android Checkout iPhone Checkout Checkout service api.json
Generating client libraries with ApiBuilder
Code generators
None
Scala client generators • Http4s + Circe JSON • Ning
AsyncHttpClient {1.8, 1.9} • Play WS {2.2, 2.3, 2.4, 2.5, 2.6}
None
Conclusion • API driven development • visit www.apibuilder.io
The end
None
Bonus material
Gilt 2015