SlideShare uma empresa Scribd logo
1 de 28
Baixar para ler offline
Friday, June 25, 2010
Why RESTful Design for Cloud is Best
                Galder Zamarreño
                Senior Software Engineer, Red Hat
                25th June 2010




Friday, June 25, 2010
Who is Galder?


      • Core R&D engineer on Infinispan and JBoss Cache
      • Contributor and committer on JBoss AS, Hibernate,
           JGroups, JBoss Portal...etc




Friday, June 25, 2010
Agenda


      • Brief introduction to RESTful principles
      • Cloud APIs and REST
      • Cloud storage with Infinispan REST module
      • Applying RESTful principles to other APIs
      • Demo




Friday, June 25, 2010
What is REST?


      • REpresentational State Transfer (Roy Fielding)
      • An architectural style
      • Part of the web from day 1 (sort of...)
           • Evolved with HTTP 1.1




Friday, June 25, 2010
What it is not


      • A protocol
      • An interface
      • An API
      • A standard
      • A drop in replacement for SOAP (or RPC)




Friday, June 25, 2010
What is right with REST


      • Fixed well defined verbs
           •    GET = Read only operation to query info
           •    PUT = Stores body sent in location
           •    POST = Create subordinate resources
           •    DELETE = Remove resources
           •    HEAD = Like GET but no response body




Friday, June 25, 2010
What is right with REST


      • Focus on resources (not services)
           • Makes “service implementors” work harder
      • Requests are stateless
      • Hypermedia As The Engine of Application State
           (HATEOAS)




Friday, June 25, 2010
Cloud APIs and REST


      • 2 categories for Cloud APIs with different requirements
           • IT/Cloud resource management
                • Non-REST APIs: SNMP, WBEM, WMI, JMX/RMI, OSGI...etc
           • Cloud storage
             • Non-REST APIs: NFS, CIFS, WebDAV...etc
      •    REST can provide a consistent set of principles




Friday, June 25, 2010
REST for resource management APIs


      • Short term:
           • REST reduces invalid state transition calls
           • REST is to IT management protocol design what
                classical music training is to a rock musician
      • Long term:
           • REST enables IT management console “in the cloud”
      • But above all:
           • The API doesn't constrain the design of the URI space



Friday, June 25, 2010
What REST can't do for resource management


      • Querying: “Get all JBoss AS instances running on
           Linux that don't have patch JBAS-1234 applied”
           • Links are part of resource representation, not resources
                of their own
      • Retrieving resource configuration change history
           • Can you guarantee that URIs will remain unchanged?
      • These problems beg for an RPC pattern




Friday, June 25, 2010
Who is using REST for resource management?


      • Sun Cloud API
           • Unfortunately dropped :(
      • Rackspace
           • Multiple representation - JSON/XML...etc
      • EC2
           • No REST; Plain HTTP or SOAP
      • VMWare vCloud



Friday, June 25, 2010
REST for cloud storage APIs


      • REST promotes a “stateless” architecture
           • No need for maintaining sessions, easier to scale up
      • Improved network efficiency thanks to caching
      • Internet is highly latent
           • NFS or CIFS only valid in local network access




Friday, June 25, 2010
REST for cloud storage APIs


      • WebDAV is useful over an internet connection
           • … but limited to traditional file operations
           • i.e. store, retrieve...etc
      • REST offers a solution...
           • … that is more flexible and robust
           • … and works in both remote and local access modes




Friday, June 25, 2010
Who is using REST for cloud storage?


      • Tons!
           • Amazon S3, Eucalyptus, Rackspace, Mezeo,
                Nirvanix, ...etc
      • Cloud storage abstractions libraries ease transition
           • jclouds for java/clojure
           • Simple Cloud for PHP




Friday, June 25, 2010
Cloud storage DYI with Infinispan


      • No need to rely on 3rd party
      • You can build your own based on Infinispan
           •    Infinispan is an in-memory data grid platform
           •    Consistent hash based data distribution
           •    Built-in eviction, prevents OOMs!
           •    GUI management and monitoring provided by JOPR




Friday, June 25, 2010
Cloud storage DYI with Infinispan


      • Infinispan is remotely accessible via:
           •    Hot Rod - a custom binary protocol
           •    Memcached text protocol
           •    WebSocket for javascript clients (HTML5)
           •    RESTful interface (of course!)




Friday, June 25, 2010
Infinispan RESTful interface


      • PUT /{cacheName}/{cacheKey}
           • Insert or update payload in cache's key
      • POST /{cacheName}/{cacheKey}
           • Same as PUT but if key exists, returns HTTP conflict
      • Headers for PUT/POST
           • Content-Type mandatory – use media/mime-types
           • Optional: timeToLiveSeconds, maxIdleTimeSeconds,
                performAsync




Friday, June 25, 2010
Infinispan RESTful interface


      • GET /{cacheName}/{cacheKey}
           • Return value of cached key as body in response
      • DELETE /{cacheName}/{cacheKey}
           • Remove given key from cache
      • DELETE /{cacheName}
           • Remove ALL the entries from given cache




Friday, June 25, 2010
Infinispan REST Clients


      • Any HTTP client will do, example:




Friday, June 25, 2010
Applying RESTful principles to other APIs


      • Any Resource Oriented Architecture (ROA)
           • i.e. A library with books and members as resources
      • A resource has...
           • Unique ID (and hence an URI)
                • i.e. http://my.library.com/book/1234




Friday, June 25, 2010
Applying RESTful principles to other APIs


      • A resource can...
           • Be related/linked via hypermedia
           • Have different state and representations
             • i.e. Borrowed/Available, JSON/HTML/XML...etc
      •    Systems with single entry point and rest discovered
           • i.e. Library as entry point and books/members linked




Friday, June 25, 2010
Applying RESTful principles to other APIs


      • Business processes represented HTTP methods
           • i.e. Borrowing a book represented as:
             • PUT http://my.library.com/member/5678/book/1234
      •    Use self-descriptive messages
           • i.e. application/my.library.com.Book+json




Friday, June 25, 2010
If REST told you to jump off a bridge, would you?


      • Complex queries with many parameters are tricky
           • i.e. “List the female Spanish members aged between 20
                and 30 that borrowed books between 1980 and 1990,
                and never returned them”
      • Do not make resources out of such queries
      • RPC-like query operation is much better suited here




Friday, June 25, 2010
Demo




Friday, June 25, 2010
Summary


      • REST suits cloud management APIs
           • But remember limitations with history and queries
      • REST and cloud storage APIs are made for each other
      • Cloud storage with Infinispan REST module is simple
      • RESTful principles are applicable to other APIs
           • Don't convert queries into resources, use RPC




Friday, June 25, 2010
Questions?

      • Personal:
           • Site: http://galder.zamarreno.com
           • Twitter: @galderz
      • Project:
           • Site: http://www.infinispan.org
           • Blog: http://blog.infinispan.org
           • Twitter: @infinispan
      • Tweet:
           • #infinispan, #summitjbw



Friday, June 25, 2010
Friday, June 25, 2010

Mais conteúdo relacionado

Mais procurados

Out of the Lab and Into the Datacenter - Which Technologies Are Ready?
Out of the Lab and Into the Datacenter - Which Technologies Are Ready?Out of the Lab and Into the Datacenter - Which Technologies Are Ready?
Out of the Lab and Into the Datacenter - Which Technologies Are Ready?Stephen Foskett
 
From 100s to 100s of Millions
From 100s to 100s of MillionsFrom 100s to 100s of Millions
From 100s to 100s of MillionsErik Onnen
 
Gestalt IT - Why It’s Time to Stop Thinking In Terms of Silos
Gestalt IT - Why It’s Time to Stop Thinking In Terms of SilosGestalt IT - Why It’s Time to Stop Thinking In Terms of Silos
Gestalt IT - Why It’s Time to Stop Thinking In Terms of SilosStephen Foskett
 
Vitess: Scalable Database Architecture - Kubernetes Community Days Africa Ap...
Vitess: Scalable Database Architecture -  Kubernetes Community Days Africa Ap...Vitess: Scalable Database Architecture -  Kubernetes Community Days Africa Ap...
Vitess: Scalable Database Architecture - Kubernetes Community Days Africa Ap...Alkin Tezuysal
 
Technologies, Data Analytics Service and Enterprise Business
Technologies, Data Analytics Service and Enterprise BusinessTechnologies, Data Analytics Service and Enterprise Business
Technologies, Data Analytics Service and Enterprise BusinessSATOSHI TAGOMORI
 
When is Myrocks good? 2020 Webinar Series
When is Myrocks good? 2020 Webinar SeriesWhen is Myrocks good? 2020 Webinar Series
When is Myrocks good? 2020 Webinar SeriesAlkin Tezuysal
 
AWS Cloud experience concepts tips and tricks
AWS Cloud experience concepts tips and tricksAWS Cloud experience concepts tips and tricks
AWS Cloud experience concepts tips and tricksDirk Harms-Merbitz
 
Developing a Staff-Only Samvera Application
Developing a Staff-Only Samvera ApplicationDeveloping a Staff-Only Samvera Application
Developing a Staff-Only Samvera ApplicationJames Griffin
 
Technologies for Data Analytics Platform
Technologies for Data Analytics PlatformTechnologies for Data Analytics Platform
Technologies for Data Analytics PlatformN Masahiro
 
Repository performance tuning
Repository performance tuningRepository performance tuning
Repository performance tuningJukka Zitting
 
Boost on!!next generation big data platform
Boost on!!next generation big data platformBoost on!!next generation big data platform
Boost on!!next generation big data platformLINE Corporation
 
Scaling MySQL using Fabric
Scaling MySQL using FabricScaling MySQL using Fabric
Scaling MySQL using FabricKarthik .P.R
 

Mais procurados (16)

Out of the Lab and Into the Datacenter - Which Technologies Are Ready?
Out of the Lab and Into the Datacenter - Which Technologies Are Ready?Out of the Lab and Into the Datacenter - Which Technologies Are Ready?
Out of the Lab and Into the Datacenter - Which Technologies Are Ready?
 
From 100s to 100s of Millions
From 100s to 100s of MillionsFrom 100s to 100s of Millions
From 100s to 100s of Millions
 
Gestalt IT - Why It’s Time to Stop Thinking In Terms of Silos
Gestalt IT - Why It’s Time to Stop Thinking In Terms of SilosGestalt IT - Why It’s Time to Stop Thinking In Terms of Silos
Gestalt IT - Why It’s Time to Stop Thinking In Terms of Silos
 
Vitess: Scalable Database Architecture - Kubernetes Community Days Africa Ap...
Vitess: Scalable Database Architecture -  Kubernetes Community Days Africa Ap...Vitess: Scalable Database Architecture -  Kubernetes Community Days Africa Ap...
Vitess: Scalable Database Architecture - Kubernetes Community Days Africa Ap...
 
Technologies, Data Analytics Service and Enterprise Business
Technologies, Data Analytics Service and Enterprise BusinessTechnologies, Data Analytics Service and Enterprise Business
Technologies, Data Analytics Service and Enterprise Business
 
When is Myrocks good? 2020 Webinar Series
When is Myrocks good? 2020 Webinar SeriesWhen is Myrocks good? 2020 Webinar Series
When is Myrocks good? 2020 Webinar Series
 
AWS Cloud experience concepts tips and tricks
AWS Cloud experience concepts tips and tricksAWS Cloud experience concepts tips and tricks
AWS Cloud experience concepts tips and tricks
 
Developing a Staff-Only Samvera Application
Developing a Staff-Only Samvera ApplicationDeveloping a Staff-Only Samvera Application
Developing a Staff-Only Samvera Application
 
Technologies for Data Analytics Platform
Technologies for Data Analytics PlatformTechnologies for Data Analytics Platform
Technologies for Data Analytics Platform
 
Repository performance tuning
Repository performance tuningRepository performance tuning
Repository performance tuning
 
January 2011 HUG: Kafka Presentation
January 2011 HUG: Kafka PresentationJanuary 2011 HUG: Kafka Presentation
January 2011 HUG: Kafka Presentation
 
KubeCon_NA_2021
KubeCon_NA_2021KubeCon_NA_2021
KubeCon_NA_2021
 
Erlang at Nu Echo
Erlang at Nu EchoErlang at Nu Echo
Erlang at Nu Echo
 
Boost on!!next generation big data platform
Boost on!!next generation big data platformBoost on!!next generation big data platform
Boost on!!next generation big data platform
 
Scaling MySQL using Fabric
Scaling MySQL using FabricScaling MySQL using Fabric
Scaling MySQL using Fabric
 
Copycat presentation
Copycat presentationCopycat presentation
Copycat presentation
 

Destaque

What's New in Infinispan 6.0
What's New in Infinispan 6.0What's New in Infinispan 6.0
What's New in Infinispan 6.0JBUG London
 
Infinispan,Lucene,Hibername OGM
Infinispan,Lucene,Hibername OGMInfinispan,Lucene,Hibername OGM
Infinispan,Lucene,Hibername OGMJBug Italy
 
Infinispan – the open source data grid platform by Mircea Markus
Infinispan – the open source data grid platform by Mircea MarkusInfinispan – the open source data grid platform by Mircea Markus
Infinispan – the open source data grid platform by Mircea MarkusCodemotion
 
Infinispan Data Grid Platform
Infinispan Data Grid PlatformInfinispan Data Grid Platform
Infinispan Data Grid Platformjbugkorea
 
London JBUG April 2015 - Performance Tuning Apps with WildFly Application Server
London JBUG April 2015 - Performance Tuning Apps with WildFly Application ServerLondon JBUG April 2015 - Performance Tuning Apps with WildFly Application Server
London JBUG April 2015 - Performance Tuning Apps with WildFly Application ServerJBUG London
 
Introducing Infinispan
Introducing InfinispanIntroducing Infinispan
Introducing InfinispanPT.JUG
 
Infinispan, a distributed in-memory key/value data grid and cache
 Infinispan, a distributed in-memory key/value data grid and cache Infinispan, a distributed in-memory key/value data grid and cache
Infinispan, a distributed in-memory key/value data grid and cacheSebastian Andrasoni
 

Destaque (8)

What's New in Infinispan 6.0
What's New in Infinispan 6.0What's New in Infinispan 6.0
What's New in Infinispan 6.0
 
Infinispan,Lucene,Hibername OGM
Infinispan,Lucene,Hibername OGMInfinispan,Lucene,Hibername OGM
Infinispan,Lucene,Hibername OGM
 
Infinispan – the open source data grid platform by Mircea Markus
Infinispan – the open source data grid platform by Mircea MarkusInfinispan – the open source data grid platform by Mircea Markus
Infinispan – the open source data grid platform by Mircea Markus
 
Infinispan
InfinispanInfinispan
Infinispan
 
Infinispan Data Grid Platform
Infinispan Data Grid PlatformInfinispan Data Grid Platform
Infinispan Data Grid Platform
 
London JBUG April 2015 - Performance Tuning Apps with WildFly Application Server
London JBUG April 2015 - Performance Tuning Apps with WildFly Application ServerLondon JBUG April 2015 - Performance Tuning Apps with WildFly Application Server
London JBUG April 2015 - Performance Tuning Apps with WildFly Application Server
 
Introducing Infinispan
Introducing InfinispanIntroducing Infinispan
Introducing Infinispan
 
Infinispan, a distributed in-memory key/value data grid and cache
 Infinispan, a distributed in-memory key/value data grid and cache Infinispan, a distributed in-memory key/value data grid and cache
Infinispan, a distributed in-memory key/value data grid and cache
 

Semelhante a Why RESTful Design for the Cloud is Best

Introduction to Restful Web Services
Introduction to Restful Web ServicesIntroduction to Restful Web Services
Introduction to Restful Web Servicesweili_at_slideshare
 
Optimizing Latency-Sensitive Queries for Presto at Facebook: A Collaboration ...
Optimizing Latency-Sensitive Queries for Presto at Facebook: A Collaboration ...Optimizing Latency-Sensitive Queries for Presto at Facebook: A Collaboration ...
Optimizing Latency-Sensitive Queries for Presto at Facebook: A Collaboration ...Alluxio, Inc.
 
Eclipse Enterprise Content Repository (ECR)
Eclipse Enterprise Content Repository (ECR)Eclipse Enterprise Content Repository (ECR)
Eclipse Enterprise Content Repository (ECR)Florent Guillaume
 
Service-Oriented Design and Implement with Rails3
Service-Oriented Design and Implement with Rails3Service-Oriented Design and Implement with Rails3
Service-Oriented Design and Implement with Rails3Wen-Tien Chang
 
Cross-platform interaction
Cross-platform interactionCross-platform interaction
Cross-platform interactionOleksii Duhno
 
Your API is Bad and You Should Feel Bad
Your API is Bad and You Should Feel BadYour API is Bad and You Should Feel Bad
Your API is Bad and You Should Feel BadAmanda Folson
 
Directories for the REST of Us: REST to LDAP in OpenDJ 2.6
Directories for the REST of Us: REST to LDAP in OpenDJ 2.6Directories for the REST of Us: REST to LDAP in OpenDJ 2.6
Directories for the REST of Us: REST to LDAP in OpenDJ 2.6ForgeRock
 
Building Software Backend (Web API)
Building Software Backend (Web API)Building Software Backend (Web API)
Building Software Backend (Web API)Alexander Goida
 
2010 code camp rest for the rest of us
2010 code camp   rest for the rest of us2010 code camp   rest for the rest of us
2010 code camp rest for the rest of usKen Yagen
 
REST Methodologies
REST MethodologiesREST Methodologies
REST Methodologiesjrodbx
 
Library Mashups & APIs
Library Mashups & APIsLibrary Mashups & APIs
Library Mashups & APIslibrarywebchic
 
hibernateormfeatures-140223193044-phpapp02.pdf
hibernateormfeatures-140223193044-phpapp02.pdfhibernateormfeatures-140223193044-phpapp02.pdf
hibernateormfeatures-140223193044-phpapp02.pdfPatiento Del Mar
 
Performance and Abstractions
Performance and AbstractionsPerformance and Abstractions
Performance and AbstractionsMetosin Oy
 
Restful风格ž„web服务架构
Restful风格ž„web服务架构Restful风格ž„web服务架构
Restful风格ž„web服务架构Benjamin Tan
 
A PHP library for Ontopia-CMS Integration
A PHP library for Ontopia-CMS IntegrationA PHP library for Ontopia-CMS Integration
A PHP library for Ontopia-CMS Integrationtmra
 
Untangling - fall2017 - week 8
Untangling - fall2017 - week 8Untangling - fall2017 - week 8
Untangling - fall2017 - week 8Derek Jacoby
 
Making Cloudy Peanut Butter Cups: Apache CloudStack + Riak CS
Making Cloudy Peanut Butter Cups: Apache CloudStack + Riak CSMaking Cloudy Peanut Butter Cups: Apache CloudStack + Riak CS
Making Cloudy Peanut Butter Cups: Apache CloudStack + Riak CSJohn Burwell
 

Semelhante a Why RESTful Design for the Cloud is Best (20)

Introduction to Restful Web Services
Introduction to Restful Web ServicesIntroduction to Restful Web Services
Introduction to Restful Web Services
 
Optimizing Latency-Sensitive Queries for Presto at Facebook: A Collaboration ...
Optimizing Latency-Sensitive Queries for Presto at Facebook: A Collaboration ...Optimizing Latency-Sensitive Queries for Presto at Facebook: A Collaboration ...
Optimizing Latency-Sensitive Queries for Presto at Facebook: A Collaboration ...
 
Planidoo & Zotonic
Planidoo & ZotonicPlanidoo & Zotonic
Planidoo & Zotonic
 
Apereo OAE - Bootcamp
Apereo OAE - BootcampApereo OAE - Bootcamp
Apereo OAE - Bootcamp
 
Eclipse Enterprise Content Repository (ECR)
Eclipse Enterprise Content Repository (ECR)Eclipse Enterprise Content Repository (ECR)
Eclipse Enterprise Content Repository (ECR)
 
Service-Oriented Design and Implement with Rails3
Service-Oriented Design and Implement with Rails3Service-Oriented Design and Implement with Rails3
Service-Oriented Design and Implement with Rails3
 
Cross-platform interaction
Cross-platform interactionCross-platform interaction
Cross-platform interaction
 
Your API is Bad and You Should Feel Bad
Your API is Bad and You Should Feel BadYour API is Bad and You Should Feel Bad
Your API is Bad and You Should Feel Bad
 
Directories for the REST of Us: REST to LDAP in OpenDJ 2.6
Directories for the REST of Us: REST to LDAP in OpenDJ 2.6Directories for the REST of Us: REST to LDAP in OpenDJ 2.6
Directories for the REST of Us: REST to LDAP in OpenDJ 2.6
 
Building Software Backend (Web API)
Building Software Backend (Web API)Building Software Backend (Web API)
Building Software Backend (Web API)
 
2010 code camp rest for the rest of us
2010 code camp   rest for the rest of us2010 code camp   rest for the rest of us
2010 code camp rest for the rest of us
 
REST Methodologies
REST MethodologiesREST Methodologies
REST Methodologies
 
Library Mashups & APIs
Library Mashups & APIsLibrary Mashups & APIs
Library Mashups & APIs
 
hibernateormfeatures-140223193044-phpapp02.pdf
hibernateormfeatures-140223193044-phpapp02.pdfhibernateormfeatures-140223193044-phpapp02.pdf
hibernateormfeatures-140223193044-phpapp02.pdf
 
Performance and Abstractions
Performance and AbstractionsPerformance and Abstractions
Performance and Abstractions
 
Restful风格ž„web服务架构
Restful风格ž„web服务架构Restful风格ž„web服务架构
Restful风格ž„web服务架构
 
A PHP library for Ontopia-CMS Integration
A PHP library for Ontopia-CMS IntegrationA PHP library for Ontopia-CMS Integration
A PHP library for Ontopia-CMS Integration
 
Untangling - fall2017 - week 8
Untangling - fall2017 - week 8Untangling - fall2017 - week 8
Untangling - fall2017 - week 8
 
HDF Cloud Services
HDF Cloud ServicesHDF Cloud Services
HDF Cloud Services
 
Making Cloudy Peanut Butter Cups: Apache CloudStack + Riak CS
Making Cloudy Peanut Butter Cups: Apache CloudStack + Riak CSMaking Cloudy Peanut Butter Cups: Apache CloudStack + Riak CS
Making Cloudy Peanut Butter Cups: Apache CloudStack + Riak CS
 

Último

Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Bhuvaneswari Subramani
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 

Último (20)

Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 

Why RESTful Design for the Cloud is Best

  • 2. Why RESTful Design for Cloud is Best Galder Zamarreño Senior Software Engineer, Red Hat 25th June 2010 Friday, June 25, 2010
  • 3. Who is Galder? • Core R&D engineer on Infinispan and JBoss Cache • Contributor and committer on JBoss AS, Hibernate, JGroups, JBoss Portal...etc Friday, June 25, 2010
  • 4. Agenda • Brief introduction to RESTful principles • Cloud APIs and REST • Cloud storage with Infinispan REST module • Applying RESTful principles to other APIs • Demo Friday, June 25, 2010
  • 5. What is REST? • REpresentational State Transfer (Roy Fielding) • An architectural style • Part of the web from day 1 (sort of...) • Evolved with HTTP 1.1 Friday, June 25, 2010
  • 6. What it is not • A protocol • An interface • An API • A standard • A drop in replacement for SOAP (or RPC) Friday, June 25, 2010
  • 7. What is right with REST • Fixed well defined verbs • GET = Read only operation to query info • PUT = Stores body sent in location • POST = Create subordinate resources • DELETE = Remove resources • HEAD = Like GET but no response body Friday, June 25, 2010
  • 8. What is right with REST • Focus on resources (not services) • Makes “service implementors” work harder • Requests are stateless • Hypermedia As The Engine of Application State (HATEOAS) Friday, June 25, 2010
  • 9. Cloud APIs and REST • 2 categories for Cloud APIs with different requirements • IT/Cloud resource management • Non-REST APIs: SNMP, WBEM, WMI, JMX/RMI, OSGI...etc • Cloud storage • Non-REST APIs: NFS, CIFS, WebDAV...etc • REST can provide a consistent set of principles Friday, June 25, 2010
  • 10. REST for resource management APIs • Short term: • REST reduces invalid state transition calls • REST is to IT management protocol design what classical music training is to a rock musician • Long term: • REST enables IT management console “in the cloud” • But above all: • The API doesn't constrain the design of the URI space Friday, June 25, 2010
  • 11. What REST can't do for resource management • Querying: “Get all JBoss AS instances running on Linux that don't have patch JBAS-1234 applied” • Links are part of resource representation, not resources of their own • Retrieving resource configuration change history • Can you guarantee that URIs will remain unchanged? • These problems beg for an RPC pattern Friday, June 25, 2010
  • 12. Who is using REST for resource management? • Sun Cloud API • Unfortunately dropped :( • Rackspace • Multiple representation - JSON/XML...etc • EC2 • No REST; Plain HTTP or SOAP • VMWare vCloud Friday, June 25, 2010
  • 13. REST for cloud storage APIs • REST promotes a “stateless” architecture • No need for maintaining sessions, easier to scale up • Improved network efficiency thanks to caching • Internet is highly latent • NFS or CIFS only valid in local network access Friday, June 25, 2010
  • 14. REST for cloud storage APIs • WebDAV is useful over an internet connection • … but limited to traditional file operations • i.e. store, retrieve...etc • REST offers a solution... • … that is more flexible and robust • … and works in both remote and local access modes Friday, June 25, 2010
  • 15. Who is using REST for cloud storage? • Tons! • Amazon S3, Eucalyptus, Rackspace, Mezeo, Nirvanix, ...etc • Cloud storage abstractions libraries ease transition • jclouds for java/clojure • Simple Cloud for PHP Friday, June 25, 2010
  • 16. Cloud storage DYI with Infinispan • No need to rely on 3rd party • You can build your own based on Infinispan • Infinispan is an in-memory data grid platform • Consistent hash based data distribution • Built-in eviction, prevents OOMs! • GUI management and monitoring provided by JOPR Friday, June 25, 2010
  • 17. Cloud storage DYI with Infinispan • Infinispan is remotely accessible via: • Hot Rod - a custom binary protocol • Memcached text protocol • WebSocket for javascript clients (HTML5) • RESTful interface (of course!) Friday, June 25, 2010
  • 18. Infinispan RESTful interface • PUT /{cacheName}/{cacheKey} • Insert or update payload in cache's key • POST /{cacheName}/{cacheKey} • Same as PUT but if key exists, returns HTTP conflict • Headers for PUT/POST • Content-Type mandatory – use media/mime-types • Optional: timeToLiveSeconds, maxIdleTimeSeconds, performAsync Friday, June 25, 2010
  • 19. Infinispan RESTful interface • GET /{cacheName}/{cacheKey} • Return value of cached key as body in response • DELETE /{cacheName}/{cacheKey} • Remove given key from cache • DELETE /{cacheName} • Remove ALL the entries from given cache Friday, June 25, 2010
  • 20. Infinispan REST Clients • Any HTTP client will do, example: Friday, June 25, 2010
  • 21. Applying RESTful principles to other APIs • Any Resource Oriented Architecture (ROA) • i.e. A library with books and members as resources • A resource has... • Unique ID (and hence an URI) • i.e. http://my.library.com/book/1234 Friday, June 25, 2010
  • 22. Applying RESTful principles to other APIs • A resource can... • Be related/linked via hypermedia • Have different state and representations • i.e. Borrowed/Available, JSON/HTML/XML...etc • Systems with single entry point and rest discovered • i.e. Library as entry point and books/members linked Friday, June 25, 2010
  • 23. Applying RESTful principles to other APIs • Business processes represented HTTP methods • i.e. Borrowing a book represented as: • PUT http://my.library.com/member/5678/book/1234 • Use self-descriptive messages • i.e. application/my.library.com.Book+json Friday, June 25, 2010
  • 24. If REST told you to jump off a bridge, would you? • Complex queries with many parameters are tricky • i.e. “List the female Spanish members aged between 20 and 30 that borrowed books between 1980 and 1990, and never returned them” • Do not make resources out of such queries • RPC-like query operation is much better suited here Friday, June 25, 2010
  • 26. Summary • REST suits cloud management APIs • But remember limitations with history and queries • REST and cloud storage APIs are made for each other • Cloud storage with Infinispan REST module is simple • RESTful principles are applicable to other APIs • Don't convert queries into resources, use RPC Friday, June 25, 2010
  • 27. Questions? • Personal: • Site: http://galder.zamarreno.com • Twitter: @galderz • Project: • Site: http://www.infinispan.org • Blog: http://blog.infinispan.org • Twitter: @infinispan • Tweet: • #infinispan, #summitjbw Friday, June 25, 2010