SlideShare a Scribd company logo
1 of 34
Modeling RESTful Conversations
with Extended
BPMN Choreography Diagrams
Cesare Pautasso, Ana Ivanchikj
University of Lugano (USI)
Switzerland
Silvia Schreier
innoQ Deutschland GmbH
Germany
European Conference on Software Architecture
Cavtat, September 7-11
ECSA 2015
ana.ivanchikj@usi.ch
RESTful conversation
REST BPMN Choreography Extended BPMN Choreography Example Model Abstractions and Simplifications Future work
ana.ivanchikj@usi.ch
2
Resource
URI
Resource
URI
Resource
URI
PUTURI
reference create
Link Relationships (Hypermedia)
ana.ivanchikj@usi.ch
RESTful conversation
REST BPMN Choreography Extended BPMN Choreography Example Model Abstractions and Simplifications Future work
ana.ivanchikj@usi.ch
3
Resource
URI
Resource
URI
Resource
URI
PUTURI
reference create
Link Relationships (Hypermedia)
201Created
ana.ivanchikj@usi.ch
4
REST API structure - RAML
REST BPMN Choreography Extended BPMN Choreography Example Model Abstractions and Simplifications Future work
ana.ivanchikj@usi.ch
5
REST API structure- Swagger
REST BPMN Choreography Extended BPMN Choreography Example Model Abstractions and Simplifications Future work
ana.ivanchikj@usi.ch
6
GET /resource 1 HTTP/1.1
HTTP/1.1 303 See Other
Location: /resource2
GET /resource2 HTTP/1.1
HTTP/1.1 200 OK
REST API dynamics
UML Sequence diagram BPMN Choreography diagram
REST BPMN Choreography Extended BPMN Choreography Example Model Abstractions and Simplifications Future work
- Redirect -
ana.ivanchikj@usi.ch
BPMN Choreography
7
Inclusive gateway
Parallel gateway
REST BPMN Choreography Extended BPMN Choreography Example Model Abstractions and Simplifications Future work
Exclusive gateway
ana.ivanchikj@usi.ch
8
GET /resource 1 HTTP/1.1
HTTP/1.1 303 See Other
Location: /resource2
GET /resource2 HTTP/1.1
HTTP/1.1 200 OK
REST API dynamics
UML Sequence diagram BPMN Choreography diagram Our proposal
REST BPMN Choreography Extended BPMN Choreography Example Model Abstractions and Simplifications Future work
- Redirect -
ana.ivanchikj@usi.ch
Extended BPMN Choreography
9REST BPMN Choreography Extended BPMN Choreography Example Model Abstractions and Simplifications Future work
Assumption:
ONE client – ONE server
ana.ivanchikj@usi.ch
10REST BPMN Choreography Extended BPMN Choreography Example Model Abstractions and Simplifications Future work
ana.ivanchikj@usi.ch
11REST BPMN Choreography Extended BPMN Choreography Example Model Abstractions and Simplifications Future work
ana.ivanchikj@usi.ch
12REST BPMN Choreography Extended BPMN Choreography Example Model Abstractions and Simplifications Future work
ana.ivanchikj@usi.ch
Long-running Request
-RESTful Conversation Example-
13REST BPMN Choreography Extended BPMN Choreography Example Model Abstractions and Simplifications Future work
e.g.: http://docs.aws.amazon.com/amazonglacier/latest/dev/job-operations.html
ana.ivanchikj@usi.ch
Long-running Request
- Happy path -
14
Create job POST / job HTTP/1.1
HTTP/1.1 202 Accepted
Location: / job / 42
Poll GET / job / 42 HTTP/1.1
HTTP/1.1 200 OK
Read results GET / job / 42 / output HTTP/1.1
HTTP/1.1 200 OK
REST BPMN Choreography Extended BPMN Choreography Example Model Abstractions and Simplifications Future work
GET / job / 42 HTTP/1.1
HTTP/1.1 303 See Other
Location: / job / 42 / output
ana.ivanchikj@usi.ch
Long-running Request
- Resending the request -
15
Create job POST / job HTTP/1.1
Poll GET / job / 42 HTTP/1.1
HTTP/1.1 200 OK
GET / job / 42 HTTP/1.1
HTTP/1.1 303 See Other
Location: / job / 42 / output
Read results GET / job / 42 / output HTTP/1.1
HTTP/1.1 200 OK
REST BPMN Choreography Extended BPMN Choreography Example Model Abstractions and Simplifications Future work
HTTP/1.1 202 Accepted
Location: / job / 42
POST / job HTTP/1.1
ana.ivanchikj@usi.ch
Long-running Request
- Reading the results -
16REST BPMN Choreography Extended BPMN Choreography Example Model Abstractions and Simplifications Future work
Create job POST / job HTTP/1.1
Poll GET / job / 42 HTTP/1.1
HTTP/1.1 200 OK
GET / job / 42 HTTP/1.1
HTTP/1.1 303 See Other
Location: / job / 42 / output
Read results GET / job / 42 / output HTTP/1.1
HTTP/1.1 200 OK
HTTP/1.1 202 Accepted
Location: / job / 42
POST / job HTTP/1.1
GET / job / 42 / output HTTP/1.1
HTTP/1.1 200 OK
ana.ivanchikj@usi.ch
17
Long-running Request
- Deleting the output resource -
Delete output DELETE / job / 42 / output HTTP/1.1
HTTP/1.1 200 OK
REST BPMN Choreography Extended BPMN Choreography Example Model Abstractions and Simplifications Future work
Create job POST / job HTTP/1.1
Poll GET / job / 42 HTTP/1.1
HTTP/1.1 200 OK
GET / job / 42 HTTP/1.1
HTTP/1.1 303 See Other
Location: / job / 42 / output
Read results GET / job / 42 / output HTTP/1.1
HTTP/1.1 200 OK
HTTP/1.1 202 Accepted
Location: / job / 42
POST / job HTTP/1.1
GET / job / 42 / output HTTP/1.1
HTTP/1.1 200 OK
ana.ivanchikj@usi.ch
18
Long-running Request
- Deleting the output resource -
Delete output DELETE / job / 42 / output HTTP/1.1
HTTP/1.1 200 OK
REST BPMN Choreography Extended BPMN Choreography Example Model Abstractions and Simplifications Future work
Create job POST / job HTTP/1.1
Poll GET / job / 42 HTTP/1.1
HTTP/1.1 200 OK
GET / job / 42 HTTP/1.1
HTTP/1.1 303 See Other
Location: / job / 42 / output
HTTP/1.1 202 Accepted
Location: / job / 42
POST / job HTTP/1.1
ana.ivanchikj@usi.ch
19
Long-running Request
Clean up DELETE / job / 42 HTTP/1.1
HTTP/1.1 200 OK
REST BPMN Choreography Extended BPMN Choreography Example Model Abstractions and Simplifications Future work
Delete output DELETE / job / 42 / output HTTP/1.1
HTTP/1.1 200 OK
Create job POST / job HTTP/1.1
Poll GET / job / 42 HTTP/1.1
HTTP/1.1 200 OK
GET / job / 42 HTTP/1.1
HTTP/1.1 303 See Other
Location: / job / 42 / output
HTTP/1.1 202 Accepted
Location: / job / 42
POST / job HTTP/1.1
- Deleting the job resource -
ana.ivanchikj@usi.ch
20
Long-running Request
REST BPMN Choreography Extended BPMN Choreography Example Model Abstractions and Simplifications Future work
Create job POST / job HTTP/1.1
HTTP/1.1 202 Accepted
Location: / job / 42
POST / job HTTP/1.1
Delete job DELETE / job / 42 HTTP/1.1
HTTP/1.1 200 OK
- Deleting the job resource -
ana.ivanchikj@usi.ch
Long-running Request
21REST BPMN Choreography Extended BPMN Choreography Example Model Abstractions and Simplifications Future work
ana.ivanchikj@usi.ch
Long-running Request
- Short happy path -
22
Create job POST / job HTTP/1.1
HTTP/1.1 202 Accepted
Location: / job / 42
Read results GET / job / 42 / output HTTP/1.1
HTTP/1.1 200 OK
REST BPMN Choreography Extended BPMN Choreography Example Model Abstractions and Simplifications Future work
Poll GET / job / 42 HTTP/1.1
HTTP/1.1 303 See Other
Location: / job / 42 / output
ana.ivanchikj@usi.ch
23
Long-running Request
REST BPMN Choreography Extended BPMN Choreography Example Model Abstractions and Simplifications Future work
ana.ivanchikj@usi.ch
24
Long-running Request
- Long unhappy path -
REST BPMN Choreography Extended BPMN Choreography Example Model Abstractions and Simplifications Future work
Delete output DELETE / job / 42 / output HTTP/1.1
HTTP/1.1 200 OK
Create job POST / job HTTP/1.1
Read results GET / job / 42 / output HTTP/1.1
HTTP/1.1 200 OK
HTTP/1.1 202 Accepted
Location: / job / 42
POST / job HTTP/1.1
GET / job / 42 / output HTTP/1.1
HTTP/1.1 200 OK
Poll GET / job / 42 HTTP/1.1
HTTP/1.1 200 OK
GET / job / 42 HTTP/1.1
HTTP/1.1 303 See Other
Location: / job / 42 / output
GET / job / 42 HTTP/1.1
HTTP/1.1 200 OK
Delete job DELETE / job / 42 HTTP/1.1
HTTP/1.1 200 OK
ana.ivanchikj@usi.ch
Long-running Request
-BPMN Choreography-
25REST BPMN Choreography Extended BPMN Choreography Example Model Abstractions and Simplifications Future work
ana.ivanchikj@usi.ch
26
Long-running Request
-Extended BPMN Choreography-
REST BPMN Choreography Extended BPMN Choreography Example Model Abstractions and Simplifications Future work
ana.ivanchikj@usi.ch
Abstractions and Simplifications
27REST BPMN Choreography Extended BPMN Choreography Example Model Abstractions and Simplifications Future work
ana.ivanchikj@usi.ch
Abstraction – Server Error Response
28REST BPMN Choreography Extended BPMN Choreography Example Model Abstractions and Simplifications Future work
ana.ivanchikj@usi.ch
Abstraction – Idempotent requests
29REST BPMN Choreography Extended BPMN Choreography Example Model Abstractions and Simplifications Future work
ana.ivanchikj@usi.ch
Simplification – End events
30REST BPMN Choreography Extended BPMN Choreography Example Model Abstractions and Simplifications Future work
ana.ivanchikj@usi.ch
Simplification - Hyperlinks
31REST BPMN Choreography Extended BPMN Choreography Example Model Abstractions and Simplifications Future work
ana.ivanchikj@usi.ch
Simplifications and abstractions summary
32REST BPMN Choreography Extended BPMN Choreography Example Model Abstractions and Simplifications Future work
ana.ivanchikj@usi.ch
• Survey
– Understandability
– Ease of use
Future Work
• Conversation Patterns
– Expressiveness
– Collection
– Reusability
33REST BPMN Choreography Extended BPMN Choreography Example Model Abstractions and Simplifications Future work
Contact us at:
ana.ivanchikj@usi.ch
c.pautasso@ieee.org
silvia.schreier@innoq.com
Contribute to our research by filling in the survey!!!
http://restfulconversations.limequery.com/index.php/
215135/lang-en

More Related Content

Viewers also liked

In sight telepsychiatry competitor profiles tracey fu
In sight telepsychiatry competitor profiles tracey fuIn sight telepsychiatry competitor profiles tracey fu
In sight telepsychiatry competitor profiles tracey futraceyxfu
 
USF Mid East and Turkey Pitch
USF Mid East and Turkey PitchUSF Mid East and Turkey Pitch
USF Mid East and Turkey PitchContractor
 
Sales Hacker Conference San Francisco - Jason Lemkin - The 10 Key Revenue Mis...
Sales Hacker Conference San Francisco - Jason Lemkin - The 10 Key Revenue Mis...Sales Hacker Conference San Francisco - Jason Lemkin - The 10 Key Revenue Mis...
Sales Hacker Conference San Francisco - Jason Lemkin - The 10 Key Revenue Mis...Sales Hacker
 
A RESTful API for Controlling Dynamic Streaming Topologies
A RESTful API for Controlling Dynamic Streaming TopologiesA RESTful API for Controlling Dynamic Streaming Topologies
A RESTful API for Controlling Dynamic Streaming TopologiesMasiar Babazadeh
 
Best Practices for API Adoption
Best Practices for API AdoptionBest Practices for API Adoption
Best Practices for API AdoptionAnyPresence
 
SITB15 - Qu'est qu'une Data Driven Company à l'heure de la digitalisation ?
SITB15 - Qu'est qu'une Data Driven Company à l'heure de la digitalisation ?SITB15 - Qu'est qu'une Data Driven Company à l'heure de la digitalisation ?
SITB15 - Qu'est qu'une Data Driven Company à l'heure de la digitalisation ?cyrilpicat
 
Canada Digital Future 2014
Canada Digital Future 2014Canada Digital Future 2014
Canada Digital Future 2014Counselorauto
 
Education and Training for The Future Workforce
Education and Training for The Future WorkforceEducation and Training for The Future Workforce
Education and Training for The Future WorkforceWISE
 
Plaquette Commerciale Phone Contact
Plaquette Commerciale Phone ContactPlaquette Commerciale Phone Contact
Plaquette Commerciale Phone Contactphonecontact
 
Dynamic clouds and networks without infrastructure
Dynamic clouds and networks without infrastructureDynamic clouds and networks without infrastructure
Dynamic clouds and networks without infrastructureUniversity of Hertfordshire
 
HCLT Whitepaper: Multi- Tenancy on Private Cloud
HCLT Whitepaper: Multi- Tenancy on Private CloudHCLT Whitepaper: Multi- Tenancy on Private Cloud
HCLT Whitepaper: Multi- Tenancy on Private CloudHCL Technologies
 
Structure 2014 - The future of cloud computing survey results
Structure 2014 - The future of cloud computing survey resultsStructure 2014 - The future of cloud computing survey results
Structure 2014 - The future of cloud computing survey resultsGigaom
 
Città di Bassano Del Grappa
Città di Bassano Del GrappaCittà di Bassano Del Grappa
Città di Bassano Del GrappaZooppa Italia
 
Manthan Legal's Intelligence driven Contracts Lifecycle Management
Manthan Legal's Intelligence driven Contracts Lifecycle ManagementManthan Legal's Intelligence driven Contracts Lifecycle Management
Manthan Legal's Intelligence driven Contracts Lifecycle ManagementPiyush T
 
Integrated Customer Service Maximization Experience Vision Demonstrator
Integrated Customer Service Maximization Experience Vision DemonstratorIntegrated Customer Service Maximization Experience Vision Demonstrator
Integrated Customer Service Maximization Experience Vision DemonstratorMicrosoft
 
Social Media Specialist
Social Media SpecialistSocial Media Specialist
Social Media SpecialistContractor
 

Viewers also liked (18)

In sight telepsychiatry competitor profiles tracey fu
In sight telepsychiatry competitor profiles tracey fuIn sight telepsychiatry competitor profiles tracey fu
In sight telepsychiatry competitor profiles tracey fu
 
Qy stainless steel self priming gas-liquid mixing pump
Qy stainless steel self priming gas-liquid mixing pumpQy stainless steel self priming gas-liquid mixing pump
Qy stainless steel self priming gas-liquid mixing pump
 
USF Mid East and Turkey Pitch
USF Mid East and Turkey PitchUSF Mid East and Turkey Pitch
USF Mid East and Turkey Pitch
 
Sales Hacker Conference San Francisco - Jason Lemkin - The 10 Key Revenue Mis...
Sales Hacker Conference San Francisco - Jason Lemkin - The 10 Key Revenue Mis...Sales Hacker Conference San Francisco - Jason Lemkin - The 10 Key Revenue Mis...
Sales Hacker Conference San Francisco - Jason Lemkin - The 10 Key Revenue Mis...
 
A RESTful API for Controlling Dynamic Streaming Topologies
A RESTful API for Controlling Dynamic Streaming TopologiesA RESTful API for Controlling Dynamic Streaming Topologies
A RESTful API for Controlling Dynamic Streaming Topologies
 
Best Practices for API Adoption
Best Practices for API AdoptionBest Practices for API Adoption
Best Practices for API Adoption
 
SITB15 - Qu'est qu'une Data Driven Company à l'heure de la digitalisation ?
SITB15 - Qu'est qu'une Data Driven Company à l'heure de la digitalisation ?SITB15 - Qu'est qu'une Data Driven Company à l'heure de la digitalisation ?
SITB15 - Qu'est qu'une Data Driven Company à l'heure de la digitalisation ?
 
Canada Digital Future 2014
Canada Digital Future 2014Canada Digital Future 2014
Canada Digital Future 2014
 
Education and Training for The Future Workforce
Education and Training for The Future WorkforceEducation and Training for The Future Workforce
Education and Training for The Future Workforce
 
Plaquette Commerciale Phone Contact
Plaquette Commerciale Phone ContactPlaquette Commerciale Phone Contact
Plaquette Commerciale Phone Contact
 
Dynamic clouds and networks without infrastructure
Dynamic clouds and networks without infrastructureDynamic clouds and networks without infrastructure
Dynamic clouds and networks without infrastructure
 
HCLT Whitepaper: Multi- Tenancy on Private Cloud
HCLT Whitepaper: Multi- Tenancy on Private CloudHCLT Whitepaper: Multi- Tenancy on Private Cloud
HCLT Whitepaper: Multi- Tenancy on Private Cloud
 
Structure 2014 - The future of cloud computing survey results
Structure 2014 - The future of cloud computing survey resultsStructure 2014 - The future of cloud computing survey results
Structure 2014 - The future of cloud computing survey results
 
China air conditioner market report
China air conditioner market reportChina air conditioner market report
China air conditioner market report
 
Città di Bassano Del Grappa
Città di Bassano Del GrappaCittà di Bassano Del Grappa
Città di Bassano Del Grappa
 
Manthan Legal's Intelligence driven Contracts Lifecycle Management
Manthan Legal's Intelligence driven Contracts Lifecycle ManagementManthan Legal's Intelligence driven Contracts Lifecycle Management
Manthan Legal's Intelligence driven Contracts Lifecycle Management
 
Integrated Customer Service Maximization Experience Vision Demonstrator
Integrated Customer Service Maximization Experience Vision DemonstratorIntegrated Customer Service Maximization Experience Vision Demonstrator
Integrated Customer Service Maximization Experience Vision Demonstrator
 
Social Media Specialist
Social Media SpecialistSocial Media Specialist
Social Media Specialist
 

Similar to ECSA'15 - Modeling REST-ful conversations

KaTe RESTful adapter for SAP Process Integration: Introduction
KaTe RESTful adapter for SAP Process Integration: IntroductionKaTe RESTful adapter for SAP Process Integration: Introduction
KaTe RESTful adapter for SAP Process Integration: IntroductionKate_RESTful
 
Revisiting HTTP/2
Revisiting HTTP/2Revisiting HTTP/2
Revisiting HTTP/2Fastly
 
Operational API design anti-patterns (Jason Harmon)
Operational API design anti-patterns (Jason Harmon)Operational API design anti-patterns (Jason Harmon)
Operational API design anti-patterns (Jason Harmon)Nordic APIs
 
HTTP colon slash slash: the end of the road?
HTTP colon slash slash: the end of the road?HTTP colon slash slash: the end of the road?
HTTP colon slash slash: the end of the road?Alessandro Nadalin
 
Designing Res Tful Rails Applications
Designing Res Tful Rails ApplicationsDesigning Res Tful Rails Applications
Designing Res Tful Rails ApplicationsConSanFrancisco123
 
GNU Parallel: Lab meeting—technical talk
GNU Parallel: Lab meeting—technical talkGNU Parallel: Lab meeting—technical talk
GNU Parallel: Lab meeting—technical talkHoffman Lab
 
WordPress REST API v2: Overview & Exploring
WordPress REST API v2: Overview & ExploringWordPress REST API v2: Overview & Exploring
WordPress REST API v2: Overview & ExploringNick Pelton
 

Similar to ECSA'15 - Modeling REST-ful conversations (10)

MODELS'16 - RESTalk
MODELS'16 - RESTalkMODELS'16 - RESTalk
MODELS'16 - RESTalk
 
KaTe RESTful adapter for SAP Process Integration: Introduction
KaTe RESTful adapter for SAP Process Integration: IntroductionKaTe RESTful adapter for SAP Process Integration: Introduction
KaTe RESTful adapter for SAP Process Integration: Introduction
 
Revisiting HTTP/2
Revisiting HTTP/2Revisiting HTTP/2
Revisiting HTTP/2
 
Operational API design anti-patterns (Jason Harmon)
Operational API design anti-patterns (Jason Harmon)Operational API design anti-patterns (Jason Harmon)
Operational API design anti-patterns (Jason Harmon)
 
Composing REST Services
Composing REST ServicesComposing REST Services
Composing REST Services
 
HTTP colon slash slash: the end of the road?
HTTP colon slash slash: the end of the road?HTTP colon slash slash: the end of the road?
HTTP colon slash slash: the end of the road?
 
Designing Res Tful Rails Applications
Designing Res Tful Rails ApplicationsDesigning Res Tful Rails Applications
Designing Res Tful Rails Applications
 
GNU Parallel: Lab meeting—technical talk
GNU Parallel: Lab meeting—technical talkGNU Parallel: Lab meeting—technical talk
GNU Parallel: Lab meeting—technical talk
 
WordPress REST API v2: Overview & Exploring
WordPress REST API v2: Overview & ExploringWordPress REST API v2: Overview & Exploring
WordPress REST API v2: Overview & Exploring
 
RESTful design
RESTful designRESTful design
RESTful design
 

Recently uploaded

How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 

Recently uploaded (20)

How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 

ECSA'15 - Modeling REST-ful conversations

  • 1. Modeling RESTful Conversations with Extended BPMN Choreography Diagrams Cesare Pautasso, Ana Ivanchikj University of Lugano (USI) Switzerland Silvia Schreier innoQ Deutschland GmbH Germany European Conference on Software Architecture Cavtat, September 7-11 ECSA 2015
  • 2. ana.ivanchikj@usi.ch RESTful conversation REST BPMN Choreography Extended BPMN Choreography Example Model Abstractions and Simplifications Future work ana.ivanchikj@usi.ch 2 Resource URI Resource URI Resource URI PUTURI reference create Link Relationships (Hypermedia)
  • 3. ana.ivanchikj@usi.ch RESTful conversation REST BPMN Choreography Extended BPMN Choreography Example Model Abstractions and Simplifications Future work ana.ivanchikj@usi.ch 3 Resource URI Resource URI Resource URI PUTURI reference create Link Relationships (Hypermedia) 201Created
  • 4. ana.ivanchikj@usi.ch 4 REST API structure - RAML REST BPMN Choreography Extended BPMN Choreography Example Model Abstractions and Simplifications Future work
  • 5. ana.ivanchikj@usi.ch 5 REST API structure- Swagger REST BPMN Choreography Extended BPMN Choreography Example Model Abstractions and Simplifications Future work
  • 6. ana.ivanchikj@usi.ch 6 GET /resource 1 HTTP/1.1 HTTP/1.1 303 See Other Location: /resource2 GET /resource2 HTTP/1.1 HTTP/1.1 200 OK REST API dynamics UML Sequence diagram BPMN Choreography diagram REST BPMN Choreography Extended BPMN Choreography Example Model Abstractions and Simplifications Future work - Redirect -
  • 7. ana.ivanchikj@usi.ch BPMN Choreography 7 Inclusive gateway Parallel gateway REST BPMN Choreography Extended BPMN Choreography Example Model Abstractions and Simplifications Future work Exclusive gateway
  • 8. ana.ivanchikj@usi.ch 8 GET /resource 1 HTTP/1.1 HTTP/1.1 303 See Other Location: /resource2 GET /resource2 HTTP/1.1 HTTP/1.1 200 OK REST API dynamics UML Sequence diagram BPMN Choreography diagram Our proposal REST BPMN Choreography Extended BPMN Choreography Example Model Abstractions and Simplifications Future work - Redirect -
  • 9. ana.ivanchikj@usi.ch Extended BPMN Choreography 9REST BPMN Choreography Extended BPMN Choreography Example Model Abstractions and Simplifications Future work Assumption: ONE client – ONE server
  • 10. ana.ivanchikj@usi.ch 10REST BPMN Choreography Extended BPMN Choreography Example Model Abstractions and Simplifications Future work
  • 11. ana.ivanchikj@usi.ch 11REST BPMN Choreography Extended BPMN Choreography Example Model Abstractions and Simplifications Future work
  • 12. ana.ivanchikj@usi.ch 12REST BPMN Choreography Extended BPMN Choreography Example Model Abstractions and Simplifications Future work
  • 13. ana.ivanchikj@usi.ch Long-running Request -RESTful Conversation Example- 13REST BPMN Choreography Extended BPMN Choreography Example Model Abstractions and Simplifications Future work e.g.: http://docs.aws.amazon.com/amazonglacier/latest/dev/job-operations.html
  • 14. ana.ivanchikj@usi.ch Long-running Request - Happy path - 14 Create job POST / job HTTP/1.1 HTTP/1.1 202 Accepted Location: / job / 42 Poll GET / job / 42 HTTP/1.1 HTTP/1.1 200 OK Read results GET / job / 42 / output HTTP/1.1 HTTP/1.1 200 OK REST BPMN Choreography Extended BPMN Choreography Example Model Abstractions and Simplifications Future work GET / job / 42 HTTP/1.1 HTTP/1.1 303 See Other Location: / job / 42 / output
  • 15. ana.ivanchikj@usi.ch Long-running Request - Resending the request - 15 Create job POST / job HTTP/1.1 Poll GET / job / 42 HTTP/1.1 HTTP/1.1 200 OK GET / job / 42 HTTP/1.1 HTTP/1.1 303 See Other Location: / job / 42 / output Read results GET / job / 42 / output HTTP/1.1 HTTP/1.1 200 OK REST BPMN Choreography Extended BPMN Choreography Example Model Abstractions and Simplifications Future work HTTP/1.1 202 Accepted Location: / job / 42 POST / job HTTP/1.1
  • 16. ana.ivanchikj@usi.ch Long-running Request - Reading the results - 16REST BPMN Choreography Extended BPMN Choreography Example Model Abstractions and Simplifications Future work Create job POST / job HTTP/1.1 Poll GET / job / 42 HTTP/1.1 HTTP/1.1 200 OK GET / job / 42 HTTP/1.1 HTTP/1.1 303 See Other Location: / job / 42 / output Read results GET / job / 42 / output HTTP/1.1 HTTP/1.1 200 OK HTTP/1.1 202 Accepted Location: / job / 42 POST / job HTTP/1.1 GET / job / 42 / output HTTP/1.1 HTTP/1.1 200 OK
  • 17. ana.ivanchikj@usi.ch 17 Long-running Request - Deleting the output resource - Delete output DELETE / job / 42 / output HTTP/1.1 HTTP/1.1 200 OK REST BPMN Choreography Extended BPMN Choreography Example Model Abstractions and Simplifications Future work Create job POST / job HTTP/1.1 Poll GET / job / 42 HTTP/1.1 HTTP/1.1 200 OK GET / job / 42 HTTP/1.1 HTTP/1.1 303 See Other Location: / job / 42 / output Read results GET / job / 42 / output HTTP/1.1 HTTP/1.1 200 OK HTTP/1.1 202 Accepted Location: / job / 42 POST / job HTTP/1.1 GET / job / 42 / output HTTP/1.1 HTTP/1.1 200 OK
  • 18. ana.ivanchikj@usi.ch 18 Long-running Request - Deleting the output resource - Delete output DELETE / job / 42 / output HTTP/1.1 HTTP/1.1 200 OK REST BPMN Choreography Extended BPMN Choreography Example Model Abstractions and Simplifications Future work Create job POST / job HTTP/1.1 Poll GET / job / 42 HTTP/1.1 HTTP/1.1 200 OK GET / job / 42 HTTP/1.1 HTTP/1.1 303 See Other Location: / job / 42 / output HTTP/1.1 202 Accepted Location: / job / 42 POST / job HTTP/1.1
  • 19. ana.ivanchikj@usi.ch 19 Long-running Request Clean up DELETE / job / 42 HTTP/1.1 HTTP/1.1 200 OK REST BPMN Choreography Extended BPMN Choreography Example Model Abstractions and Simplifications Future work Delete output DELETE / job / 42 / output HTTP/1.1 HTTP/1.1 200 OK Create job POST / job HTTP/1.1 Poll GET / job / 42 HTTP/1.1 HTTP/1.1 200 OK GET / job / 42 HTTP/1.1 HTTP/1.1 303 See Other Location: / job / 42 / output HTTP/1.1 202 Accepted Location: / job / 42 POST / job HTTP/1.1 - Deleting the job resource -
  • 20. ana.ivanchikj@usi.ch 20 Long-running Request REST BPMN Choreography Extended BPMN Choreography Example Model Abstractions and Simplifications Future work Create job POST / job HTTP/1.1 HTTP/1.1 202 Accepted Location: / job / 42 POST / job HTTP/1.1 Delete job DELETE / job / 42 HTTP/1.1 HTTP/1.1 200 OK - Deleting the job resource -
  • 21. ana.ivanchikj@usi.ch Long-running Request 21REST BPMN Choreography Extended BPMN Choreography Example Model Abstractions and Simplifications Future work
  • 22. ana.ivanchikj@usi.ch Long-running Request - Short happy path - 22 Create job POST / job HTTP/1.1 HTTP/1.1 202 Accepted Location: / job / 42 Read results GET / job / 42 / output HTTP/1.1 HTTP/1.1 200 OK REST BPMN Choreography Extended BPMN Choreography Example Model Abstractions and Simplifications Future work Poll GET / job / 42 HTTP/1.1 HTTP/1.1 303 See Other Location: / job / 42 / output
  • 23. ana.ivanchikj@usi.ch 23 Long-running Request REST BPMN Choreography Extended BPMN Choreography Example Model Abstractions and Simplifications Future work
  • 24. ana.ivanchikj@usi.ch 24 Long-running Request - Long unhappy path - REST BPMN Choreography Extended BPMN Choreography Example Model Abstractions and Simplifications Future work Delete output DELETE / job / 42 / output HTTP/1.1 HTTP/1.1 200 OK Create job POST / job HTTP/1.1 Read results GET / job / 42 / output HTTP/1.1 HTTP/1.1 200 OK HTTP/1.1 202 Accepted Location: / job / 42 POST / job HTTP/1.1 GET / job / 42 / output HTTP/1.1 HTTP/1.1 200 OK Poll GET / job / 42 HTTP/1.1 HTTP/1.1 200 OK GET / job / 42 HTTP/1.1 HTTP/1.1 303 See Other Location: / job / 42 / output GET / job / 42 HTTP/1.1 HTTP/1.1 200 OK Delete job DELETE / job / 42 HTTP/1.1 HTTP/1.1 200 OK
  • 25. ana.ivanchikj@usi.ch Long-running Request -BPMN Choreography- 25REST BPMN Choreography Extended BPMN Choreography Example Model Abstractions and Simplifications Future work
  • 26. ana.ivanchikj@usi.ch 26 Long-running Request -Extended BPMN Choreography- REST BPMN Choreography Extended BPMN Choreography Example Model Abstractions and Simplifications Future work
  • 27. ana.ivanchikj@usi.ch Abstractions and Simplifications 27REST BPMN Choreography Extended BPMN Choreography Example Model Abstractions and Simplifications Future work
  • 28. ana.ivanchikj@usi.ch Abstraction – Server Error Response 28REST BPMN Choreography Extended BPMN Choreography Example Model Abstractions and Simplifications Future work
  • 29. ana.ivanchikj@usi.ch Abstraction – Idempotent requests 29REST BPMN Choreography Extended BPMN Choreography Example Model Abstractions and Simplifications Future work
  • 30. ana.ivanchikj@usi.ch Simplification – End events 30REST BPMN Choreography Extended BPMN Choreography Example Model Abstractions and Simplifications Future work
  • 31. ana.ivanchikj@usi.ch Simplification - Hyperlinks 31REST BPMN Choreography Extended BPMN Choreography Example Model Abstractions and Simplifications Future work
  • 32. ana.ivanchikj@usi.ch Simplifications and abstractions summary 32REST BPMN Choreography Extended BPMN Choreography Example Model Abstractions and Simplifications Future work
  • 33. ana.ivanchikj@usi.ch • Survey – Understandability – Ease of use Future Work • Conversation Patterns – Expressiveness – Collection – Reusability 33REST BPMN Choreography Extended BPMN Choreography Example Model Abstractions and Simplifications Future work
  • 34. Contact us at: ana.ivanchikj@usi.ch c.pautasso@ieee.org silvia.schreier@innoq.com Contribute to our research by filling in the survey!!! http://restfulconversations.limequery.com/index.php/ 215135/lang-en

Editor's Notes

  1. Good afternoon everyone. I am Ana Ivanchikj and I am here to present the paper “Modeling RESTful Converseations with Extended BPMN Choreography Diagrams” written by Professor Cesare Pautasso and myself from the University of Lugano and in cooperation with Ms. Silvia Schreier from innoQ Germany.
  2. Very often the services offered by REST APIs require multiple request-response cycles between the client and the server thus becoming a RESTful conversation. The general topic discussed are resources hosted by the server and identified with unique uniform resource identifiers, but than the client decides which methods to call on such resources and the server decides what response to provide depending on the state of the resource. So for example when a client is looking up a resource URI the server can provide a reference link to another resource thus redirecting the client request. When retrieving the representation of the related resource the client can get the necessary links with the relation to create a new resource and finally make a request to create such resource. Thus RESTful conversations are dynamically driven by hypermedia and can take different directions.
  3. Very often the services offered by REST APIs require multiple request-response cycles between the client and the server thus becoming a RESTful conversation. The general topic discussed are resources hosted by the server and identified with unique uniform resource identifiers, but than the client decides which methods to call on such resources and the server decides what response to provide depending on the state of the resource. So for example when a client is looking up a resource URI the server can provide a reference link to another resource thus redirecting the client request. When retrieving the representation of the related resource the client can get the necessary links with the relation to create a new resource and finally make a request to create such resource. Thus RESTful conversations are dynamically driven by hypermedia and can take different directions.
  4. Existing REST API documentation tools such as RAML or
  5. Swagger refer to the static structure and expose low-level HTTP details which describe each available resource, the methods that can be called on the same, the representation format (such as JSON or XML) etc.
  6. However a RESTful conversation is not static, thus these tools do not support hypermedia links nor a concise visual representation of the dynamics of a particular conversation, i.e., all the interactions necessary to reach client’s final goal, a sort of a map to help clients explore the REST API. In a simple sequential conversation such as a redirect the order of the interaction is evident even from a simple table. Or we can use a UML Sequence diagram to present the dynamics where the client requests the first resource, gets a link to another resource as a response and uses it to send the second request. However it becomes messy to include details about the request verbs, headers, status codes etc. in a sequence diagram. Especially in conversations which are much more complex than a redirect and include multiple loops or end events, such as when traversing a collection of resources or in a long-running request as we will see later on. So we had the idea of using a standard BPMN Choreography, since after all its purpose is defining the order in which the exchange of messages occurs between different participants in business processes. Who is familiar with BPMN Choreography diagrams?
  7. It is a simple concept. The initiation of the conversation is marked with a start event. The main element is the BPMN activity comprised of an optional incoming/outgoing message with a text annotation to depict the message content and a three band choreography task containing the names of the conversation participants. Gateways are used to determine the path of the conversation, i.e., an exclusive gateway when the participants need to follow exactly one path, an inclusive gateway when the participants can choose to follow one or more paths, a parallel gateway when the participants need to follow all diverging paths. The end event is used to mark when the conversation is finished. However since the original domain of BPMN Choreography diagrams are business conversations between multiple business parties, the notation becomes cumbersome when describing RESTful conversations and the mandatory request -> response relationship is not that evident.
  8. Thus we propose certain extensions to the standard BPMN choreography diagram to make it REST specific.
  9. The main extension we propose is replacing the BPMN activity with a more compact two band request/response element with embedded message content. Since the participants in all RESTful interactions are always the client and the server we do not need to explicitly name them. This way the focus is on the content of the exchanged messages. We assume that there is always one client and one server in the conversation. Since in a RESTful interaction a request is always followed by a response, the request / response bends always go together,
  10. except when there is a path divergence due to different possible responses from the server to a given client’s request. In this case the request response bends are separated by an exclusive gateway to show the alternative responses that can be sent by the server.
  11. We propose changing the standard horizontal flow of the BPMN Choreography diagram with a vertical flow and adding a hyperlink flow element. This element indicates how URIs are discovered from hyperlinks embedded in the preceding response. The purpose is to clarify how clients discover and navigate among related resources.
  12. We propose using the timer event to model situations where the server takes too long to respond and thus the client decides to resend the request.
  13. In the next slides I will show a concrete example of a RESTful conversation regarding long-running requests modeled using the visual notation I have just presented. An example REST API using this conversation is Amazon Glacier’s API for long-term storage of infrequently used data. Retrieving such data can take between 3 and 5 hours.
  14. To avoid having the client waiting and experiencing network timeouts separate resources can be created for the job and the job output. The ideal path in this RESTful conversation would be the following: The conversation starts with a request which results with creating the job resource. Once the job has been created the client may poll the job resource to GET its current progress. If the job has not been completed yet, the client will get a 200 OK status and poll the status again later on. If the job has been completed the client gets redirected to another resource representing the output. Now that the client has the URI link to the job output it can request to read it. So this is the happy path. However as it often happens in life, the actual path is rarely the ideal happy path. The actual conversation can be much more complex.
  15. For instance the client might be impatient, and if the server does not reply soon enough it might resend the creation request until it gets the expected server response.
  16. Or the client might decide to read the output multiple times.
  17. Or to delete the output after reading it….
  18. or even before reading it.
  19. The conversation gets even longer if the client decides to do a clean up, i.e. delete the job resource as well. Or if we are dealing with a hesitant client
  20. it might decide to delete the job resource even before the output resource is created. Maybe because the body of its POST request was wrong.
  21. And this is as complicated as a long-running request can get. So as we can see with the proposed notation we can represent efficiently
  22. a very short happy path with no loops where the client immediately gets the job output and reads it,
  23. OR
  24. a very long unhappy path with multiple loops for creating the job or polling for its output and than doing the clean up. This shows the expressiveness of the proposed notation. It is enough to follow the arrows to discover all of the possible directions one conversation can take.
  25. Here is the same RESTful conversation modeled using the standard BPMN Choreography diagram. As we can see it is much more verbose, less concise and it looses the focus on the message content which is extremely important in REST APIs. So this diagram
  26. And this diagram actually model the same Long-running request conversation.
  27. As in every high-level conceptual modeling activity, if we do not introduce some simplifications and abstractions to the real model we might end up not seeing the forest for the trees. An example of a generic, not simplified RESTful conversation model could look like this.
  28. According to the HTTP protocol, it is always possible for an error to occur on the server, thus there is no need to show it explicitly.
  29. The client may choose to resend a request at any time if the server takes too long to respond. However we propose only modeling situations where the client decides to resend a non-idempotent request, such as POST. In this case resending the request twice might result with creating two resources when the goal was creating just one. Thus it is import to model how such situations are dealt with in a given REST API. We abstract from modeling the resending of idempotent requests.
  30. Due to the statelessness principle in REST, each client request is independent form the next request thus the client can decide at any time to stop sending requests. We propose simplifying the model by only modeling an end event after a response which completes in some way the initial goal of the client, and leaving out the other end events.
  31. And the last simplification refers to the hyperlinks. A client can make a request using any hyperlink it has discovered in the past. However to avoid too many lines or inevitable line crossings in more complex examples we propose just modeling the hyperlink from the last response that had disclosed it.
  32. After applying all of the proposed abstractions and simplifications regarding the server errors, resending of requests, unnecessary end events and hyperlinks, here is what the starting model would look like. As you can see it is much more concise and more readable, without loosing any important details.
  33. As future work we plan to conduct a survey among both designers of RESTful APIs and developers of client applications consuming them, to validate the understandability and ease of use of the proposed notation. We have also already started collecting and naming frequently used RESTful conversation patterns. We intend to explore how to compose together individual reusable patterns to simplify the modeling of larger conversations.
  34. Please contribute to our research by filling in the survey on the provided link. Or contact us if you have any patterns you would like to share with us or for any questions or suggestions you might have. To summarize, I have presented you our proposed notation for visual representation of the dynamics of a RESTful conversation, followed by a real world example of a model of the long-running request conversation and the simplifications used by the same. Thank you for your attention. Questions?