This is a talk I gave at IPC 2014 in Munich.
It's about how to build durable web apis based on the experience gained at Namshi while we were developing our SOA architecture
9. FULL STACK IS DEAD!
Microservice Architecture, [...] a
particular way of designing software
applications as suites of independently
deployable services
http://martinfowler.com/articles/microservices.html
10. FULL STACK IS DEAD!
SERVICE-ORIENTED
ARCHITECTURES
Microservice Architecture, [...] a
particular way of designing software
applications as suites of independently
deployable services
http://martinfowler.com/articles/microservices.html
23. GET vs POST
โThe difference is that in
a GET request you have the parameters in
the url ,
with a POST the parameters are in the
requestโs bodyโ
33. WAKA
โA new protocol designed to match
the efficiency of well-designed
Web Applicationsโ
http://tools.ietf.org/agenda/83/slides/slides-83-httpbis-5.pdf
34. SPDY/1โฆ3
A protocol โinventedโ by Google, which supports:
extended compression
multiplexing
prioritization
server push
35. SPDY/1โฆ3
A protocol โinventedโ by Google, which supports:
extended compression
multiplexing
prioritization
server push
36. SPDY/1โฆ3
A protocol โinventedโ by Google, which supports:
extended compression
multiplexing
prioritization
server push
37. SPDY/1โฆ3
A protocol โinventedโ by Google, which supports:
extended compression
multiplexing
prioritization
server push
75. cURL is your best friend
curl -X GET https://api.example.com/products
curl -X POST https://api.example com/order -data=โ{...}โ
curl -X DELETE ...
curl -X PATCH ...
103. USER TAGS
ON STACKOVERFLOW
THEYโRE
deleting a non-existent tag:
STILL FIGHTING
200, 204 or 404?
http://stackoverflow.com/questions/2342579/http-status-code-for-update-
and-delete
123. โMost APIs are designed by the API
provider with the goal of maintaining data
model purity. When building an OL, be
prepared to sometimes abandon purity in
favor of optimizations and/or
performance.โ
Daniel Jacobson,
director of engineering
for the Netflix API
http://www.infoq.com/presentations/API-Revolution
153. Keep as much logic
as possible on the
server
Donโt play with fire
154. Less things to
implement on every
client and centralized
implementations
Donโt play with fire
155. make it easy for the
API clients
Donโt play with fire
156. POST https://api.example.com/login
200 OK
date: Thu, 01 May 2014 21:52:33 GMT
content-type: application/json
transfer-encoding: chunked
connection: close
set-cookie: login=...;
cache-control: no-cache
Donโt play with fire
{
โemail"=>"alessandro.cinelli@gmail.com",
"firstName"=>"Alessandro",
"lastName"=>"Cinelli",
โbirthdayโ=>"14/09/1985",
}