QCon SF 2014 - Create and Deploy APIs using Web IDEs, Open Source Frameworks and Cloud Platforms
Transcript of QCon SF 2014 - Create and Deploy APIs using Web IDEs, Open Source Frameworks and Cloud Platforms
![Page 1: QCon SF 2014 - Create and Deploy APIs using Web IDEs, Open Source Frameworks and Cloud Platforms](https://reader030.fdocuments.us/reader030/viewer/2022032514/55d5786cbb61ebae2f8b45ac/html5/thumbnails/1.jpg)
QCon SF 2014
Create and Deploy APIs using Web IDEs, Open Source Frameworks and Cloud
PlatformsPresented by Jerome Louvel, Chief Geek
![Page 2: QCon SF 2014 - Create and Deploy APIs using Web IDEs, Open Source Frameworks and Cloud Platforms](https://reader030.fdocuments.us/reader030/viewer/2022032514/55d5786cbb61ebae2f8b45ac/html5/thumbnails/2.jpg)
New API Landscape
API project
Multiplicity ofHCI modes
Always-on and instantaneous services
Mobile and contextual access to services
Cross-channel user experiences
Cloud computing(IaaS)
Semantic web(hyperdata)
![Page 3: QCon SF 2014 - Create and Deploy APIs using Web IDEs, Open Source Frameworks and Cloud Platforms](https://reader030.fdocuments.us/reader030/viewer/2022032514/55d5786cbb61ebae2f8b45ac/html5/thumbnails/3.jpg)
● New types of APIs○ internal & external APIs○ composite & micro APIs○ experience & open APIs
● Number of APIs increases○ channels growth○ history of versions○ micro services pattern○ quality of service
● → Industrialization needed○ new development workflows
Impacts on API development
Infrastructure APIs(IaaS)
Platform APIs(PaaS)
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
![Page 4: QCon SF 2014 - Create and Deploy APIs using Web IDEs, Open Source Frameworks and Cloud Platforms](https://reader030.fdocuments.us/reader030/viewer/2022032514/55d5786cbb61ebae2f8b45ac/html5/thumbnails/4.jpg)
New API development workflows● API-driven approach benefits
○ a pivot API descriptor○ server skeletons & mock generation○ up-to-date client SDKs & docs○ rapid API crafting & implementation
● Code-first or API-first approaches○ can be combined using
■ code introspectors to extract■ code generators to resync
API source code
API descriptor
introspect generate
APIdocs
generate generate
ClientSDKs
![Page 5: QCon SF 2014 - Create and Deploy APIs using Web IDEs, Open Source Frameworks and Cloud Platforms](https://reader030.fdocuments.us/reader030/viewer/2022032514/55d5786cbb61ebae2f8b45ac/html5/thumbnails/5.jpg)
Crafting an API● Specialized API crafting tools
○ code editors○ visual designers○ generation of
■ contract■ client SDKs■ skeletons
● New generation of tools○ IDE-type○ Web-based
![Page 6: QCon SF 2014 - Create and Deploy APIs using Web IDEs, Open Source Frameworks and Cloud Platforms](https://reader030.fdocuments.us/reader030/viewer/2022032514/55d5786cbb61ebae2f8b45ac/html5/thumbnails/6.jpg)
![Page 7: QCon SF 2014 - Create and Deploy APIs using Web IDEs, Open Source Frameworks and Cloud Platforms](https://reader030.fdocuments.us/reader030/viewer/2022032514/55d5786cbb61ebae2f8b45ac/html5/thumbnails/7.jpg)
![Page 8: QCon SF 2014 - Create and Deploy APIs using Web IDEs, Open Source Frameworks and Cloud Platforms](https://reader030.fdocuments.us/reader030/viewer/2022032514/55d5786cbb61ebae2f8b45ac/html5/thumbnails/8.jpg)
![Page 9: QCon SF 2014 - Create and Deploy APIs using Web IDEs, Open Source Frameworks and Cloud Platforms](https://reader030.fdocuments.us/reader030/viewer/2022032514/55d5786cbb61ebae2f8b45ac/html5/thumbnails/9.jpg)
![Page 10: QCon SF 2014 - Create and Deploy APIs using Web IDEs, Open Source Frameworks and Cloud Platforms](https://reader030.fdocuments.us/reader030/viewer/2022032514/55d5786cbb61ebae2f8b45ac/html5/thumbnails/10.jpg)
● Browser-based IDE for API crafting○ accelerate the design of APIs○ Chrome extension○ compatible with other modern browsers
● Supports○ visual design of APIs○ source code views○ APIs with large # of resources (sections)○ skeleton and SDK generation○ adherence to REST○ multiple API languages (Swagger & RAML initially)
Preview LaunchNovember 18th
Crafting an API with Restlet
![Page 11: QCon SF 2014 - Create and Deploy APIs using Web IDEs, Open Source Frameworks and Cloud Platforms](https://reader030.fdocuments.us/reader030/viewer/2022032514/55d5786cbb61ebae2f8b45ac/html5/thumbnails/11.jpg)
![Page 12: QCon SF 2014 - Create and Deploy APIs using Web IDEs, Open Source Frameworks and Cloud Platforms](https://reader030.fdocuments.us/reader030/viewer/2022032514/55d5786cbb61ebae2f8b45ac/html5/thumbnails/12.jpg)
![Page 13: QCon SF 2014 - Create and Deploy APIs using Web IDEs, Open Source Frameworks and Cloud Platforms](https://reader030.fdocuments.us/reader030/viewer/2022032514/55d5786cbb61ebae2f8b45ac/html5/thumbnails/13.jpg)
![Page 14: QCon SF 2014 - Create and Deploy APIs using Web IDEs, Open Source Frameworks and Cloud Platforms](https://reader030.fdocuments.us/reader030/viewer/2022032514/55d5786cbb61ebae2f8b45ac/html5/thumbnails/14.jpg)
Implementing an API ● Implementation using a RESTful API framework
○ Benefits ■ less mental gap compared to MVC & RPC
frameworks■ higher level than raw HTTP libraries (Servlet, Netty)■ easier to use HTTP protocol features■ open source (no lock-in)
○ Key features of an API framework■ API descriptor/contract definition
● in Java, typically uses annotations■ both client and server side support■ make it easy or transparent to use HTTP features■ performance and scalability
HTTP / WebSockettransport
HTTPsemantics
RESTframework
Customweb API
![Page 15: QCon SF 2014 - Create and Deploy APIs using Web IDEs, Open Source Frameworks and Cloud Platforms](https://reader030.fdocuments.us/reader030/viewer/2022032514/55d5786cbb61ebae2f8b45ac/html5/thumbnails/15.jpg)
● JAX-RS centric○ Oracle Jersey○ JBoss RESTeasy○ DropWizard○ Apache Wink○ Apache CXF
● Alternative Java APIs○ Restlet Framework
■ favor Restlet API■ support JAX-RS API
○ REST.li○ RESTx○ REST Express
● JavaScript○ Express.js
API Frameworks Landscape
![Page 16: QCon SF 2014 - Create and Deploy APIs using Web IDEs, Open Source Frameworks and Cloud Platforms](https://reader030.fdocuments.us/reader030/viewer/2022032514/55d5786cbb61ebae2f8b45ac/html5/thumbnails/16.jpg)
● All HTTP features supported○ caching, content ranges & compression○ content negotiation & conditional requests○ confidentiality & authentication○ all HTTP headers mapped to Java classes
● What’s New in v2.3?○ API introspector (Swagger, RAML, WADL)○ API management (API firewall, APISpark integration)○ @Status annotation (map Java exception & HTTP error)○ CORS support (cross-origin access)○ easier access to raw HTTP headers○ upgrade to Jetty 9.2 with client-side support○ compatible with Java 7, GWT 2.7, Android, GAE, Java EE, OSGi
Implementing an API with Restlet
Version 2.3.0 launchNovember 18th
![Page 17: QCon SF 2014 - Create and Deploy APIs using Web IDEs, Open Source Frameworks and Cloud Platforms](https://reader030.fdocuments.us/reader030/viewer/2022032514/55d5786cbb61ebae2f8b45ac/html5/thumbnails/17.jpg)
Restlet-annotated Java interfaces
![Page 18: QCon SF 2014 - Create and Deploy APIs using Web IDEs, Open Source Frameworks and Cloud Platforms](https://reader030.fdocuments.us/reader030/viewer/2022032514/55d5786cbb61ebae2f8b45ac/html5/thumbnails/18.jpg)
JAX-RS and Restlet APIs | Server-Side
![Page 19: QCon SF 2014 - Create and Deploy APIs using Web IDEs, Open Source Frameworks and Cloud Platforms](https://reader030.fdocuments.us/reader030/viewer/2022032514/55d5786cbb61ebae2f8b45ac/html5/thumbnails/19.jpg)
JAX-RS and Restlet APIs | Client-Side
![Page 20: QCon SF 2014 - Create and Deploy APIs using Web IDEs, Open Source Frameworks and Cloud Platforms](https://reader030.fdocuments.us/reader030/viewer/2022032514/55d5786cbb61ebae2f8b45ac/html5/thumbnails/20.jpg)
Deploying an API● PaaS make it easier to deploy
○ less operational burden○ cost and time effective to start then scale○ more availability and lower latency
■ necessary for a global reach
● Generic Infrastructure PaaS○ hosting and auto-scaling○ good density thanks to VMs○ better density thanks to containers (Docker)
● Specialized PaaS for APIs○ add API management on top of the hosted API○ integrate with Infrastructure PaaS
■ remote agent close to API or API wrapper
![Page 21: QCon SF 2014 - Create and Deploy APIs using Web IDEs, Open Source Frameworks and Cloud Platforms](https://reader030.fdocuments.us/reader030/viewer/2022032514/55d5786cbb61ebae2f8b45ac/html5/thumbnails/21.jpg)
● Typical Benefits○ documentation○ access control○ firewall○ adaptation○ monetization○ analytics
● APISpark Supports○ APIs with large # of resources (sections)○ skeleton and SDK generation○ integration with Restlet Framework General Availability
November 18th
Managing an API
![Page 22: QCon SF 2014 - Create and Deploy APIs using Web IDEs, Open Source Frameworks and Cloud Platforms](https://reader030.fdocuments.us/reader030/viewer/2022032514/55d5786cbb61ebae2f8b45ac/html5/thumbnails/22.jpg)
![Page 23: QCon SF 2014 - Create and Deploy APIs using Web IDEs, Open Source Frameworks and Cloud Platforms](https://reader030.fdocuments.us/reader030/viewer/2022032514/55d5786cbb61ebae2f8b45ac/html5/thumbnails/23.jpg)
![Page 24: QCon SF 2014 - Create and Deploy APIs using Web IDEs, Open Source Frameworks and Cloud Platforms](https://reader030.fdocuments.us/reader030/viewer/2022032514/55d5786cbb61ebae2f8b45ac/html5/thumbnails/24.jpg)
![Page 25: QCon SF 2014 - Create and Deploy APIs using Web IDEs, Open Source Frameworks and Cloud Platforms](https://reader030.fdocuments.us/reader030/viewer/2022032514/55d5786cbb61ebae2f8b45ac/html5/thumbnails/25.jpg)
Conclusion● APIs enable new abstracting layers
○ IaaS became a game changer thanks to APIs■ S3, EC2, Route53, etc.
○ PaaS is the next game changer■ thanks to APIs as well!
![Page 26: QCon SF 2014 - Create and Deploy APIs using Web IDEs, Open Source Frameworks and Cloud Platforms](https://reader030.fdocuments.us/reader030/viewer/2022032514/55d5786cbb61ebae2f8b45ac/html5/thumbnails/26.jpg)
Thank you