Upload
restlet
View
967
Download
2
Embed Size (px)
Citation preview
About me
● Created Restlet Framework, first REST framework in 2004
● Contributor to “RESTful Web Services” (O’Reilly, 2007)
● Member of the JAX-RS 1.0 expert group (2007 - 2009)
● Co-author of “Restlet in Action” (Manning, 2012)
● InfoQ editor covering Web APIs since 2014
● CEO & Founder of Restlet, Web API platform vendor
The present of APIsGlue more and more devices
Figuring out API development workflows
One REST API to glue them all?
Data Services
REST API
1 | Code-first & Back-end Driven
Back-end team
Front-end teams
API
Impl
SDK
ClientA
SDK
ClientB
...
...3
1
2
2 | API-first & Back-end Driven
Back-end team
Front-end teams
Impl
SDK
ClientA
SDK
ClientB
...
...2
1Mock
2
API
3 | Collaborative API-first
Back-end team
Front-end teams
Impl
SDK
ClientA
SDK
ClientB
...
...2
1Mock
2
API
Why this won’t work?● #1: Different technical capabilities
○ small screen, big screen, no screen○ input and output schemes○ sensors collecting contextual info○ internet connectivity
● #2: Users expect unique experiences○ care-fully use device capabilities○ apps aware of usage context○ consistent with device UX style
● #3: Different release cycles○ support new devices○ upgrade existing one○ prototype, beta phase, GA○ varying SLAs
→ Learn from the Netflix API experience
http://techblog.netflix.com/search/label/api
An API for each type of device
UXAPI
UXAPI
UXAPI
UXAPI
UXAPI
UXAPI
UXAPI
ServicesData
● Reduce page latency○ group several API calls together based on UI structure ○ adapt formats for faster parsing (JSON, PList, binary, etc.)○ use fastest protocols (HTTP 1.1 / 2.0, MQTT, etc.)
● Improve security○ support unique authentication schemes (Apple TouchID)
● Facilitate development process○ with separate front-end teams○ more flexible release cycles
● Adjust Service Level Agreements (SLAs)○ based on the customer value and business model
● Make sense for all channels, not only devices → Edge APIs○ Internal IT, key partners, open community
Benefits of UX APIs
4 | API-first & Front-end Driven
Back-end team
Front-end teams
Impl
SDK
ClientA
SDK
ClientB
...
...2
1Mock
2
APIMockAPI
Impl
MockAPI
Impl
ServicesData
5 | API-first & Front-end Owned
Back-end team
Front-end teams
Impl
SDK
ClientA
SDK
ClientB
...
...2
1Mock
2
APIMockAPI
Impl
MockAPI
Impl
Data Services
Scratching Edge APIs surface
API Platform
Micro APIs(domain data & logic)
Composite APIs(domain services)
Experience APIs(backends)
User Interfaces(frontends)
Open APIs(public)
End-users
Micro APIs(external SaaS)
Partner devs
● You will find ... other APIs!
● Exposing data and services○ micro-services○ micro-data sets○ internal & external
● How to create, deploy & manage so many APIs?
→ API platforms to the rescue
1 | Homegrown API platforms
● Viable for high-tech companies only
● Netflix API platform○ Runs on top of AWS and Cassandra○ “In some ways, the API is now like an internal PaaS system”
● Netflix open source components○ Nicobar - Dynamic Scripting and Module Loader Framework for Java○ Asgard - Web UI for application deployments and cloud mgt in AWS○ Zuul - Edge service for dynamic routing, monitoring, resiliency, security○ Ribbon - Interprocess comm. lib. with built in software load balancers.○ Archaius - Library for configuration management API○ Turbine - SSE Stream Aggregator
2 | Enterprise API Platforms● Mature solutions from the first wave of API vendors
○ Apigee is the leader with recent IPO○ Mashery now at Intel has been the pioneer○ WS02, StrongLoop and a few others have an open
source angle○ Axway, Boomi, Mulesoft, Tibco and others come from
the integration space
● Often act as gateways or proxies○ between internal IT and connected devices○ on-premise deployment mostly with hybrid cloud
capabilities depending on actors○ often limited API lifecycle support to API management
● Tend to be complex and expensive○ esp. for smaller organizations
3 | API PaaS● More recent solutions aimed at
○ the long tail of API providers and consumers○ small and medium businesses○ citizen integrators within larger organization
● Unique challenges & benefits○ solutions covering more of API lifecycle than just API management○ self service products requiring great UX○ cost-effective pricing based on actual API usage○ complex architectures for high-density multi-tenancy○ includes API hosting and operations capabilities
The Future of APIsFrom Web Pages to Mobile Apps and IoT
● Application of hypermedia for direct consumption by end-users○ based on HTML, CSS, Images, Videos, JavaScript○ on top of Web infrastructure: HTTP, URI and REST○ 1 web API for all web sites → 1 client needed (browser)
1 | Web of Documents → Hypertext
HTML
HTML
HTML
HTML
HTML
HTML
Web Site #1 Web Site #2
● Application of hypermedia for consumption by machines○ based on RDF, JSON-LD, OData, Hypermedia APIs (HAL, ALPS)○ on top of Web infrastructure: HTTP, URI and REST○ few different web APIs, allowing reuse of clients (data browsers)
2 | Web of Data → Hyperdata
Web Site #1 Web Site #2
RDF
RDF
RDF
RDF
RDF
RDF
● Application of hypermedia for developers at design-time○ based on APIs.json, RAML, Swagger, API Blueprint, API Commons○ on top of Web infrastructure: HTTP, URI and REST○ exponential growth of APIs x versions factor
3 | Web of APIs → HyperAPI
API
API
API
API
API
API
Mobile App #1 Mobile App #2
● 1 | API discoverability○ curation, selection○ technical consumption○ promotion
● 2 | API crafting○ web IDEs○ hyperAPI assembly○ semantic data mapping
● 3 | API delivery○ low latency○ high availability○ elastic scalability○ pervasive security
→ A whole new API Stack
Our API challenges