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
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",
}