Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
APIs & Underlying Protocols
Lessons · Semantics · Trends
@andreisavu #APICraftSF
Me
Working on Cloudera Director
Previously founder of Axemblr.com
and Java User Group organizer
More on LinkedIn & @andrei...
Goal
Share the idea: There is no silver bullet and
any implementation must ack network laws
From my experience with:
● usi...
A bit of context
On the role of APIs & Web Evolution
http://techblog.netflix.com/2015/02/a-microscope-on-microservices.html
How we build modern applications?
As hybrids
Start: as monolithic systems that use external
APIs (identity, analytics, pay...
What is the role of an API?
Message passing protocol for State Machines
Often seen as replacing libraries in monolithic
sy...
What is the role of an API?
Message passing protocol for State Machines
Better: Writing and reading messages on a
synchron...
Fashion-Driven-Development
Are you done rewriting your app in / on X!?
Reinventing the wheel?
Often too young to know better?
(simple vs. simplistic approaches)
Doing CORBA again?! (1991)
Good API / Bad API
acknowledge the distributed nature of the app
actual choice of technology is orthogonal
Network is not reliable
Partial failures, Timeouts, Partitions,
At-least once message delivery
Latency is not zero
Or predictable. Jitter. Stranglers.
Bandwidth is limited
Fanout. Object size. Compression. Capacity
The network is not secure
Identity, Authorization, Encryption, Throttling
Topology does change
Endpoint discovery. Versioning, DNS
Transport cost is not zero
CPU, Contention, Syscalls, GC
There are multiple operators
A system controlled by multiple entities
Network is heterogeneous
No one size fits all
Your API is as good as
your client library
Users writing their own doesn’t really work
(especially for static languages)
Not all protocols are equal
Wide adoption has important network effects
Gravity. Fashion vs. Technical Merits
How did REST-like succeed?
Mix: HTTP, Thin Spec, Partial Adherence
Piggyback on: CDNs, Proxies, Tooling etc.
HTTP/1 → HTTP/2
HTTP/2: new framing layer
maintains HTTP paradigm
same URL structure (including TLS)
designed for 1:1 conversion at proxy
...
APIs better suited for:
● low cost batch operations
● lower latency
● compatibility with next gen CDNs
● downside: more co...
Take aways
There are no silver bullets
There has to be substance behind fashion
Rewriting everything is the norm
Acknowled...
Thanks! Questions?
asavu@apache.org
@andreisavu
APIs & Underlying Protocols #APICraftSF
APIs & Underlying Protocols #APICraftSF
APIs & Underlying Protocols #APICraftSF
APIs & Underlying Protocols #APICraftSF
Upcoming SlideShare
Loading in …5
×

APIs & Underlying Protocols #APICraftSF

1,054 views

Published on

My slides from a talk about APIs and their relationship to various network protocols, older and new ones and how that defines some of the characteristics that describe high quality implementation.

Published in: Technology
  • Be the first to comment

APIs & Underlying Protocols #APICraftSF

  1. 1. APIs & Underlying Protocols Lessons · Semantics · Trends @andreisavu #APICraftSF
  2. 2. Me Working on Cloudera Director Previously founder of Axemblr.com and Java User Group organizer More on LinkedIn & @andreisavu
  3. 3. Goal Share the idea: There is no silver bullet and any implementation must ack network laws From my experience with: ● using multiple cloud provider APIs ● using distributed systems (Zookeeper) ● writing clients & APIs (jclouds, Director)
  4. 4. A bit of context On the role of APIs & Web Evolution
  5. 5. http://techblog.netflix.com/2015/02/a-microscope-on-microservices.html
  6. 6. How we build modern applications? As hybrids Start: as monolithic systems that use external APIs (identity, analytics, payments, email etc.) Evolve: collections of services with cohesive APIs (map to organizational boundaries)
  7. 7. What is the role of an API? Message passing protocol for State Machines Often seen as replacing libraries in monolithic systems. Dangerous: doesn’t account for network semantics (reason why RPC failed)
  8. 8. What is the role of an API? Message passing protocol for State Machines Better: Writing and reading messages on a synchronous queue (producer / consumer). Matches transport layer semantics.
  9. 9. Fashion-Driven-Development Are you done rewriting your app in / on X!?
  10. 10. Reinventing the wheel? Often too young to know better? (simple vs. simplistic approaches)
  11. 11. Doing CORBA again?! (1991)
  12. 12. Good API / Bad API acknowledge the distributed nature of the app actual choice of technology is orthogonal
  13. 13. Network is not reliable Partial failures, Timeouts, Partitions, At-least once message delivery
  14. 14. Latency is not zero Or predictable. Jitter. Stranglers.
  15. 15. Bandwidth is limited Fanout. Object size. Compression. Capacity
  16. 16. The network is not secure Identity, Authorization, Encryption, Throttling
  17. 17. Topology does change Endpoint discovery. Versioning, DNS
  18. 18. Transport cost is not zero CPU, Contention, Syscalls, GC
  19. 19. There are multiple operators A system controlled by multiple entities
  20. 20. Network is heterogeneous No one size fits all
  21. 21. Your API is as good as your client library Users writing their own doesn’t really work (especially for static languages)
  22. 22. Not all protocols are equal Wide adoption has important network effects Gravity. Fashion vs. Technical Merits
  23. 23. How did REST-like succeed? Mix: HTTP, Thin Spec, Partial Adherence Piggyback on: CDNs, Proxies, Tooling etc.
  24. 24. HTTP/1 → HTTP/2
  25. 25. HTTP/2: new framing layer maintains HTTP paradigm same URL structure (including TLS) designed for 1:1 conversion at proxy allows for server push http://daniel.haxx.se/http2/
  26. 26. APIs better suited for: ● low cost batch operations ● lower latency ● compatibility with next gen CDNs ● downside: more complex clients … but the devil is in the details. What we can hope w/ HTTP/2?
  27. 27. Take aways There are no silver bullets There has to be substance behind fashion Rewriting everything is the norm Acknowledge transport layer restrictions Technology as a mean-to-an-end
  28. 28. Thanks! Questions? asavu@apache.org @andreisavu

×