SlideShare ist ein Scribd-Unternehmen logo
1 von 27
Downloaden Sie, um offline zu lesen
Mobile First… or maybe second. 
APICon 2014 
Tyler Singletary, Director of Platform 
tyler@klout.com ; @harmophone
Thinking about mobile means 
thinking about APIs 
2 
(but I don’t have to tell you that)
How Klout Evolved Its APIs 
3 
Klout’s Partner API in 
2010-2011: 
• Not Mobile Optimized 
• Not Used on Klout.com 
• Not Extensible. 
• XML and JSON response 
• No Mobile Web Experience 
• Easy Data in 1 Call 
Klout’s API Strategy in 
2012+: 
• Acquired Blockboard 
• Redesigned Central API 
• Entitlement System for 
Klout.com, Mobile, Partners 
• Mobile Web 
• JSON Only 
• Easy Data in 2 Calls for 
Partners
Any product is full of tradeoffs. 
• We redesigned APIs for 
Klout.com and our 1st-party 
mobile App first. 
• The Partner API drove 
some of the 
requirements, but always 
would be based on the 
Master API (with hidden 
data) 
• The Mobile API payloads 
are optimized for mobile 
and its specific functions. 
4 
Partner API 
• Crowdsourced 
Mobile Apps 
•CRM, 
Enterprise 
• Consumer 
Master 
API 
Klout.com 
•Mobile 
Klout.com 
Mobile API 
•Official Klout 
App 
• Cinch
Let’s try Mobile Second (sort of) 
5
Different use cases… same API 
/user.json/1 
• Klout.com can make several calls, and has expanded feature set. Fullest 
payloads. Complete user profile! 
• Partner API needs a very sanitized, limited payload. Just the user’s score. 
• Mobile API needs this current user, but also should get all other users 
6
Entitlements 
• Can be implemented by header, query parameter, or other means. 
• No need to build second endpoint for each use case 
• Requires dedicated engineering rigor to be consistent 
7
Klout Mobile iOS 1.0 
8 
All data in one 
payload. 
{ 
response: { 
user: { 
kloutId: "478569", 
nick: "harmophone", 
name: { 
firstName: "devty", 
lastName: "T" 
}, 
image: { 
network: { 
identifier: "tw", 
number: 1 
}, 
urlTiny: 
"http://a0.twimg.com/profile_images/23083 
33289/7s7abq8j02kuxf84g7ig_normal.jpeg", 
urlSmall: 
"http://a0.twimg.com/profile_images/23083 
33289/7s7abq8j02kuxf84g7ig_reasonably_s 
mall.jpeg", 
urlMedium: 
"http://a0.twimg.com/profile_images/23083 
33289/7s7abq8j02kuxf84g7ig_reasonably_s 
mall.jpeg", 
urlLarge: 
"http://a0.twimg.com/profile_images/23083 
33289/7s7abq8j02kuxf84g7ig.jpeg", 
networkImage: 
"http://a0.twimg.com/profile_images/23083 
33289/7s7abq8j02kuxf84g7ig_normal.jpeg" 
}, 
bio: "Adagio assai. Klout Devangelist.", 
bioSource: "tw", 
score: { 
score: 47.620975824983596, 
trueReach: 537 
}, 
scoreDeltas: { 
dayChange: -0.16153993062354743, 
weekChange: -0.5384216786696854, 
monthChange: -1.8510836286192287 
}, 
connectedNetworks: [ 
{ 
id: “", 
network: "tw" 
} 
], 
hasMobile: true 
}, 
topics: […], 
sourceOfInfluence: { 
myInfluencers: […], 
myInfluencees: […], 
}, 
preferences: {}, 
scoreHistory: {}, 
stats: { }, 
networkContributions: { } 
}, 
responseTime: 44 
}
Let’s try Mobile First! (and only!) 
9
Klout’s Cinch APIs 
View-oriented 
payloads 
10
Let’s get balanced 
11
Optimizing APIs for both allows UX to 
dominate 
Web Mobile 2.0 iOS/Android
Serve not only yourself, but others… 
• We should have branched another 
“Mobile Partner API” to ease in partner 
development of mobile apps utilizing 
our API. 
13 
Partner API 
• CRM, 
Enterprise 
• Consumer 
Master 
API 
Mobile API 
• Official Klout 
App 
• Cinch 
Mobile 
Partner API 
• Appboy 
Klout.com 
November 2013 Update: 
We still haven’t done this.  
May 2014 Update: 
We still haven’t done this. :(
I feel like this is all so familiar. 
14
Classic Client Server Design Principles 
Server 
• Talks to all external 
APIs 
• Proxy and repackage 
content exactly how 
the app needs it 
• Truth 
Client/App 
• Talks only to Server, 
except for auth (but 
even then…) 
• Temporary storage for 
UX and rendering 
• Maybe Truth 
15
Mobile Clients and Hardware Dictate Challenges 
Data transfer rate 
is typically slower 
Delivering data to a 
device costs the 
consumer money 
Any one or more 
requests can fail. 
And will. 
Apps collecting 
from multiple 
sources will be 
slow. Latency. 
Device diversity, 
processing power, 
multitasking, 
storage 
Mobile 
development has a 
slower cycle due to 
App Publishing 
APIs Change. Apps 
change. Not 
always in sync. 
16
The Main Conflict 
17 
Larger 
Data 
Payload 
Less 
Requests 
• Quick bursts of dense 
information 
• Just the facts 
• But extensible
Lessons Learned 
18
How Do You Protect Against These Challenges? 
Remove 
extraneous 
data 
Deliver large 
payloads, 
fewer requests 
Real work 
should be done 
on the server 
Try, try, again. 
But not too 
much. 
Graceful 
Degregation 
Classic Client Server Principles 19
Failure is Routine. Plan for it. 
20 
Requests 
User 
Detail 
Twitter Stream 
Server 
User 
Detail 
Twitter Stream 
App – 3G 
User 
Deta- 
------ 
------ 
----tream 
It’s a race against time!
The Problem With SOAP 
• Tons of Extraneous Data. 
• Big payload. 
• Processing response holds UI latency. 
• Out of fashion for big data, social, web at 
large. 
The Good: 
• Type safety! 
• Fast Infoset standard. “The GZIP for 
XML!” 
21
The Problem With REST and JSON 
• Resource collections and objects aren’t always best 
• Non-optimized APIs require tons of individual requests 
• Various interpretations of what REST is and isn’t 
• Error Handling gets weird with arrays/collections and mobile nuance 
• While not strictly part of REST, typically JSON. 
22
Best Practices 
• Envelopes are an essential way to control and react to change, impress an 
update. 
• Entitlements allow you to reform and segment your API for use cases 
• Default to POST and PUT with arrays, even for single record updates. 
• Reference both URLs to resources as well as content_ids 
23
More Best Practices 
• GZIP or compress responses whenever possible 
• OAuth/xAuth for authentication. Don’t roll your own. 
• Return collections with reasonable limits. Employ params or headers. 
• Version on a per-endpoint basis. Adopt easy, programmatic versioning. 
• Clients should identify themselves thoroughly. Version, platform, etc. It’s 
shipped software. The API needs to know who it’s talking to. 
• Be able to specify a “critical read” -> indicating acceptance of longer 
latency or bypassing cache responses 
24
Error states and hypermedia 
• Use HTTP status when appropriate 
• Server-side errors need clarity and extensibility, like exceptions. 
– Utilize custom schemes (-10, -11, etc.) 
– Use 500-504, but provide codified directive error messages inside. 
• Require server to return a handshake at the end of Writes: in addition to 
positive status codes, return a positive ACK that a server handled the write. 
• Potential Standards (Hypermedia to the rescue!): 
– Bon Longden’s vnd.error : https://github.com/blongden/vnd.error 
25
Summary 
Design for Mobile APIs: 
• both internal and external 
• Use entitlements and API Management 
Mobile payloads: 
• data rich, extensible, lean on the DDL 
and extras. Low # of calls. 
Mobile Envelope: 
• should become a standard way of 
change management 
26 
{ 
"response":{}, 
"responseTime":26, 
"interstitial":{ 
"url": "http://m.klout.com/upgrade", 
} 
} 
Master API -> Partner API 
Mobile API, Mobile Partner API
Mobile First… or maybe second. 
APICon 2014 
Tyler Singletary, Director of Platform 
tyler@klout.com ; @harmophone

Weitere ähnliche Inhalte

Was ist angesagt?

Dc meetup-pure-api-led-connectivity-16x9
Dc meetup-pure-api-led-connectivity-16x9Dc meetup-pure-api-led-connectivity-16x9
Dc meetup-pure-api-led-connectivity-16x9Bruce Schonk -PMP, MBA
 
apidays LIVE Australia - The Evolution of APIs: Events and the AsyncAPI speci...
apidays LIVE Australia - The Evolution of APIs: Events and the AsyncAPI speci...apidays LIVE Australia - The Evolution of APIs: Events and the AsyncAPI speci...
apidays LIVE Australia - The Evolution of APIs: Events and the AsyncAPI speci...apidays
 
Mule : Building Blocks for Microservices
Mule : Building Blocks for MicroservicesMule : Building Blocks for Microservices
Mule : Building Blocks for MicroservicesAnirudh Pandit
 
apidays LIVE Paris - Deploy fast with confidence by Gregory Ouillon
apidays LIVE Paris - Deploy fast with confidence by Gregory Ouillonapidays LIVE Paris - Deploy fast with confidence by Gregory Ouillon
apidays LIVE Paris - Deploy fast with confidence by Gregory Ouillonapidays
 
Driving Digital Innovation with a Layered API Design Approach
Driving Digital Innovation with a Layered API Design ApproachDriving Digital Innovation with a Layered API Design Approach
Driving Digital Innovation with a Layered API Design ApproachAkana
 
Mulesoft Anypoint platform for APIs
Mulesoft Anypoint platform for APIsMulesoft Anypoint platform for APIs
Mulesoft Anypoint platform for APIskumar gaurav
 
apidays LIVE Paris - Practical API strategy with APIOps Cycles by Marjukka Ni...
apidays LIVE Paris - Practical API strategy with APIOps Cycles by Marjukka Ni...apidays LIVE Paris - Practical API strategy with APIOps Cycles by Marjukka Ni...
apidays LIVE Paris - Practical API strategy with APIOps Cycles by Marjukka Ni...apidays
 
Xamarin Mobile Leaders Summit: The Mobile Mind Shift: Opportunities, Challeng...
Xamarin Mobile Leaders Summit: The Mobile Mind Shift: Opportunities, Challeng...Xamarin Mobile Leaders Summit: The Mobile Mind Shift: Opportunities, Challeng...
Xamarin Mobile Leaders Summit: The Mobile Mind Shift: Opportunities, Challeng...Xamarin
 
apidays LIVE Australia - Events are Cool Again! by Nelson Petracek
apidays LIVE Australia -  Events are Cool Again! by Nelson Petracekapidays LIVE Australia -  Events are Cool Again! by Nelson Petracek
apidays LIVE Australia - Events are Cool Again! by Nelson Petracekapidays
 
Success with APIs: A Checklist
Success with APIs: A ChecklistSuccess with APIs: A Checklist
Success with APIs: A ChecklistCA Technologies
 
Developer Support Models: Calibrating Service Level to Commitment
Developer Support Models: Calibrating Service Level to CommitmentDeveloper Support Models: Calibrating Service Level to Commitment
Developer Support Models: Calibrating Service Level to CommitmentNordic APIs
 
Improve Customer Engagement and Loyalty with Oracle Engagement Cloud
Improve Customer Engagement and Loyalty with Oracle Engagement CloudImprove Customer Engagement and Loyalty with Oracle Engagement Cloud
Improve Customer Engagement and Loyalty with Oracle Engagement CloudPerficient, Inc.
 
apidays LIVE New York 2021 - Design-First: How to champion an API culture shi...
apidays LIVE New York 2021 - Design-First: How to champion an API culture shi...apidays LIVE New York 2021 - Design-First: How to champion an API culture shi...
apidays LIVE New York 2021 - Design-First: How to champion an API culture shi...apidays
 
API Management in Digital Transformation
API Management in Digital TransformationAPI Management in Digital Transformation
API Management in Digital TransformationAditya Thatte
 
API Strategy Introduction
API Strategy IntroductionAPI Strategy Introduction
API Strategy IntroductionDoug Gregory
 
API Driven IoT Insights Revolutionize Beer Inventory Management at Buffalo Wi...
API Driven IoT Insights Revolutionize Beer Inventory Management at Buffalo Wi...API Driven IoT Insights Revolutionize Beer Inventory Management at Buffalo Wi...
API Driven IoT Insights Revolutionize Beer Inventory Management at Buffalo Wi...MuleSoft
 
Distributed Digital Manufacturing – How APIs are Powering the Next Industrial...
Distributed Digital Manufacturing – How APIs are Powering the Next Industrial...Distributed Digital Manufacturing – How APIs are Powering the Next Industrial...
Distributed Digital Manufacturing – How APIs are Powering the Next Industrial...Nordic APIs
 
How Customers are Building and Using their Own Connectors
How Customers are Building and Using their Own ConnectorsHow Customers are Building and Using their Own Connectors
How Customers are Building and Using their Own ConnectorsMuleSoft
 
Building an API Platform for Digital Transformation
Building an API Platform for Digital TransformationBuilding an API Platform for Digital Transformation
Building an API Platform for Digital TransformationWSO2
 

Was ist angesagt? (20)

Dc meetup-pure-api-led-connectivity-16x9
Dc meetup-pure-api-led-connectivity-16x9Dc meetup-pure-api-led-connectivity-16x9
Dc meetup-pure-api-led-connectivity-16x9
 
apidays LIVE Australia - The Evolution of APIs: Events and the AsyncAPI speci...
apidays LIVE Australia - The Evolution of APIs: Events and the AsyncAPI speci...apidays LIVE Australia - The Evolution of APIs: Events and the AsyncAPI speci...
apidays LIVE Australia - The Evolution of APIs: Events and the AsyncAPI speci...
 
Mule : Building Blocks for Microservices
Mule : Building Blocks for MicroservicesMule : Building Blocks for Microservices
Mule : Building Blocks for Microservices
 
apidays LIVE Paris - Deploy fast with confidence by Gregory Ouillon
apidays LIVE Paris - Deploy fast with confidence by Gregory Ouillonapidays LIVE Paris - Deploy fast with confidence by Gregory Ouillon
apidays LIVE Paris - Deploy fast with confidence by Gregory Ouillon
 
Driving Digital Innovation with a Layered API Design Approach
Driving Digital Innovation with a Layered API Design ApproachDriving Digital Innovation with a Layered API Design Approach
Driving Digital Innovation with a Layered API Design Approach
 
Mulesoft Anypoint platform for APIs
Mulesoft Anypoint platform for APIsMulesoft Anypoint platform for APIs
Mulesoft Anypoint platform for APIs
 
apidays LIVE Paris - Practical API strategy with APIOps Cycles by Marjukka Ni...
apidays LIVE Paris - Practical API strategy with APIOps Cycles by Marjukka Ni...apidays LIVE Paris - Practical API strategy with APIOps Cycles by Marjukka Ni...
apidays LIVE Paris - Practical API strategy with APIOps Cycles by Marjukka Ni...
 
Xamarin Mobile Leaders Summit: The Mobile Mind Shift: Opportunities, Challeng...
Xamarin Mobile Leaders Summit: The Mobile Mind Shift: Opportunities, Challeng...Xamarin Mobile Leaders Summit: The Mobile Mind Shift: Opportunities, Challeng...
Xamarin Mobile Leaders Summit: The Mobile Mind Shift: Opportunities, Challeng...
 
apidays LIVE Australia - Events are Cool Again! by Nelson Petracek
apidays LIVE Australia -  Events are Cool Again! by Nelson Petracekapidays LIVE Australia -  Events are Cool Again! by Nelson Petracek
apidays LIVE Australia - Events are Cool Again! by Nelson Petracek
 
Success with APIs: A Checklist
Success with APIs: A ChecklistSuccess with APIs: A Checklist
Success with APIs: A Checklist
 
Developer Support Models: Calibrating Service Level to Commitment
Developer Support Models: Calibrating Service Level to CommitmentDeveloper Support Models: Calibrating Service Level to Commitment
Developer Support Models: Calibrating Service Level to Commitment
 
Improve Customer Engagement and Loyalty with Oracle Engagement Cloud
Improve Customer Engagement and Loyalty with Oracle Engagement CloudImprove Customer Engagement and Loyalty with Oracle Engagement Cloud
Improve Customer Engagement and Loyalty with Oracle Engagement Cloud
 
apidays LIVE New York 2021 - Design-First: How to champion an API culture shi...
apidays LIVE New York 2021 - Design-First: How to champion an API culture shi...apidays LIVE New York 2021 - Design-First: How to champion an API culture shi...
apidays LIVE New York 2021 - Design-First: How to champion an API culture shi...
 
API Management in Digital Transformation
API Management in Digital TransformationAPI Management in Digital Transformation
API Management in Digital Transformation
 
API Strategy Introduction
API Strategy IntroductionAPI Strategy Introduction
API Strategy Introduction
 
API Driven IoT Insights Revolutionize Beer Inventory Management at Buffalo Wi...
API Driven IoT Insights Revolutionize Beer Inventory Management at Buffalo Wi...API Driven IoT Insights Revolutionize Beer Inventory Management at Buffalo Wi...
API Driven IoT Insights Revolutionize Beer Inventory Management at Buffalo Wi...
 
Distributed Digital Manufacturing – How APIs are Powering the Next Industrial...
Distributed Digital Manufacturing – How APIs are Powering the Next Industrial...Distributed Digital Manufacturing – How APIs are Powering the Next Industrial...
Distributed Digital Manufacturing – How APIs are Powering the Next Industrial...
 
Definitive Guide to API Management
Definitive Guide to API ManagementDefinitive Guide to API Management
Definitive Guide to API Management
 
How Customers are Building and Using their Own Connectors
How Customers are Building and Using their Own ConnectorsHow Customers are Building and Using their Own Connectors
How Customers are Building and Using their Own Connectors
 
Building an API Platform for Digital Transformation
Building an API Platform for Digital TransformationBuilding an API Platform for Digital Transformation
Building an API Platform for Digital Transformation
 

Ähnlich wie Building A Mobile First API When You're Not Mobile First - Tyler Singletary

Mobile First (or maybe second) API Development
Mobile First (or maybe second) API DevelopmentMobile First (or maybe second) API Development
Mobile First (or maybe second) API DevelopmentTyler Singletary
 
WSO2Con US 2013 - Connected Business - making it happen
WSO2Con US 2013 - Connected Business - making it happenWSO2Con US 2013 - Connected Business - making it happen
WSO2Con US 2013 - Connected Business - making it happenWSO2
 
IBM API Connect Deployment `Good Practices - IBM Think 2018
IBM API Connect Deployment `Good Practices - IBM Think 2018IBM API Connect Deployment `Good Practices - IBM Think 2018
IBM API Connect Deployment `Good Practices - IBM Think 2018Chris Phillips
 
Micro Service Architecture
Micro Service ArchitectureMicro Service Architecture
Micro Service ArchitectureEduards Sizovs
 
Designing your API Server for mobile apps
Designing your API Server for mobile appsDesigning your API Server for mobile apps
Designing your API Server for mobile appsMugunth Kumar
 
EduID Mobile App - Use-Cases, Concepts and Implementation
EduID Mobile App - Use-Cases, Concepts and ImplementationEduID Mobile App - Use-Cases, Concepts and Implementation
EduID Mobile App - Use-Cases, Concepts and ImplementationChristian Glahn
 
[TTT Meetup] Enhance mobile app testing with performance-centric strategies (...
[TTT Meetup] Enhance mobile app testing with performance-centric strategies (...[TTT Meetup] Enhance mobile app testing with performance-centric strategies (...
[TTT Meetup] Enhance mobile app testing with performance-centric strategies (...NITHIN S.S
 
Architectural considerations when building an API
Architectural considerations when building an APIArchitectural considerations when building an API
Architectural considerations when building an APIRod Hemphill
 
Gcp intro-20160721
Gcp intro-20160721Gcp intro-20160721
Gcp intro-20160721Haeseung Lee
 
API Security - OWASP top 10 for APIs + tips for pentesters
API Security - OWASP top 10 for APIs + tips for pentestersAPI Security - OWASP top 10 for APIs + tips for pentesters
API Security - OWASP top 10 for APIs + tips for pentestersInon Shkedy
 
Introduction to SignalR
Introduction to SignalRIntroduction to SignalR
Introduction to SignalRAdam Mokan
 
Better Deployments with Sub Environments Using Spring Cloud and Netflix Ribbon
Better Deployments with Sub Environments Using Spring Cloud and Netflix RibbonBetter Deployments with Sub Environments Using Spring Cloud and Netflix Ribbon
Better Deployments with Sub Environments Using Spring Cloud and Netflix RibbonVMware Tanzu
 
Transforming Consumer Banking with a 100% Cloud-Based Bank (FSV204) - AWS re:...
Transforming Consumer Banking with a 100% Cloud-Based Bank (FSV204) - AWS re:...Transforming Consumer Banking with a 100% Cloud-Based Bank (FSV204) - AWS re:...
Transforming Consumer Banking with a 100% Cloud-Based Bank (FSV204) - AWS re:...Amazon Web Services
 
Brushing skills on SignalR for ASP.NET developers
Brushing skills on SignalR for ASP.NET developersBrushing skills on SignalR for ASP.NET developers
Brushing skills on SignalR for ASP.NET developersONE BCG
 
Chapter 11:Understanding Client-Side Technologies
Chapter 11:Understanding Client-Side TechnologiesChapter 11:Understanding Client-Side Technologies
Chapter 11:Understanding Client-Side TechnologiesIt Academy
 
Doug Sillars on App Optimization
Doug Sillars on App OptimizationDoug Sillars on App Optimization
Doug Sillars on App Optimizationwipjam
 
MongoDB .local Houston 2019: Building an IoT Streaming Analytics Platform to ...
MongoDB .local Houston 2019: Building an IoT Streaming Analytics Platform to ...MongoDB .local Houston 2019: Building an IoT Streaming Analytics Platform to ...
MongoDB .local Houston 2019: Building an IoT Streaming Analytics Platform to ...MongoDB
 

Ähnlich wie Building A Mobile First API When You're Not Mobile First - Tyler Singletary (20)

Mobile APIs in Practice
Mobile APIs in PracticeMobile APIs in Practice
Mobile APIs in Practice
 
Mobile First (or maybe second) API Development
Mobile First (or maybe second) API DevelopmentMobile First (or maybe second) API Development
Mobile First (or maybe second) API Development
 
WSO2Con US 2013 - Connected Business - making it happen
WSO2Con US 2013 - Connected Business - making it happenWSO2Con US 2013 - Connected Business - making it happen
WSO2Con US 2013 - Connected Business - making it happen
 
IBM API Connect Deployment `Good Practices - IBM Think 2018
IBM API Connect Deployment `Good Practices - IBM Think 2018IBM API Connect Deployment `Good Practices - IBM Think 2018
IBM API Connect Deployment `Good Practices - IBM Think 2018
 
Micro Service Architecture
Micro Service ArchitectureMicro Service Architecture
Micro Service Architecture
 
Designing your API Server for mobile apps
Designing your API Server for mobile appsDesigning your API Server for mobile apps
Designing your API Server for mobile apps
 
EduID Mobile App - Use-Cases, Concepts and Implementation
EduID Mobile App - Use-Cases, Concepts and ImplementationEduID Mobile App - Use-Cases, Concepts and Implementation
EduID Mobile App - Use-Cases, Concepts and Implementation
 
[TTT Meetup] Enhance mobile app testing with performance-centric strategies (...
[TTT Meetup] Enhance mobile app testing with performance-centric strategies (...[TTT Meetup] Enhance mobile app testing with performance-centric strategies (...
[TTT Meetup] Enhance mobile app testing with performance-centric strategies (...
 
Architectural considerations when building an API
Architectural considerations when building an APIArchitectural considerations when building an API
Architectural considerations when building an API
 
Gcp intro-20160721
Gcp intro-20160721Gcp intro-20160721
Gcp intro-20160721
 
API Security - OWASP top 10 for APIs + tips for pentesters
API Security - OWASP top 10 for APIs + tips for pentestersAPI Security - OWASP top 10 for APIs + tips for pentesters
API Security - OWASP top 10 for APIs + tips for pentesters
 
Introduction to SignalR
Introduction to SignalRIntroduction to SignalR
Introduction to SignalR
 
Better Deployments with Sub Environments Using Spring Cloud and Netflix Ribbon
Better Deployments with Sub Environments Using Spring Cloud and Netflix RibbonBetter Deployments with Sub Environments Using Spring Cloud and Netflix Ribbon
Better Deployments with Sub Environments Using Spring Cloud and Netflix Ribbon
 
Transforming Consumer Banking with a 100% Cloud-Based Bank (FSV204) - AWS re:...
Transforming Consumer Banking with a 100% Cloud-Based Bank (FSV204) - AWS re:...Transforming Consumer Banking with a 100% Cloud-Based Bank (FSV204) - AWS re:...
Transforming Consumer Banking with a 100% Cloud-Based Bank (FSV204) - AWS re:...
 
Brushing skills on SignalR for ASP.NET developers
Brushing skills on SignalR for ASP.NET developersBrushing skills on SignalR for ASP.NET developers
Brushing skills on SignalR for ASP.NET developers
 
Anypoint Data Graphs
Anypoint Data GraphsAnypoint Data Graphs
Anypoint Data Graphs
 
Chapter 11:Understanding Client-Side Technologies
Chapter 11:Understanding Client-Side TechnologiesChapter 11:Understanding Client-Side Technologies
Chapter 11:Understanding Client-Side Technologies
 
Doug Sillars on App Optimization
Doug Sillars on App OptimizationDoug Sillars on App Optimization
Doug Sillars on App Optimization
 
MongoDB .local Houston 2019: Building an IoT Streaming Analytics Platform to ...
MongoDB .local Houston 2019: Building an IoT Streaming Analytics Platform to ...MongoDB .local Houston 2019: Building an IoT Streaming Analytics Platform to ...
MongoDB .local Houston 2019: Building an IoT Streaming Analytics Platform to ...
 
APITalkMeetupSharable
APITalkMeetupSharableAPITalkMeetupSharable
APITalkMeetupSharable
 

Mehr von ProgrammableWeb

Building A Business-Facing Mobile Developer Community
Building A Business-Facing Mobile Developer CommunityBuilding A Business-Facing Mobile Developer Community
Building A Business-Facing Mobile Developer CommunityProgrammableWeb
 
Profiting From "Smart City" APIs
Profiting From "Smart City" APIsProfiting From "Smart City" APIs
Profiting From "Smart City" APIsProgrammableWeb
 
Get Your Software Speaking SMS With Esendex
Get Your Software Speaking SMS With EsendexGet Your Software Speaking SMS With Esendex
Get Your Software Speaking SMS With EsendexProgrammableWeb
 
The Future of API Monetization
The Future of API MonetizationThe Future of API Monetization
The Future of API MonetizationProgrammableWeb
 
Open Source And the Internet Of Things
Open Source And the Internet Of ThingsOpen Source And the Internet Of Things
Open Source And the Internet Of ThingsProgrammableWeb
 
Your API Deserves More Respect: Make It A Product
Your API Deserves More Respect: Make It A ProductYour API Deserves More Respect: Make It A Product
Your API Deserves More Respect: Make It A ProductProgrammableWeb
 
Why API Security Is More Complicated Than You Think (and Why It’s Your #1 Pri...
Why API Security Is More Complicated Than You Think (and Why It’s Your #1 Pri...Why API Security Is More Complicated Than You Think (and Why It’s Your #1 Pri...
Why API Security Is More Complicated Than You Think (and Why It’s Your #1 Pri...ProgrammableWeb
 
How And Why To Dogfood Your API
How And Why To Dogfood Your APIHow And Why To Dogfood Your API
How And Why To Dogfood Your APIProgrammableWeb
 
Real World API Business Models That Worked
Real World API Business Models That WorkedReal World API Business Models That Worked
Real World API Business Models That WorkedProgrammableWeb
 
Innovation Showcase: Hugo Fiennes, CEO/Co-Founder, Electric Imp
Innovation Showcase: Hugo Fiennes, CEO/Co-Founder, Electric ImpInnovation Showcase: Hugo Fiennes, CEO/Co-Founder, Electric Imp
Innovation Showcase: Hugo Fiennes, CEO/Co-Founder, Electric ImpProgrammableWeb
 
Innovation showcase: Markus Lanthaler, Developer, Consultant, Researcher,mark...
Innovation showcase: Markus Lanthaler, Developer, Consultant, Researcher,mark...Innovation showcase: Markus Lanthaler, Developer, Consultant, Researcher,mark...
Innovation showcase: Markus Lanthaler, Developer, Consultant, Researcher,mark...ProgrammableWeb
 
ProgrammablaWeb's Innovation Showcase: Stefan Zanetti, Founder/CEO, QIPP
ProgrammablaWeb's Innovation Showcase: Stefan Zanetti, Founder/CEO, QIPPProgrammablaWeb's Innovation Showcase: Stefan Zanetti, Founder/CEO, QIPP
ProgrammablaWeb's Innovation Showcase: Stefan Zanetti, Founder/CEO, QIPPProgrammableWeb
 
Innovation Showcase: David Johnston, Decentralized Application Funds
Innovation Showcase: David Johnston, Decentralized Application FundsInnovation Showcase: David Johnston, Decentralized Application Funds
Innovation Showcase: David Johnston, Decentralized Application FundsProgrammableWeb
 
HTTP APIs as first class procedures in your language: cutting out SDK complex...
HTTP APIs as first class procedures in your language: cutting out SDK complex...HTTP APIs as first class procedures in your language: cutting out SDK complex...
HTTP APIs as first class procedures in your language: cutting out SDK complex...ProgrammableWeb
 
Intro To Orchestrate DBaaS: A Single API For Key/Value, Search, Graph, And Ev...
Intro To Orchestrate DBaaS: A Single API For Key/Value, Search, Graph, And Ev...Intro To Orchestrate DBaaS: A Single API For Key/Value, Search, Graph, And Ev...
Intro To Orchestrate DBaaS: A Single API For Key/Value, Search, Graph, And Ev...ProgrammableWeb
 
Case Study: A Real-World Implementation Of Linked Data
Case Study: A Real-World Implementation Of Linked DataCase Study: A Real-World Implementation Of Linked Data
Case Study: A Real-World Implementation Of Linked DataProgrammableWeb
 
Pivoting Your Business From Product To Platform
Pivoting Your Business From Product To PlatformPivoting Your Business From Product To Platform
Pivoting Your Business From Product To PlatformProgrammableWeb
 
Exploring UK Bus And Train Data With TransportAPI
Exploring UK Bus And Train Data With TransportAPIExploring UK Bus And Train Data With TransportAPI
Exploring UK Bus And Train Data With TransportAPIProgrammableWeb
 
DDD (Delight-Driven Development) Of APIs With RAML
DDD (Delight-Driven Development) Of APIs With RAMLDDD (Delight-Driven Development) Of APIs With RAML
DDD (Delight-Driven Development) Of APIs With RAMLProgrammableWeb
 
Why And How To Leverage Predictive APIs In Any Application
Why And How To Leverage Predictive APIs In Any Application Why And How To Leverage Predictive APIs In Any Application
Why And How To Leverage Predictive APIs In Any Application ProgrammableWeb
 

Mehr von ProgrammableWeb (20)

Building A Business-Facing Mobile Developer Community
Building A Business-Facing Mobile Developer CommunityBuilding A Business-Facing Mobile Developer Community
Building A Business-Facing Mobile Developer Community
 
Profiting From "Smart City" APIs
Profiting From "Smart City" APIsProfiting From "Smart City" APIs
Profiting From "Smart City" APIs
 
Get Your Software Speaking SMS With Esendex
Get Your Software Speaking SMS With EsendexGet Your Software Speaking SMS With Esendex
Get Your Software Speaking SMS With Esendex
 
The Future of API Monetization
The Future of API MonetizationThe Future of API Monetization
The Future of API Monetization
 
Open Source And the Internet Of Things
Open Source And the Internet Of ThingsOpen Source And the Internet Of Things
Open Source And the Internet Of Things
 
Your API Deserves More Respect: Make It A Product
Your API Deserves More Respect: Make It A ProductYour API Deserves More Respect: Make It A Product
Your API Deserves More Respect: Make It A Product
 
Why API Security Is More Complicated Than You Think (and Why It’s Your #1 Pri...
Why API Security Is More Complicated Than You Think (and Why It’s Your #1 Pri...Why API Security Is More Complicated Than You Think (and Why It’s Your #1 Pri...
Why API Security Is More Complicated Than You Think (and Why It’s Your #1 Pri...
 
How And Why To Dogfood Your API
How And Why To Dogfood Your APIHow And Why To Dogfood Your API
How And Why To Dogfood Your API
 
Real World API Business Models That Worked
Real World API Business Models That WorkedReal World API Business Models That Worked
Real World API Business Models That Worked
 
Innovation Showcase: Hugo Fiennes, CEO/Co-Founder, Electric Imp
Innovation Showcase: Hugo Fiennes, CEO/Co-Founder, Electric ImpInnovation Showcase: Hugo Fiennes, CEO/Co-Founder, Electric Imp
Innovation Showcase: Hugo Fiennes, CEO/Co-Founder, Electric Imp
 
Innovation showcase: Markus Lanthaler, Developer, Consultant, Researcher,mark...
Innovation showcase: Markus Lanthaler, Developer, Consultant, Researcher,mark...Innovation showcase: Markus Lanthaler, Developer, Consultant, Researcher,mark...
Innovation showcase: Markus Lanthaler, Developer, Consultant, Researcher,mark...
 
ProgrammablaWeb's Innovation Showcase: Stefan Zanetti, Founder/CEO, QIPP
ProgrammablaWeb's Innovation Showcase: Stefan Zanetti, Founder/CEO, QIPPProgrammablaWeb's Innovation Showcase: Stefan Zanetti, Founder/CEO, QIPP
ProgrammablaWeb's Innovation Showcase: Stefan Zanetti, Founder/CEO, QIPP
 
Innovation Showcase: David Johnston, Decentralized Application Funds
Innovation Showcase: David Johnston, Decentralized Application FundsInnovation Showcase: David Johnston, Decentralized Application Funds
Innovation Showcase: David Johnston, Decentralized Application Funds
 
HTTP APIs as first class procedures in your language: cutting out SDK complex...
HTTP APIs as first class procedures in your language: cutting out SDK complex...HTTP APIs as first class procedures in your language: cutting out SDK complex...
HTTP APIs as first class procedures in your language: cutting out SDK complex...
 
Intro To Orchestrate DBaaS: A Single API For Key/Value, Search, Graph, And Ev...
Intro To Orchestrate DBaaS: A Single API For Key/Value, Search, Graph, And Ev...Intro To Orchestrate DBaaS: A Single API For Key/Value, Search, Graph, And Ev...
Intro To Orchestrate DBaaS: A Single API For Key/Value, Search, Graph, And Ev...
 
Case Study: A Real-World Implementation Of Linked Data
Case Study: A Real-World Implementation Of Linked DataCase Study: A Real-World Implementation Of Linked Data
Case Study: A Real-World Implementation Of Linked Data
 
Pivoting Your Business From Product To Platform
Pivoting Your Business From Product To PlatformPivoting Your Business From Product To Platform
Pivoting Your Business From Product To Platform
 
Exploring UK Bus And Train Data With TransportAPI
Exploring UK Bus And Train Data With TransportAPIExploring UK Bus And Train Data With TransportAPI
Exploring UK Bus And Train Data With TransportAPI
 
DDD (Delight-Driven Development) Of APIs With RAML
DDD (Delight-Driven Development) Of APIs With RAMLDDD (Delight-Driven Development) Of APIs With RAML
DDD (Delight-Driven Development) Of APIs With RAML
 
Why And How To Leverage Predictive APIs In Any Application
Why And How To Leverage Predictive APIs In Any Application Why And How To Leverage Predictive APIs In Any Application
Why And How To Leverage Predictive APIs In Any Application
 

Kürzlich hochgeladen

Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve DecarbonizationUsing IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve DecarbonizationIES VE
 
AI You Can Trust - Ensuring Success with Data Integrity Webinar
AI You Can Trust - Ensuring Success with Data Integrity WebinarAI You Can Trust - Ensuring Success with Data Integrity Webinar
AI You Can Trust - Ensuring Success with Data Integrity WebinarPrecisely
 
UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7DianaGray10
 
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdfIaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdfDaniel Santiago Silva Capera
 
UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6DianaGray10
 
20230202 - Introduction to tis-py
20230202 - Introduction to tis-py20230202 - Introduction to tis-py
20230202 - Introduction to tis-pyJamie (Taka) Wang
 
UiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPathCommunity
 
COMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online CollaborationCOMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online Collaborationbruanjhuli
 
OpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability AdventureOpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability AdventureEric D. Schabell
 
Basic Building Blocks of Internet of Things.
Basic Building Blocks of Internet of Things.Basic Building Blocks of Internet of Things.
Basic Building Blocks of Internet of Things.YounusS2
 
Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)Commit University
 
Building AI-Driven Apps Using Semantic Kernel.pptx
Building AI-Driven Apps Using Semantic Kernel.pptxBuilding AI-Driven Apps Using Semantic Kernel.pptx
Building AI-Driven Apps Using Semantic Kernel.pptxUdaiappa Ramachandran
 
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCostKubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCostMatt Ray
 
How Accurate are Carbon Emissions Projections?
How Accurate are Carbon Emissions Projections?How Accurate are Carbon Emissions Projections?
How Accurate are Carbon Emissions Projections?IES VE
 
Bird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystemBird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystemAsko Soukka
 
Computer 10: Lesson 10 - Online Crimes and Hazards
Computer 10: Lesson 10 - Online Crimes and HazardsComputer 10: Lesson 10 - Online Crimes and Hazards
Computer 10: Lesson 10 - Online Crimes and HazardsSeth Reyes
 
Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024SkyPlanner
 
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...DianaGray10
 

Kürzlich hochgeladen (20)

20150722 - AGV
20150722 - AGV20150722 - AGV
20150722 - AGV
 
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve DecarbonizationUsing IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
 
AI You Can Trust - Ensuring Success with Data Integrity Webinar
AI You Can Trust - Ensuring Success with Data Integrity WebinarAI You Can Trust - Ensuring Success with Data Integrity Webinar
AI You Can Trust - Ensuring Success with Data Integrity Webinar
 
UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7
 
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdfIaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
 
UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6
 
20230104 - machine vision
20230104 - machine vision20230104 - machine vision
20230104 - machine vision
 
20230202 - Introduction to tis-py
20230202 - Introduction to tis-py20230202 - Introduction to tis-py
20230202 - Introduction to tis-py
 
UiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation Developers
 
COMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online CollaborationCOMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online Collaboration
 
OpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability AdventureOpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability Adventure
 
Basic Building Blocks of Internet of Things.
Basic Building Blocks of Internet of Things.Basic Building Blocks of Internet of Things.
Basic Building Blocks of Internet of Things.
 
Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)
 
Building AI-Driven Apps Using Semantic Kernel.pptx
Building AI-Driven Apps Using Semantic Kernel.pptxBuilding AI-Driven Apps Using Semantic Kernel.pptx
Building AI-Driven Apps Using Semantic Kernel.pptx
 
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCostKubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
 
How Accurate are Carbon Emissions Projections?
How Accurate are Carbon Emissions Projections?How Accurate are Carbon Emissions Projections?
How Accurate are Carbon Emissions Projections?
 
Bird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystemBird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystem
 
Computer 10: Lesson 10 - Online Crimes and Hazards
Computer 10: Lesson 10 - Online Crimes and HazardsComputer 10: Lesson 10 - Online Crimes and Hazards
Computer 10: Lesson 10 - Online Crimes and Hazards
 
Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024
 
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
 

Building A Mobile First API When You're Not Mobile First - Tyler Singletary

  • 1. Mobile First… or maybe second. APICon 2014 Tyler Singletary, Director of Platform tyler@klout.com ; @harmophone
  • 2. Thinking about mobile means thinking about APIs 2 (but I don’t have to tell you that)
  • 3. How Klout Evolved Its APIs 3 Klout’s Partner API in 2010-2011: • Not Mobile Optimized • Not Used on Klout.com • Not Extensible. • XML and JSON response • No Mobile Web Experience • Easy Data in 1 Call Klout’s API Strategy in 2012+: • Acquired Blockboard • Redesigned Central API • Entitlement System for Klout.com, Mobile, Partners • Mobile Web • JSON Only • Easy Data in 2 Calls for Partners
  • 4. Any product is full of tradeoffs. • We redesigned APIs for Klout.com and our 1st-party mobile App first. • The Partner API drove some of the requirements, but always would be based on the Master API (with hidden data) • The Mobile API payloads are optimized for mobile and its specific functions. 4 Partner API • Crowdsourced Mobile Apps •CRM, Enterprise • Consumer Master API Klout.com •Mobile Klout.com Mobile API •Official Klout App • Cinch
  • 5. Let’s try Mobile Second (sort of) 5
  • 6. Different use cases… same API /user.json/1 • Klout.com can make several calls, and has expanded feature set. Fullest payloads. Complete user profile! • Partner API needs a very sanitized, limited payload. Just the user’s score. • Mobile API needs this current user, but also should get all other users 6
  • 7. Entitlements • Can be implemented by header, query parameter, or other means. • No need to build second endpoint for each use case • Requires dedicated engineering rigor to be consistent 7
  • 8. Klout Mobile iOS 1.0 8 All data in one payload. { response: { user: { kloutId: "478569", nick: "harmophone", name: { firstName: "devty", lastName: "T" }, image: { network: { identifier: "tw", number: 1 }, urlTiny: "http://a0.twimg.com/profile_images/23083 33289/7s7abq8j02kuxf84g7ig_normal.jpeg", urlSmall: "http://a0.twimg.com/profile_images/23083 33289/7s7abq8j02kuxf84g7ig_reasonably_s mall.jpeg", urlMedium: "http://a0.twimg.com/profile_images/23083 33289/7s7abq8j02kuxf84g7ig_reasonably_s mall.jpeg", urlLarge: "http://a0.twimg.com/profile_images/23083 33289/7s7abq8j02kuxf84g7ig.jpeg", networkImage: "http://a0.twimg.com/profile_images/23083 33289/7s7abq8j02kuxf84g7ig_normal.jpeg" }, bio: "Adagio assai. Klout Devangelist.", bioSource: "tw", score: { score: 47.620975824983596, trueReach: 537 }, scoreDeltas: { dayChange: -0.16153993062354743, weekChange: -0.5384216786696854, monthChange: -1.8510836286192287 }, connectedNetworks: [ { id: “", network: "tw" } ], hasMobile: true }, topics: […], sourceOfInfluence: { myInfluencers: […], myInfluencees: […], }, preferences: {}, scoreHistory: {}, stats: { }, networkContributions: { } }, responseTime: 44 }
  • 9. Let’s try Mobile First! (and only!) 9
  • 10. Klout’s Cinch APIs View-oriented payloads 10
  • 12. Optimizing APIs for both allows UX to dominate Web Mobile 2.0 iOS/Android
  • 13. Serve not only yourself, but others… • We should have branched another “Mobile Partner API” to ease in partner development of mobile apps utilizing our API. 13 Partner API • CRM, Enterprise • Consumer Master API Mobile API • Official Klout App • Cinch Mobile Partner API • Appboy Klout.com November 2013 Update: We still haven’t done this.  May 2014 Update: We still haven’t done this. :(
  • 14. I feel like this is all so familiar. 14
  • 15. Classic Client Server Design Principles Server • Talks to all external APIs • Proxy and repackage content exactly how the app needs it • Truth Client/App • Talks only to Server, except for auth (but even then…) • Temporary storage for UX and rendering • Maybe Truth 15
  • 16. Mobile Clients and Hardware Dictate Challenges Data transfer rate is typically slower Delivering data to a device costs the consumer money Any one or more requests can fail. And will. Apps collecting from multiple sources will be slow. Latency. Device diversity, processing power, multitasking, storage Mobile development has a slower cycle due to App Publishing APIs Change. Apps change. Not always in sync. 16
  • 17. The Main Conflict 17 Larger Data Payload Less Requests • Quick bursts of dense information • Just the facts • But extensible
  • 19. How Do You Protect Against These Challenges? Remove extraneous data Deliver large payloads, fewer requests Real work should be done on the server Try, try, again. But not too much. Graceful Degregation Classic Client Server Principles 19
  • 20. Failure is Routine. Plan for it. 20 Requests User Detail Twitter Stream Server User Detail Twitter Stream App – 3G User Deta- ------ ------ ----tream It’s a race against time!
  • 21. The Problem With SOAP • Tons of Extraneous Data. • Big payload. • Processing response holds UI latency. • Out of fashion for big data, social, web at large. The Good: • Type safety! • Fast Infoset standard. “The GZIP for XML!” 21
  • 22. The Problem With REST and JSON • Resource collections and objects aren’t always best • Non-optimized APIs require tons of individual requests • Various interpretations of what REST is and isn’t • Error Handling gets weird with arrays/collections and mobile nuance • While not strictly part of REST, typically JSON. 22
  • 23. Best Practices • Envelopes are an essential way to control and react to change, impress an update. • Entitlements allow you to reform and segment your API for use cases • Default to POST and PUT with arrays, even for single record updates. • Reference both URLs to resources as well as content_ids 23
  • 24. More Best Practices • GZIP or compress responses whenever possible • OAuth/xAuth for authentication. Don’t roll your own. • Return collections with reasonable limits. Employ params or headers. • Version on a per-endpoint basis. Adopt easy, programmatic versioning. • Clients should identify themselves thoroughly. Version, platform, etc. It’s shipped software. The API needs to know who it’s talking to. • Be able to specify a “critical read” -> indicating acceptance of longer latency or bypassing cache responses 24
  • 25. Error states and hypermedia • Use HTTP status when appropriate • Server-side errors need clarity and extensibility, like exceptions. – Utilize custom schemes (-10, -11, etc.) – Use 500-504, but provide codified directive error messages inside. • Require server to return a handshake at the end of Writes: in addition to positive status codes, return a positive ACK that a server handled the write. • Potential Standards (Hypermedia to the rescue!): – Bon Longden’s vnd.error : https://github.com/blongden/vnd.error 25
  • 26. Summary Design for Mobile APIs: • both internal and external • Use entitlements and API Management Mobile payloads: • data rich, extensible, lean on the DDL and extras. Low # of calls. Mobile Envelope: • should become a standard way of change management 26 { "response":{}, "responseTime":26, "interstitial":{ "url": "http://m.klout.com/upgrade", } } Master API -> Partner API Mobile API, Mobile Partner API
  • 27. Mobile First… or maybe second. APICon 2014 Tyler Singletary, Director of Platform tyler@klout.com ; @harmophone

Hinweis der Redaktion

  1. A Note On My Perspective: Klout builds consumer experiences. We measure influence on social networks. I manage all partner relations in regards to data in and out, as well as managed the development of our new API and how it was divided for Mobile. My experience is primarily in this context.
  2. We broke one cardinal rule for easily getting to data on Mobile: we made it require two calls. Our data model shifted from being keyed off of Twitter to being keyed off of internal Ids. Internal IDs are translated from social services, like Twitter, Google+, etc. Data is then accessed via those IDs People are influential about Topics Topics are named entities, but also have unique identifiers referenced by RESTful routes and IDs.
  3. Here’s where I get super opinionated. This applies to web as well.
  4. In our mobile API protocol: interstitial can return a URL to a webview in case of a change to invaldate or redirect a client. Deal with versioning clients to gracefully escape users to the newest versions
  5. Cancel/Retry modals on Failure – usual. Write autoretry or store the POST for future use (always let the user know) Timers on state
  6. Be able to specify a “critical read” -> indicating acceptance of longer latency or bypassing cache responses
  7. If something like a “notif” object exists, include shortened versions of Actor and Subject objects in the payload, rather than reference them for future lookup.
  8. Require server to return a handshake at the end of Writes: in addition to positive status codes, return a positive ACK that a server handled the write. Envelope the error messages – present user-readable error messages in the error response (in addition to developer responses) API endpoint that is a config file : apps local config file to manange features :
  9. A Note On My Perspective: Klout builds consumer experiences. We measure influence on social networks. I manage all partner relations in regards to data in and out, as well as managed the development of our new API and how it was divided for Mobile. My experience is primarily in this context.