際際滷

際際滷Share a Scribd company logo
Rest in Peace
@
@yonatanm
If HISTORY HAS TAUGHT US ANYTHING, IT
IS THAT YOU CAN KILL ANYONE
REST in Peace
S
O
A
P
S
O
A
P
25%
S
O
A
P
50%
S
O
A
P
75%
S
O
A
P
0%
REST in Peace
200
Tons
REST in Peace
REST in Peace
The hGhospels hy  hEESbT
URIs
Resources
URIs
Resources
VERBS
C.R.U.D
VERBS
C.R.U.D
The hGhospels hy  hEESbT
Architecture,
Concepts
&&
Ideas
Standard
Architecture,
Concepts
&&
Ideas
Standard
The RESTafarian
the htruth
I respect those
that tell me
no matter how
hard it is
the htruth
Lie h#1
Lie h#2
REST in Peace
For a given user and
a repo, I wish to get
all her comments for
commits
For a given user and
a repo, I wish to get
all her comments for
commits
/repos/{owner}/{name}/Commits
/repos/{owner}/{name}/commits/{sha}/
comments
REST in Peace
/repos/{owner}/{name}/
CommitsAndComments
{
What about a diferent use
case ?!
I want to find the
committ with the
longest message ?
I want to find the
committ with the
longest message ?
/repos/{owner}/{name}/commits
/repos/{owner}/{name}/
CommitsAndComments?
include=comment, author
&exclude=parents,state,files
Get Put Delete Head Post Patch
,廩廩 廚 ,廡廚
...廚 廨廣
:API  廬 廬廚廣
PUT Stoves/{id} {pot off}
DELETE /Stoves/{id}/fire
POST /Cups {coffee black}
PUT Stoves/{id} {pot off}
DELETE /Stoves/{id}/fire
POST /Cups {coffee black}
,廩廩 廚 ,廡廚
...廚 廨廣
:API  廬 廬廚廣
ALTERNATIVES
NEVER HATE YOUR ENEMIES
ITS AFFECTS YOUR JUDGMENT
Alternatives #0
* REST  but smartly
* Adopt standards
* Get Things Done
* REST  but smartly
* Adopt standards
* Get Things Done
PUT vs PATCHPUT vs PATCH
* PUT + GET = BFF
* HTTP 409 conflict
http://jsonpatch.com/
USE Standards - HATEOASUSE Standards - HATEOAS
Alternatives #1
* Query ? GraphQL !* Query ? GraphQL !
For a given user and a
repo, I wish to get all
her comments for
commits
For a given user and a
repo, I wish to get all
her comments for
commits
REST in Peace
REST in Peace
REST in Peace
REST in Peace
RATE LIMIT LIKE ARATE LIMIT LIKE A PEO
Revenge is
a dish best
served cold h
Revenge is
a dish best
served cold h
Alternatives #2
* MicroServices ? RPC !* MicroServices ? RPC !
Alternatives #3
* MicroServices ? Actors!* MicroServices ? Actors!
Alternatives #4
* Async && High throughput ? Queue !* Async && High throughput ? Queue !
REST in Peace
References
* https://www.infoq.com/presentations/rest-graphql
* https://www.youtube.com/watch?v=pspy1H6A3FM&feature=youtu.be
* https://medium.freecodecamp.org/rest-is-the-new-soap-97ff6c09896d

More Related Content

REST in Peace