Upload
ana-ivanchikj
View
937
Download
3
Embed Size (px)
Citation preview
Modeling RESTful Conversations with Extended
BPMN Choreography Diagrams
Cesare Pautasso, Ana IvanchikjUniversity of Lugano (USI)
Switzerland
Silvia SchreierinnoQ Deutschland GmbH
Germany
European Conference on Software Architecture Cavtat, September 7-11
ECSA 2015
2
RESTful conversation
REST BPMN Choreography Extended BPMN Choreography Example Model Abstractions and Simplifications Future work
Resource
URI
Resource
URI
Resource
URI
GET URI GET URI
PUT U
RI
reference create
Link Relationships (Hypermedia)
303 See Other
200 OK
3
RESTful conversation
REST BPMN Choreography Extended BPMN Choreography Example Model Abstractions and Simplifications Future work
Resource
URI
Resource
URI
Resource
URI
GET URI GET URI
PUT U
RI
reference create
Link Relationships (Hypermedia)
303 See Other
201 Created
200 OK
4
REST API structure - RAML
REST BPMN Choreography Extended BPMN Choreography Example Model Abstractions and Simplifications Future work
5
REST API structure- Swagger
REST BPMN Choreography Extended BPMN Choreography Example Model Abstractions and Simplifications Future work
6
GET /resource 1 HTTP/1.1
HTTP/1.1 303 See OtherLocation: /resource2GET /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
BPMN Choreography
Inclusive gateway
Parallel gateway
REST BPMN Choreography Extended BPMN Choreography Example Model Abstractions and Simplifications Future work
Exclusive gateway
8
GET /resource 1 HTTP/1.1
HTTP/1.1 303 See OtherLocation: /resource2GET /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
Extended BPMN Choreography
REST BPMN Choreography Extended BPMN Choreography Example Model Abstractions and Simplifications Future work
Assumption:ONE client – ONE server
10REST BPMN Choreography Extended BPMN Choreography Example Model Abstractions and Simplifications Future work
11REST BPMN Choreography Extended BPMN Choreography Example Model Abstractions and Simplifications Future work
12REST BPMN Choreography Extended BPMN Choreography Example Model Abstractions and Simplifications Future work
13
Long-running Request-RESTful Conversation Example-
REST 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
Long-running Request- Happy path -
Create job POST / job HTTP/1.1
HTTP/1.1 202 AcceptedLocation: / 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 OtherLocation: / job / 42 / output
15
Long-running Request- Resending the request -
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 OtherLocation: / 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 AcceptedLocation: / job / 42
POST / job HTTP/1.1
16
Long-running Request- Reading the results -
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 OtherLocation: / job / 42 / output
Read results GET / job / 42 / output HTTP/1.1
HTTP/1.1 200 OK
HTTP/1.1 202 AcceptedLocation: / job / 42
POST / job HTTP/1.1
GET / job / 42 / output HTTP/1.1
HTTP/1.1 200 OK
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 OtherLocation: / job / 42 / output
Read results GET / job / 42 / output HTTP/1.1
HTTP/1.1 200 OK
HTTP/1.1 202 AcceptedLocation: / job / 42
POST / job HTTP/1.1
GET / job / 42 / output HTTP/1.1
HTTP/1.1 200 OK
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 OtherLocation: / job / 42 / output
HTTP/1.1 202 AcceptedLocation: / job / 42
POST / job HTTP/1.1
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 OtherLocation: / job / 42 / output
HTTP/1.1 202 AcceptedLocation: / job / 42
POST / job HTTP/1.1
- Deleting the job resource -
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 AcceptedLocation: / 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
Long-running Request
REST BPMN Choreography Extended BPMN Choreography Example Model Abstractions and Simplifications Future work
22
Long-running Request- Short happy path -
Create job POST / job HTTP/1.1
HTTP/1.1 202 AcceptedLocation: / 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 OtherLocation: / job / 42 / output
23
Long-running Request
REST BPMN Choreography Extended BPMN Choreography Example Model Abstractions and Simplifications Future work
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 AcceptedLocation: / 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 OtherLocation: / 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
Long-running Request-BPMN Choreography-
REST BPMN Choreography Extended BPMN Choreography Example Model Abstractions and Simplifications Future work
26
Long-running Request-Extended BPMN Choreography-
REST BPMN Choreography Extended BPMN Choreography Example Model Abstractions and Simplifications Future work
27
Abstractions and Simplifications
REST BPMN Choreography Extended BPMN Choreography Example Model Abstractions and Simplifications Future work
28
Abstraction – Server Error Response
REST BPMN Choreography Extended BPMN Choreography Example Model Abstractions and Simplifications Future work
29
Abstraction – Idempotent requests
REST BPMN Choreography Extended BPMN Choreography Example Model Abstractions and Simplifications Future work
30
Simplification – End events
REST BPMN Choreography Extended BPMN Choreography Example Model Abstractions and Simplifications Future work
31
Simplification - Hyperlinks
REST BPMN Choreography Extended BPMN Choreography Example Model Abstractions and Simplifications Future work
32
Simplifications and abstractions summary
REST BPMN Choreography Extended BPMN Choreography Example Model Abstractions and Simplifications Future work
33
• Survey– Understandability– Ease of use
Future Work
• Conversation Patterns – Expressiveness– Collection– Reusability
REST BPMN Choreography Extended BPMN Choreography Example Model Abstractions and Simplifications Future work
Contact us at:[email protected]
[email protected]@innoq.com
Contribute to our research by filling in the survey!!!http://restfulconversations.limequery.com/index.php/215135/lang-en