SlideShare a Scribd company logo
1 of 31
Composing RESTful
Services with JOpera
              Cesare Pautasso
         Software Composition 2009
              Zurich, Switzerland




2 July 2009               ©2009 Cesare Pautasso | www.pautasso.info   1
Composing RESTful Services
                     with JOpera

                           Cesare Pautasso
                         Faculty of Informatics
                University of Lugano (USI), Switzerland
                      http://www.pautasso.info
                        http://www.jopera.org
2 July 2009               ©2009 Cesare Pautasso | www.pautasso.info   2
Web Service Composition Today

                    Composition Language                              WS-BPEL 2.0
                       Component Model                                 WSDL 1.1

             The WS-BPEL process model is layered on
           top of the service model defined by WSDL
           1.1. […] Both the process and its partners
           are exposed as WSDL services
                                            [BPEL 2.0 Standard, Section 3]

 2 July 2009              ©2009 Cesare Pautasso | www.pautasso.info                 3
RESTful Web Services APIs…


                                                          WSDL 1.1



                                                          …do not use
                                                           WSDL 1.1



2 July 2009   ©2009 Cesare Pautasso | www.pautasso.info                 4
Our Goal
  Compose RESTful Web Services into
        Mashups




 2 July 2009      ©2009 Cesare Pautasso | www.pautasso.info   5
Web 2.0 Mashups
 Software Composition for the Web


                 A mashup is a web application that
               combines data or functionality from
               two or more external sources to
               create a new service
                                                                   [Wikipedia]



 2 July 2009           ©2009 Cesare Pautasso | www.pautasso.info                 6
Example Mashup with RESTful Web Services

               +                             +                 =


 2 July 2009       ©2009 Cesare Pautasso | www.pautasso.info       7
Our Goal
  Compose RESTful Web Services into
        Mashups

Our Current Solution: JOpera
 Workflow-based, Visual Composition Language
 Abstract and Extensible Component Model
 Eclipse-based Integrated Composition Environment

 2 July 2009       ©2009 Cesare Pautasso | www.pautasso.info   8
Agenda
 Motivation
 REST Introduction (one slide)
 Composing RESTful services
 Demo: Doodle Map Mashup with JOpera
 Challenges
 Discussion



 2 July 2009        ©2009 Cesare Pautasso | www.pautasso.info   9
REST in one slide                                                   PUT

 Web Services expose their
     data and functionality trough                                 GET
                                                                          R
     resources identified by URI                                    POST
                                                                              DELETE
 Uniform Interface: Clients interact
     with the state of resources through 4 verbs:
     GET (read), POST (create), PUT (update), DELETE
 Multiple representations for the same resource
 Hyperlinks model resource relationships, valid
     state transitions and interaction protocols
 2 July 2009           ©2009 Cesare Pautasso | www.pautasso.info                  10
REST design elements
  Resources are published by Origin Servers
  Proxy/Gateways for caching, access control, adaptation
                                          HTTP

                        User Agent                      Origin Server


                             HTTP                                   HTTP

                User Agent      Proxy/Gateway                               Origin Server


  2 July 2009                   ©2009 Cesare Pautasso | www.pautasso.info                   11
What about composition?
  The basic design elements of the REST architectural style do
       not take composition into account

                                          HTTP

                        User Agent                      Origin Server

                                                                              Origin Server


                User Agent
                             HTTP

                                Composite
                                             ?                      HTTP

                                                                              Origin Server
                                RESTful service
                                                                            Origin Server
  2 July 2009                   ©2009 Cesare Pautasso | www.pautasso.info                     12
Composite Resources
                     DELETE
               PUT


               GET
                      C
                                 DELETE                               DELETE
                POST      PUT                              PUT


                          GET
                                          R                  GET
                                                                         S
                               POST                                   POST


 2 July 2009              ©2009 Cesare Pautasso | www.pautasso.info            13
Doodle Map Mashup
  Setup a Doodle with Yahoo! Local search and
       visualize the results of the poll on Google Maps




 2 July 2009           ©2009 Cesare Pautasso | www.pautasso.info   14
Doodle Map Composite Resources
                 Client                Composite                     Component
               Web Browser             Resources                     Resources

                                                      M              GET
                                                                            Y
                                       GET
                                                                     PUT
                                           POST

                                        GET
                                                       P              GET
                                                                            D
                                                                        POST


                                                                      GET
                                                                            G
 2 July 2009             ©2009 Cesare Pautasso | www.pautasso.info               15
Doodle Map Architecture
 Web Browser                          JOpera                                             RESTful
                                      Engine                                           Web Services
               GET                                                                        APIs
               POST                                                      GET

                                                                    POST
                                                                     GET
               RESTful API




                                                                         RESTful API
 2 July 2009                 ©2009 Cesare Pautasso | www.pautasso.info                            16
Demo
2 July 2009   ©2009 Cesare Pautasso | www.pautasso.info   17
Modeling the Composition in JOpera


                Control                             Data
                 Flow                               Flow
                        Service
                        Bindings

         JAVA   XPATH      XSLT                   HTML              HTTP   …
 2 July 2009            ©2009 Cesare Pautasso | www.pautasso.info              18
Control
 Flow




     Control Flow
     Dependency




2 July 2009         ©2009 Cesare Pautasso | www.pautasso.info   19
Data
  Flow




              Data Flow
              (Copy)




2 July 2009               ©2009 Cesare Pautasso | www.pautasso.info   20
Service
Bindings

     HTTP

    HTML

     XSLT

   XPATH

     JAVA

         …
 2 July 2009   ©2009 Cesare Pautasso | www.pautasso.info   21
Composition and REST: Some Challenges
 Resource addressing through URI
              How to interact with dynamic, variable set of URI?
 Uniform Interface (GET, POST, PUT, DELETE)
              Is this a new composition technique?
 Multiple resource representations
              Resource data type may only be known at run-time
              How to negotiate the most appropriate representation
               format?
 Hyperlinks
              Can the state of a composition be bookmarked?

 2 July 2009                   ©2009 Cesare Pautasso | www.pautasso.info   22
Resource Addressing through URI
 How to interact with dynamic, variable set of URI?




  2 July 2009             ©2009 Cesare Pautasso | www.pautasso.info   23
Uniform Interface (GET, POST, PUT, DELETE)
 Is this a new composition technique?




 Easy to configure the HTTP method in the adapter
 Hard to handle failure/idempotency semantics
  2 July 2009            ©2009 Cesare Pautasso | www.pautasso.info   24
Multiple Resource Representations
 Resource data type may only be known at run-time
 How to negotiate the most appropriate representation format?




                      Set HTTP Headers (Accept)

  2 July 2009            ©2009 Cesare Pautasso | www.pautasso.info   25
Hyperlinks
 Can the state of a composition be bookmarked?
           Follow hyperlinks




                              Generate hyperlinks
 2 July 2009           ©2009 Cesare Pautasso | www.pautasso.info   26
Composition and REST: More Challenges
 Missing Interface Description
              How to compose services without machine readable
               interface descriptions?
 Request correlation
              How to ensure stateless communication with the right
               instance of a composition?
 Caching/Idempotency
 Verification and Testing
 2 July 2009                     ©2009 Cesare Pautasso | www.pautasso.info   27
Conclusion
 Business Process Modeling Languages have been
  applied with success to compose “traditional” WS-*
  Web Services
 Business Process Modeling Languages should also be
  applied to compose RESTful Web Services
 JOpera for Eclipse is a visual process modeling tool
  with an extensible engine for composing both kinds of
  services (and many more) into Web 2.0 mashups

 2 July 2009         ©2009 Cesare Pautasso | www.pautasso.info   28
Composing RESTful Services
                     with JOpera
                           Cesare Pautasso
                         Faculty of Informatics
                University of Lugano (USI), Switzerland
                      http://www.pautasso.info


www.jopera.org
2 July 2009               ©2009 Cesare Pautasso | www.pautasso.info   29
PhD positions available!


                      Prof. Cesare Pautasso
                 University of Lugano, Switzerland
                       c.pautasso@ieee.org
                    http://www.pautasso.info

2.7.2009                                             30
                     ©2008 Cesare Pautasso
Mashups09 @ OOPSLA

                       http://www.mashup-oopsla.org/




               3rd International Workshop on
              Web APIs and Services Mashups
2 July 2009                   ©2009 Cesare Pautasso | www.pautasso.info   31

More Related Content

Similar to Composing REST APIs with JOpera Mashup Tool

Building a platform with Django, Docker and Salt | Djangocon lightning talk
Building a platform with Django, Docker and Salt | Djangocon lightning talkBuilding a platform with Django, Docker and Salt | Djangocon lightning talk
Building a platform with Django, Docker and Salt | Djangocon lightning talkdotCloud
 
Building a Platform with Django, Docker and Salt
Building a Platform with Django, Docker and SaltBuilding a Platform with Django, Docker and Salt
Building a Platform with Django, Docker and SaltDocker, Inc.
 
WS-* vs. RESTful Services
WS-* vs. RESTful ServicesWS-* vs. RESTful Services
WS-* vs. RESTful ServicesCesare Pautasso
 
Atomic Transactions for the REST of us
Atomic Transactions for the REST of usAtomic Transactions for the REST of us
Atomic Transactions for the REST of usCesare Pautasso
 
Mule ESB - Integration Simplified
Mule ESB - Integration SimplifiedMule ESB - Integration Simplified
Mule ESB - Integration SimplifiedRich Software
 
Push-Enabling RESTful Business Processes
Push-Enabling RESTful Business ProcessesPush-Enabling RESTful Business Processes
Push-Enabling RESTful Business ProcessesCesare Pautasso
 
Building a platform with Django, Docker, and Salt
Building a platform with Django, Docker, and SaltBuilding a platform with Django, Docker, and Salt
Building a platform with Django, Docker, and Saltbaremetal
 
Philly Spring UG Roo Overview
Philly Spring UG Roo OverviewPhilly Spring UG Roo Overview
Philly Spring UG Roo Overviewkrimple
 
Gaelyk quickie - GR8Conf Europe 2010 - Guillaume Laforge
Gaelyk quickie - GR8Conf Europe 2010 - Guillaume LaforgeGaelyk quickie - GR8Conf Europe 2010 - Guillaume Laforge
Gaelyk quickie - GR8Conf Europe 2010 - Guillaume LaforgeGuillaume Laforge
 
Cloud Foundry Bootcamp
Cloud Foundry BootcampCloud Foundry Bootcamp
Cloud Foundry BootcampJoshua Long
 
Some REST Design Patterns (and Anti-Patterns) - SOA Symposium 2009
Some REST Design Patterns (and Anti-Patterns) - SOA Symposium 2009Some REST Design Patterns (and Anti-Patterns) - SOA Symposium 2009
Some REST Design Patterns (and Anti-Patterns) - SOA Symposium 2009Cesare Pautasso
 
SOA/SCA FraScAti
SOA/SCA FraScAtiSOA/SCA FraScAti
SOA/SCA FraScAtiInria
 
Resource Oriented Architecture in Wireless Sensor Network
Resource Oriented Architecture in Wireless Sensor NetworkResource Oriented Architecture in Wireless Sensor Network
Resource Oriented Architecture in Wireless Sensor NetworkThomas Pham
 
If Web Services are the Answer, What's The Question
If Web Services are the Answer, What's The QuestionIf Web Services are the Answer, What's The Question
If Web Services are the Answer, What's The QuestionDuncan Hull
 
Why Memcached?
Why Memcached?Why Memcached?
Why Memcached?Gear6
 

Similar to Composing REST APIs with JOpera Mashup Tool (20)

Building a platform with Django, Docker and Salt | Djangocon lightning talk
Building a platform with Django, Docker and Salt | Djangocon lightning talkBuilding a platform with Django, Docker and Salt | Djangocon lightning talk
Building a platform with Django, Docker and Salt | Djangocon lightning talk
 
Building a Platform with Django, Docker and Salt
Building a Platform with Django, Docker and SaltBuilding a Platform with Django, Docker and Salt
Building a Platform with Django, Docker and Salt
 
SOA with REST
SOA with RESTSOA with REST
SOA with REST
 
WS-* vs. RESTful Services
WS-* vs. RESTful ServicesWS-* vs. RESTful Services
WS-* vs. RESTful Services
 
Atomic Transactions for the REST of us
Atomic Transactions for the REST of usAtomic Transactions for the REST of us
Atomic Transactions for the REST of us
 
Mule ESB - Integration Simplified
Mule ESB - Integration SimplifiedMule ESB - Integration Simplified
Mule ESB - Integration Simplified
 
Push-Enabling RESTful Business Processes
Push-Enabling RESTful Business ProcessesPush-Enabling RESTful Business Processes
Push-Enabling RESTful Business Processes
 
Building a platform with Django, Docker, and Salt
Building a platform with Django, Docker, and SaltBuilding a platform with Django, Docker, and Salt
Building a platform with Django, Docker, and Salt
 
Philly Spring UG Roo Overview
Philly Spring UG Roo OverviewPhilly Spring UG Roo Overview
Philly Spring UG Roo Overview
 
Gaelyk quickie - GR8Conf Europe 2010 - Guillaume Laforge
Gaelyk quickie - GR8Conf Europe 2010 - Guillaume LaforgeGaelyk quickie - GR8Conf Europe 2010 - Guillaume Laforge
Gaelyk quickie - GR8Conf Europe 2010 - Guillaume Laforge
 
BPMN for REST
BPMN for RESTBPMN for REST
BPMN for REST
 
Cloud Foundry Bootcamp
Cloud Foundry BootcampCloud Foundry Bootcamp
Cloud Foundry Bootcamp
 
Some REST Design Patterns (and Anti-Patterns) - SOA Symposium 2009
Some REST Design Patterns (and Anti-Patterns) - SOA Symposium 2009Some REST Design Patterns (and Anti-Patterns) - SOA Symposium 2009
Some REST Design Patterns (and Anti-Patterns) - SOA Symposium 2009
 
Rewire the Net
Rewire the NetRewire the Net
Rewire the Net
 
Www2008 Restws Pautasso Talk
Www2008 Restws Pautasso TalkWww2008 Restws Pautasso Talk
Www2008 Restws Pautasso Talk
 
SOA/SCA FraScAti
SOA/SCA FraScAtiSOA/SCA FraScAti
SOA/SCA FraScAti
 
Resource Oriented Architecture in Wireless Sensor Network
Resource Oriented Architecture in Wireless Sensor NetworkResource Oriented Architecture in Wireless Sensor Network
Resource Oriented Architecture in Wireless Sensor Network
 
If Web Services are the Answer, What's The Question
If Web Services are the Answer, What's The QuestionIf Web Services are the Answer, What's The Question
If Web Services are the Answer, What's The Question
 
Why Memcached?
Why Memcached?Why Memcached?
Why Memcached?
 
Bicocca Restws Pautasso Talk
Bicocca Restws Pautasso TalkBicocca Restws Pautasso Talk
Bicocca Restws Pautasso Talk
 

More from Cesare Pautasso

Beautiful APIs - SOSE2021 Keynote
Beautiful APIs - SOSE2021 KeynoteBeautiful APIs - SOSE2021 Keynote
Beautiful APIs - SOSE2021 KeynoteCesare Pautasso
 
How do you back up and consistently recover your microservice architecture?
How do you back up and consistently recover your microservice architecture?How do you back up and consistently recover your microservice architecture?
How do you back up and consistently recover your microservice architecture?Cesare Pautasso
 
Microservices: An Eventually Inconsistent Architectural Style?
Microservices: An Eventually Inconsistent Architectural Style?Microservices: An Eventually Inconsistent Architectural Style?
Microservices: An Eventually Inconsistent Architectural Style?Cesare Pautasso
 
Disaster Recovery and Microservices: The BAC Theorem
Disaster Recovery and Microservices: The BAC TheoremDisaster Recovery and Microservices: The BAC Theorem
Disaster Recovery and Microservices: The BAC TheoremCesare Pautasso
 
The Blockchain as a Software Connector
The Blockchain as a Software ConnectorThe Blockchain as a Software Connector
The Blockchain as a Software ConnectorCesare Pautasso
 
Team Situational Awareness and Architectural Decision Making with the Softwar...
Team Situational Awareness and Architectural Decision Making with the Softwar...Team Situational Awareness and Architectural Decision Making with the Softwar...
Team Situational Awareness and Architectural Decision Making with the Softwar...Cesare Pautasso
 
Service Oriented Architectures and Web Services
Service Oriented Architectures and Web ServicesService Oriented Architectures and Web Services
Service Oriented Architectures and Web ServicesCesare Pautasso
 
Exploiting Multicores to Optimize Business Process Execution
Exploiting Multicores to Optimize Business Process ExecutionExploiting Multicores to Optimize Business Process Execution
Exploiting Multicores to Optimize Business Process ExecutionCesare Pautasso
 
Real-time Mashups di Web Service Geografici
Real-time Mashups di Web Service GeograficiReal-time Mashups di Web Service Geografici
Real-time Mashups di Web Service GeograficiCesare Pautasso
 
Towards Scalable Service Composition on Multicores
Towards Scalable Service Composition on MulticoresTowards Scalable Service Composition on Multicores
Towards Scalable Service Composition on MulticoresCesare Pautasso
 
USI SCUBE Associate Member
USI SCUBE Associate MemberUSI SCUBE Associate Member
USI SCUBE Associate MemberCesare Pautasso
 
Lighweight Collaboration Management (Mashups09@OOPSLA)
Lighweight Collaboration Management (Mashups09@OOPSLA)Lighweight Collaboration Management (Mashups09@OOPSLA)
Lighweight Collaboration Management (Mashups09@OOPSLA)Cesare Pautasso
 
Scientific and Grid Workflow Management (SGS09)
Scientific and Grid Workflow Management (SGS09)Scientific and Grid Workflow Management (SGS09)
Scientific and Grid Workflow Management (SGS09)Cesare Pautasso
 

More from Cesare Pautasso (18)

Beautiful APIs - SOSE2021 Keynote
Beautiful APIs - SOSE2021 KeynoteBeautiful APIs - SOSE2021 Keynote
Beautiful APIs - SOSE2021 Keynote
 
How do you back up and consistently recover your microservice architecture?
How do you back up and consistently recover your microservice architecture?How do you back up and consistently recover your microservice architecture?
How do you back up and consistently recover your microservice architecture?
 
Microservices: An Eventually Inconsistent Architectural Style?
Microservices: An Eventually Inconsistent Architectural Style?Microservices: An Eventually Inconsistent Architectural Style?
Microservices: An Eventually Inconsistent Architectural Style?
 
Disaster Recovery and Microservices: The BAC Theorem
Disaster Recovery and Microservices: The BAC TheoremDisaster Recovery and Microservices: The BAC Theorem
Disaster Recovery and Microservices: The BAC Theorem
 
The Blockchain as a Software Connector
The Blockchain as a Software ConnectorThe Blockchain as a Software Connector
The Blockchain as a Software Connector
 
Team Situational Awareness and Architectural Decision Making with the Softwar...
Team Situational Awareness and Architectural Decision Making with the Softwar...Team Situational Awareness and Architectural Decision Making with the Softwar...
Team Situational Awareness and Architectural Decision Making with the Softwar...
 
Service Oriented Architectures and Web Services
Service Oriented Architectures and Web ServicesService Oriented Architectures and Web Services
Service Oriented Architectures and Web Services
 
Exploiting Multicores to Optimize Business Process Execution
Exploiting Multicores to Optimize Business Process ExecutionExploiting Multicores to Optimize Business Process Execution
Exploiting Multicores to Optimize Business Process Execution
 
Real-time Mashups di Web Service Geografici
Real-time Mashups di Web Service GeograficiReal-time Mashups di Web Service Geografici
Real-time Mashups di Web Service Geografici
 
Towards Scalable Service Composition on Multicores
Towards Scalable Service Composition on MulticoresTowards Scalable Service Composition on Multicores
Towards Scalable Service Composition on Multicores
 
USI SCUBE Associate Member
USI SCUBE Associate MemberUSI SCUBE Associate Member
USI SCUBE Associate Member
 
Lighweight Collaboration Management (Mashups09@OOPSLA)
Lighweight Collaboration Management (Mashups09@OOPSLA)Lighweight Collaboration Management (Mashups09@OOPSLA)
Lighweight Collaboration Management (Mashups09@OOPSLA)
 
Mashups09
Mashups09Mashups09
Mashups09
 
Scientific and Grid Workflow Management (SGS09)
Scientific and Grid Workflow Management (SGS09)Scientific and Grid Workflow Management (SGS09)
Scientific and Grid Workflow Management (SGS09)
 
Mashup Ecosystem
Mashup EcosystemMashup Ecosystem
Mashup Ecosystem
 
Mashup Atelier
Mashup AtelierMashup Atelier
Mashup Atelier
 
MetaCDN
MetaCDNMetaCDN
MetaCDN
 
Internet Mashups
Internet MashupsInternet Mashups
Internet Mashups
 

Recently uploaded

Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 

Recently uploaded (20)

Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 

Composing REST APIs with JOpera Mashup Tool

  • 1. Composing RESTful Services with JOpera Cesare Pautasso Software Composition 2009 Zurich, Switzerland 2 July 2009 ©2009 Cesare Pautasso | www.pautasso.info 1
  • 2. Composing RESTful Services with JOpera Cesare Pautasso Faculty of Informatics University of Lugano (USI), Switzerland http://www.pautasso.info http://www.jopera.org 2 July 2009 ©2009 Cesare Pautasso | www.pautasso.info 2
  • 3. Web Service Composition Today Composition Language WS-BPEL 2.0 Component Model WSDL 1.1 The WS-BPEL process model is layered on top of the service model defined by WSDL 1.1. […] Both the process and its partners are exposed as WSDL services [BPEL 2.0 Standard, Section 3] 2 July 2009 ©2009 Cesare Pautasso | www.pautasso.info 3
  • 4. RESTful Web Services APIs… WSDL 1.1 …do not use WSDL 1.1 2 July 2009 ©2009 Cesare Pautasso | www.pautasso.info 4
  • 5. Our Goal  Compose RESTful Web Services into Mashups 2 July 2009 ©2009 Cesare Pautasso | www.pautasso.info 5
  • 6. Web 2.0 Mashups  Software Composition for the Web A mashup is a web application that combines data or functionality from two or more external sources to create a new service [Wikipedia] 2 July 2009 ©2009 Cesare Pautasso | www.pautasso.info 6
  • 7. Example Mashup with RESTful Web Services + + = 2 July 2009 ©2009 Cesare Pautasso | www.pautasso.info 7
  • 8. Our Goal  Compose RESTful Web Services into Mashups Our Current Solution: JOpera  Workflow-based, Visual Composition Language  Abstract and Extensible Component Model  Eclipse-based Integrated Composition Environment 2 July 2009 ©2009 Cesare Pautasso | www.pautasso.info 8
  • 9. Agenda  Motivation  REST Introduction (one slide)  Composing RESTful services  Demo: Doodle Map Mashup with JOpera  Challenges  Discussion 2 July 2009 ©2009 Cesare Pautasso | www.pautasso.info 9
  • 10. REST in one slide PUT  Web Services expose their data and functionality trough GET R resources identified by URI POST DELETE  Uniform Interface: Clients interact with the state of resources through 4 verbs: GET (read), POST (create), PUT (update), DELETE  Multiple representations for the same resource  Hyperlinks model resource relationships, valid state transitions and interaction protocols 2 July 2009 ©2009 Cesare Pautasso | www.pautasso.info 10
  • 11. REST design elements  Resources are published by Origin Servers  Proxy/Gateways for caching, access control, adaptation HTTP User Agent Origin Server HTTP HTTP User Agent Proxy/Gateway Origin Server 2 July 2009 ©2009 Cesare Pautasso | www.pautasso.info 11
  • 12. What about composition?  The basic design elements of the REST architectural style do not take composition into account HTTP User Agent Origin Server Origin Server User Agent HTTP Composite ? HTTP Origin Server RESTful service Origin Server 2 July 2009 ©2009 Cesare Pautasso | www.pautasso.info 12
  • 13. Composite Resources DELETE PUT GET C DELETE DELETE POST PUT PUT GET R GET S POST POST 2 July 2009 ©2009 Cesare Pautasso | www.pautasso.info 13
  • 14. Doodle Map Mashup  Setup a Doodle with Yahoo! Local search and visualize the results of the poll on Google Maps 2 July 2009 ©2009 Cesare Pautasso | www.pautasso.info 14
  • 15. Doodle Map Composite Resources Client Composite Component Web Browser Resources Resources M GET Y GET PUT POST GET P GET D POST GET G 2 July 2009 ©2009 Cesare Pautasso | www.pautasso.info 15
  • 16. Doodle Map Architecture Web Browser JOpera RESTful Engine Web Services GET APIs POST GET POST GET RESTful API RESTful API 2 July 2009 ©2009 Cesare Pautasso | www.pautasso.info 16
  • 17. Demo 2 July 2009 ©2009 Cesare Pautasso | www.pautasso.info 17
  • 18. Modeling the Composition in JOpera Control Data Flow Flow Service Bindings JAVA XPATH XSLT HTML HTTP … 2 July 2009 ©2009 Cesare Pautasso | www.pautasso.info 18
  • 19. Control Flow Control Flow Dependency 2 July 2009 ©2009 Cesare Pautasso | www.pautasso.info 19
  • 20. Data Flow Data Flow (Copy) 2 July 2009 ©2009 Cesare Pautasso | www.pautasso.info 20
  • 21. Service Bindings HTTP HTML XSLT XPATH JAVA … 2 July 2009 ©2009 Cesare Pautasso | www.pautasso.info 21
  • 22. Composition and REST: Some Challenges  Resource addressing through URI  How to interact with dynamic, variable set of URI?  Uniform Interface (GET, POST, PUT, DELETE)  Is this a new composition technique?  Multiple resource representations  Resource data type may only be known at run-time  How to negotiate the most appropriate representation format?  Hyperlinks  Can the state of a composition be bookmarked? 2 July 2009 ©2009 Cesare Pautasso | www.pautasso.info 22
  • 23. Resource Addressing through URI  How to interact with dynamic, variable set of URI? 2 July 2009 ©2009 Cesare Pautasso | www.pautasso.info 23
  • 24. Uniform Interface (GET, POST, PUT, DELETE)  Is this a new composition technique?  Easy to configure the HTTP method in the adapter  Hard to handle failure/idempotency semantics 2 July 2009 ©2009 Cesare Pautasso | www.pautasso.info 24
  • 25. Multiple Resource Representations  Resource data type may only be known at run-time  How to negotiate the most appropriate representation format? Set HTTP Headers (Accept) 2 July 2009 ©2009 Cesare Pautasso | www.pautasso.info 25
  • 26. Hyperlinks  Can the state of a composition be bookmarked? Follow hyperlinks Generate hyperlinks 2 July 2009 ©2009 Cesare Pautasso | www.pautasso.info 26
  • 27. Composition and REST: More Challenges  Missing Interface Description  How to compose services without machine readable interface descriptions?  Request correlation  How to ensure stateless communication with the right instance of a composition?  Caching/Idempotency  Verification and Testing 2 July 2009 ©2009 Cesare Pautasso | www.pautasso.info 27
  • 28. Conclusion  Business Process Modeling Languages have been applied with success to compose “traditional” WS-* Web Services  Business Process Modeling Languages should also be applied to compose RESTful Web Services  JOpera for Eclipse is a visual process modeling tool with an extensible engine for composing both kinds of services (and many more) into Web 2.0 mashups 2 July 2009 ©2009 Cesare Pautasso | www.pautasso.info 28
  • 29. Composing RESTful Services with JOpera Cesare Pautasso Faculty of Informatics University of Lugano (USI), Switzerland http://www.pautasso.info www.jopera.org 2 July 2009 ©2009 Cesare Pautasso | www.pautasso.info 29
  • 30. PhD positions available! Prof. Cesare Pautasso University of Lugano, Switzerland c.pautasso@ieee.org http://www.pautasso.info 2.7.2009 30 ©2008 Cesare Pautasso
  • 31. Mashups09 @ OOPSLA http://www.mashup-oopsla.org/ 3rd International Workshop on Web APIs and Services Mashups 2 July 2009 ©2009 Cesare Pautasso | www.pautasso.info 31