developing profitable apis - john fraser - platform a

28
John Fraser CTO, buy.at

Upload: auexpo-conference

Post on 21-Nov-2014

2.065 views

Category:

Technology


2 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Developing Profitable APIs - John Fraser - Platform A

John FraserCTO, buy.at

Page 2: Developing Profitable APIs - John Fraser - Platform A

Service Provision

“What challenges do Networks face when acting as a service provider?”

Page 3: Developing Profitable APIs - John Fraser - Platform A

Service Provision

API Architecture “How should an API be designed?”Service Orientated vs. Resource Orientated.

– Resource Orientated• Usually based around REST protocols.• Simpler to integrate, but less flexible.

– Service Orientated• Could use protocols such as SOAP / XML-RPC.• More complex.

Page 4: Developing Profitable APIs - John Fraser - Platform A

Service Provision

Defining standard datasets“How do we decide what data an API returns?”

– Dimensionality• Consider multiple degrees of freedom in a data request.• e.g. Holidays vary in location, duration, date, etc.

– Category mapping• Ensure that categories are consistent across brands.• e.g. Mobile phone features.

Page 5: Developing Profitable APIs - John Fraser - Platform A

Service Provision

Scalability“How do we avoid the Slashdot effect?”

– Client Isolation• Preventing one client from monopolising resources.

– Request Quotas• Another method for isolating clients.

– Latency• Need to ensure that latency scales well with load.

Page 6: Developing Profitable APIs - John Fraser - Platform A

Service ProvisionRead/Write Functionality

“Why do networks often only offer read functionality?”

– Read only• Simpler, more secure.• Very commonly offered.

– Read / Write• Needs an authentication method.• Uncommon to see in a client side mashup.

Page 7: Developing Profitable APIs - John Fraser - Platform A

Network Support

“What support can Networks give to help affiliates integrate with an API?”

Page 8: Developing Profitable APIs - John Fraser - Platform A

Network Support

Documentation– Needs to be accessible to independent

developers.– Needs to make no assumptions about prior

knowledge.– Separation of protocol from transport can be

useful.

Page 9: Developing Profitable APIs - John Fraser - Platform A

Network Support

SDK / Tools– Should be platform neutral if possible.– Should match existing technologies that

clients use.

Page 10: Developing Profitable APIs - John Fraser - Platform A

Network Support

Interoperability– Reuse of industry standards should be

encouraged.• e.g. SOAP, JSON

– Should never force clients to make compromises.

Page 11: Developing Profitable APIs - John Fraser - Platform A

Network Support

Backwards Compatibility– Ensure legacy features are retained with new

product releases.– Provide clear migration paths and timelines

when features are deprecated.

Page 12: Developing Profitable APIs - John Fraser - Platform A

Network Support

Access to Support– Dedicated technical support.– Sponsorship of community efforts.– Availability of training.

Page 13: Developing Profitable APIs - John Fraser - Platform A

Design Considerations

“What should affiliates be considering when implementing a Mashup?”

Page 14: Developing Profitable APIs - John Fraser - Platform A

Design Considerations

Client-Side versus Server-Side integrations

– Server-Side • a.k.a. “Traditional Web App”.• Uses technologies such as PHP, ASP and JSP.

– Client-Side• a.k.a. “Mashup”• Uses technologies such as AJAX and

XMLHTTPRequest.

Page 15: Developing Profitable APIs - John Fraser - Platform A

Design Considerations

Server-Side Design Pattern

Client

3rd Party API ServerApplication Server

1. R

eque

st

4. R

espo

nse

3. API Response

2. API Request

Page 16: Developing Profitable APIs - John Fraser - Platform A

Design Considerations

Server-Side Strengths– Good compatibility, easy to test.– Uses simple programming patterns.

Server-Side Weaknesses– Can be slow to respond.– Not as flexible.– “Feels like a web page”

Page 17: Developing Profitable APIs - John Fraser - Platform A

Design Considerations

Client-Side Design Pattern

Client

3rd Party API ServerApplication Server1.

Req

uest

2. R

espo

nse

4. API R

esponse3. A

PI Request

Page 18: Developing Profitable APIs - John Fraser - Platform A

Design Considerations

Client-Side Strengths– Greater feature set available.– “Feels like an interactive application”

Client-Side Weaknesses– More complicated programming or tools required.– Issues with browser compatibility.– Easier to reverse engineer.

Page 19: Developing Profitable APIs - John Fraser - Platform A

Challenges + Solutions

“What are the common challenges you will face creating a mashup?”

“What solutions are available to address these?”

Page 20: Developing Profitable APIs - John Fraser - Platform A

Challenges + Solutions

Complex programming patternsThe introduction of AJAX programming introduces complexities. These include race conditions, threading issues, exception handling, etc.

Solutions:• Use a standard library to hide the complexity. e.g. asp.net,

jQuery, Spry, script.aculo.us.• Pay someone else to develop it.

Page 21: Developing Profitable APIs - John Fraser - Platform A

Challenges + SolutionsSame Origin Policy

Browsers will only allow an XMLHTTPRequest to the domain of the container page.

Solution 1: AJAX Proxy• Make all requests to your own domain, and implement a server-side

bridge to 3rd party APIs.Solution 2: JSON and Dynamic Scripting

• Dynamically add a <script> tag referencing a REST API source.• Relies on the API using REST requests and JSON responses.

Solution 3: 3rd Party components• Some plug-ins allow XMLHTTPRequest like functionality.• May be broken with later security updates.

Page 22: Developing Profitable APIs - John Fraser - Platform A

Challenges + Solutions

Browser CompatibilityThe growth in the number of browsers, plus

increased feature development, makes the intended audience a moving target.

Solutions:• Stick to supported standards.• Use standard libraries if possible.• Test as many browsers as possible.

Page 23: Developing Profitable APIs - John Fraser - Platform A

Challenges + Solutions

Exception HandlingYou can never rely on 3rd party APIs to return a

response.

Solutions:• Ensure your application is robust to API failures.• Avoid solutions that are latency sensitive.• When testing, use proxies to simulate failures.

Page 24: Developing Profitable APIs - John Fraser - Platform A

Challenges + Solutions

MaintenanceThe added complexity of client-side apps, plus the

changing browser landscape, means that applications need to be maintained.

Developers charge by the hour…

Solutions:• Insist standards are followed.• Develop it yourself.• Make sure the work is justified by the ROI.

Page 25: Developing Profitable APIs - John Fraser - Platform A

Making Websites Profitable

Negative factors affecting profitability– The costs of developing and maintaining a

mashup are higher than a traditional site.– It is more difficult to search optimise the

content of an interactive site.

Page 26: Developing Profitable APIs - John Fraser - Platform A

Making Websites Profitable

Positive factors affecting profitability– Interactive functionality can attract return

visits.– Increased PR value.– Opportunity to hit new markets. e.g. iPhone.– USP / differentiator for sites.

Page 27: Developing Profitable APIs - John Fraser - Platform A

Conclusions

APIs are about removing the dependency on the Network / Merchant for interactive functionality.

They require a higher initial investment, but are a huge opportunity for affiliates to differentiate sites and attract and retain users.

Page 28: Developing Profitable APIs - John Fraser - Platform A

Questions?