API Zen For Developers Steven Willmott 3scale Inc @3scale - http://www.3scale.net
API Zen For Developers
Steven Willmott3scale Inc
@3scale - http://www.3scale.net
On Demand API Infrastructure: http://3scale.net @3scale
me: @njyx on twitter
Powering 450 APIsBillions API Calls / Month
Chicago 24-26th Septemberhttp://www.apistrategyconference.com
To the Content…
“Software is Eating the World”
Marc Andreessen – WSJ / August 2011
“APIs are Eating Software”
API Days San Francisco 2013
Almost every major industry is becoming software driven
MusicRetail Video Telephony
Meaning:
…
Examples
Lytro: “Software Defined Cameras”
Philips Hue: “Software ControlledLighting”
Amazon: “Software Driven Retail”
Pixar: “Software powered animation”
APIs Are Changing the Way we Write Software
But also:
API Based App Development
How are APIs Changing Application Development?
APIs are the new “Libs”
“In computer science, a library is a collection of implementations of behavior, written in terms of a language, that has a well-defined interface by which the behavior is invoked”
Credit: Wikipedia
Download & Add to Classpath
Became
Find and Integrate
Speed (Time to Market)
e.g. + Devops Borat
e.g.(Top Mashup on
Progr Web)
Richness / Functionality
e.g.
e.g.
Offboarding
e.g.
e.g.
(Rich Photo EffectsFor Mobile by SDK)
(Monitoring System in the Cloud)
Reliability
e.g.
e.g.
(Email by API)
(Amazon S3)
Mobile & Non Mobile
Single Page Apps
Buddhist Principles
Four Noble Truths
1. To live means to suffer.
2. The origin of suffering is attachment.
3. The cessation of suffering is attainable.
4. The path to the cessation of suffering.
To live means to suffer
Human beings are not perfect. Likewise, the world inhabited by them is also
ridden with imperfections.
The origin of suffering is attachment
the attachment to the desire to have (craving) and the desire not to have
(aversion)
The cessation of suffering is attainable
This liberation from attachment and sorrow frees the mind of all troubles
and worries.
The path to the cessation of suffering
Lead a Balanced life by following the Eightfold path which is a 'gradual
path of self-improvement'
Four Noble Truths of (Modern) App Development
1. There will be suffering – APIs and Tools are imperfect, likewise the world created by them.
2. Suffering is attachment – Dependencies create pain, breakages, frustration, as do unmet expectations.
3. The cessation of suffering is attainable – liberation from hard dependencies, graceful failure, alternatives, .
4. The path to the cessation of suffering – Wisdom in what is going to happen, Good Behaviour , putting your efforts into the right things.
APIs Inside…
The Eightfold Path is Zen
The Eightfold Path
• The right view
• The right thought
• The right speech
• The right action
• The right Livelyhood
• The right Effort
• The right Mindfullness
• The right Concentration
}
}}
Wisdom
Ethical Conduct
Concentration
Back to the Real World
Recognize the opportunity and Chaos of API Powered APP Development
The Imperfect World
Software Before 1995 Software 1995 – 2010 Software 2010 -
APIs are NOT Like Libs…
They Change & Break
Beware of the Type of API & App
VIEW = FORM
MODEL = DATA
CONTROLLER = BUSINESS LOGIC
Model
View Controller
How Attached are you…?
To Live means to suffer
Apps Tend to be Complex
10 Hard Things About Attachment…
• Interface Definition & Consistency
• Latency
• Slow or Dead?
• Distributed State Synchronization
• Remote Clock Problems
• Error Detection
• Change Management
• Static & Dynamic Testing
• Code Validation / Verification
• Frame Problems
But Wait…
It’s even harder than that …
Distributed Across Organizational Boundaries
• No access to source code
• No knowledge of Server Environment
• Security and Access Permissions Everywhere
• Identity Problems
• Shared Semantics are much harder to achieve
• Unknown / Mismatched Scale Issues
• Danger of Much Wider Interdependencies –Frame problem is worse!)
Most of these problems are completely unaddressed
Need to be if we are to reach 100’s of thousands of APIs
Progress Today
R&D / Experimental
• Distributed Verification
• Distributed Systems Contracts
• Semantic Web Ontologies
• Service Descriptions?
Tools
• API Science, API Metrics
• APITools, Runscope
• API-Hub
• Swagger
• Pingdom et. al.
Lots of Interesting Problems to be Solved!
Stuff We Do
Make APIs Better…
• http://3scale.net
• Onboarding, Docs, Version Management, Communications, …
Help Developers…
• http://apitools.com
• Track & manipulate traffic, alert, cache, analyze, …
Strategies to Avoid Headaches
API Provider
• Publish Specifications
• Handle Versioning Carefully
• Provision for Scale & Rate Limit
• Code Libraries
• Buffers, Queues, Webhooksand Asychronous Responses
• Multiple Data Centers
Tools
• Monitoring
• Caching
• Mocks for Testing
• Buffers & Queues
• Failover Services
• Graceful Failure Modes
• Assume Failure Will happen
Conclusions
Take Away’s
1
2
API Driven Development is an Awesome new Frontier
But it’s incredibly hard if you get attached
=>Take a deep breath and find the Zen path to distributed systems..
Keep Building!
@njyx, @3scale
We make awesome API management tools:
http://www.3scale.net/