apidays paris - how to build your web api

33
BUILD , HOST AND MANAGE YOUR CUSTOM API IN LESS THAN AN HOUR All-in-one platform for Web APIs http://apispark.com December 5, 2013 Stève SFARTZ [email protected] VP of Engineering

Upload: restlet

Post on 10-May-2015

499 views

Category:

Technology


0 download

DESCRIPTION

Steve Sfartz, VP Engineering of Restlet shares our experience in building a web API via DIY (Do It Yourself) approach or via PaaS approach (APISpark). Introduction to both open source Restlet Framework and public beta of APISpark.

TRANSCRIPT

Page 1: APIdays Paris - How to Build Your Web API

BUILD, HOST AND MANAGEYOUR CUSTOM API IN LESS THAN AN HOUR

All-in-one platform for Web APIshttp://apispark.com

December 5, 2013

Stève [email protected]

VP of Engineering

Page 2: APIdays Paris - How to Build Your Web API

BIO

Steve SFARTZ

VP of Engineering @ Restlet

APISpark devs & ops teams

Restlet Framework dev teams

Scalable & interoperable architectures

Keeping in touch

[email protected]

Twitter : @SteveSfartz

Blog : Think big … mais pas trop !

Page 3: APIdays Paris - How to Build Your Web API

WEB API PROJECTTYPICAL LIFE CYCLE

Create Host Manage Use Promote

1) Do It Yourself (DIY)

long, risky, expensive but highly flexible

2) Platform as a Service (PaaS)

integrated, fast, cost effective

Page 4: APIdays Paris - How to Build Your Web API

DO IT YOURSELF APPROACH

with the Restlet framework

Page 5: APIdays Paris - How to Build Your Web API

RESTLET FRAMEWORKOPEN SOURCE PROJECT STARTED IN 2005

A N D R O I D G A E G W T J A V A E EJ A V A S E O S G I

Editions for

Create (and consume) Web APIs

in a REST style

Page 6: APIdays Paris - How to Build Your Web API

LARGELY USED

Page 7: APIdays Paris - How to Build Your Web API

SELF HOSTED OR EMBEDDED

Page 8: APIdays Paris - How to Build Your Web API

FILTERING AND ROUTINGMULTI-THREADED AND DYNAMIC

Restlet Resource

Filter

B

C

A

Router

B

C

A

Route 1

Route 2

Route 3

A

B

C

Page 9: APIdays Paris - How to Build Your Web API

UNIFIED APPROACH

FOR CLIENT AND SERVER SIDES

HTTP

Annotated

Java interface

REST API

Client

resourceServer

resource

Client

proxyServer

subclass

Page 10: APIdays Paris - How to Build Your Web API

CONVERSION SERVICEEXTENSIBLE, SCORING, BEANS DE REPRÉSENTATION

Resource

XML

HTML

JSON

StateRepresentation

bean

Form Data

RDF

Atom

Converter

service

Page 11: APIdays Paris - How to Build Your Web API

MULTIPLE PROTOCOLSHTTP COMES FIRST, EXTEND IT TO SUIT YOUR NEEDS

Semantics

Messaging

Payload

Conditional requests

Rangedrequests

Caching Authentication

Restlet

API

Restlet

Engine

Protocoles

• HTTP

• AJP

• FTP

• RIAP

• CLAP

• FILE

• POP3

• SMTP

• JDBC

• SIP

Page 12: APIdays Paris - How to Build Your Web API

CLOUD INTEGRATIONTUNNEL YOUR IT AND EXPOSE INTERNAL DATA

Page 13: APIdays Paris - How to Build Your Web API

PAAS APPROACH

with APISpark

Page 14: APIdays Paris - How to Build Your Web API

APISPARK PLATEFORM

Send us your feed-back and help us making it the best PaaS for Web

APIs !

Page 15: APIdays Paris - How to Build Your Web API

BUILD YOUR DATA SOURCE

Step 1

Page 16: APIdays Paris - How to Build Your Web API

DIY APPROACH

Select a database technology

that scales

Specify the schema

tables / sets, keys / queries, indexes

Setup the database

On premise or in the Cloud

Ensure security, high availability and performances

From days to weeks

Page 17: APIdays Paris - How to Build Your Web API

PAAS WAYBACK END AS A SERVICE

Page 18: APIdays Paris - How to Build Your Web API

CREATE YOUR WEB API

Step 2

Page 19: APIdays Paris - How to Build Your Web API

DIY APPROACH

Select an API framework that

Lets you be productive and gets you on the way

Leverages your skills

Ensures your web API will scale and be secure

Write the code

Code, debug, unit tests

Read, write, update your data

Package the code

From days to weeks

Page 20: APIdays Paris - How to Build Your Web API

PAAS WAYFULLY AUTOMATED

Page 21: APIdays Paris - How to Build Your Web API

DEPLOY YOUR WEB API

Step 3

Page 22: APIdays Paris - How to Build Your Web API

DIY APPROACH

Choose a deployment target Private hosting with firewall / DMZ Public hosting : Cloud / Dedicated

Select an API management solution Build your own from Open source, third

party products Leverage an API management service :

plug it in tasks and side effects

Guaranty your SLA Test, QA, iterate, benchmark…

From days to weeks to get started

Page 23: APIdays Paris - How to Build Your Web API

PAAS WAYINSTANT DEPLOY AND AUTO SCALE

Page 24: APIdays Paris - How to Build Your Web API

PROMOTE YOUR API

Step 4

Page 25: APIdays Paris - How to Build Your Web API

DIY APPROACH

Write your API documentation

Annotated your API code and generate ?

Use HTML tooling ?

Maintenance costs (versions sync)

Provide client SDKs

Write first SDKs

Pray for community contributions for others ?

Test, QA, iterate, etc.

From days to weeks to get started

Page 26: APIdays Paris - How to Build Your Web API

PAAS WAYGENERATE CLIENT SDKS

Page 27: APIdays Paris - How to Build Your Web API

PAAS WAYBUILT-IN ANALYTICS

Page 28: APIdays Paris - How to Build Your Web API

DIY VERSUS PAASSUMMARY

From weeks to months

Web API manager

Custom code

Web API framework

Generic PaaS

Hosting

Current practice:• Team of engineers• Heterogeneous stack• Complex & expensive

to develop andto operate

From minutes to hours

API Spark• creation• hosting• management• usage

All-in-one PaaS

Web API definition

Page 29: APIdays Paris - How to Build Your Web API

HOW MANY APIS ? TO BUILD AND MAINTAIN

Web Site

Pages + API

Browser

Connected devices

Smartenvironment

Business Partners Internal IT

HTTP

Page 30: APIdays Paris - How to Build Your Web API

FINAL THOUGHTS

How to build 1 million API in 2017 ?

– with radically simpler PaaS for Web APIs

– truly democratize Web APIs !

Source: Wired / June 2013

Page 31: APIdays Paris - How to Build Your Web API

THE ALL-IN-ONE PLATFORM FOR

WEB APIS

Page 32: APIdays Paris - How to Build Your Web API

JOIN US

DevOps Engineers

R&D Engineers

Internships : R&D, devops

Location : France (Nantes)

http://restlet.com/about/hiring

Page 33: APIdays Paris - How to Build Your Web API

KEEP IN TOUCH!

http://apispark.com

Twitter: @apispark

[email protected]