Formal Modeling of RESTful Systems
Using Finite-State Machines
Ivan Zuzak, Ivan Budiselic, Goran Delac
School of Electrical Engineering and Computing,
University of Zagreb, Zagreb, Croatia
Ivan Zuzak
●
Ph.D student, University of Zagreb
●
http://www.geppeto.fer.hr
●
●
Consumer Computing Laboratory
●
Consumer programming methodology
●
Architectural styles, WWW infrastructure
This Week in REST http://thisweekinrest.wordpress.com
●
June 22, 2011
Bi-weekly blog on recent news about the REST style
Formal Modeling of RESTful Systems Using Finite-State Machines
2/63
Agenda
●
Introduction
●
●
●
Motivation for modeling RESTful systems
FSM Model of REST
●
REST introduction
●
eNFA introduction
●
Mapping REST to eNFA
●
Example Web application
Closing Remarks
●
Future Work
●
Conclusion
63 slides?!?
June 22, 2011
Formal Modeling of RESTful Systems Using Finite-State Machines
3/63
Representational State Transfer (REST)
●
●
Software architectural style
●
Abstract design principles
●
Distributed hypermedia systems
●
Scalability, simplicity, reliability ...
Foundation of (a part of) the
World Wide Web architecture
●
June 22, 2011
HTTP, URI, HTML
Formal Modeling of RESTful Systems Using Finite-State Machines
4/63
Importance of Understanding REST
●
●
●
Understanding and evolving the WWW
●
The WWW has grown in scale and complexity
●
Where are we now and where should we go?
Real-Time
Web
Applying REST to other domains
●
WWW is only one instance of REST
●
Can REST be applied to other domains? How?
Engineering
●
Understanding is the basis for doing and doing well
●
Software frameworks, tools, …
June 22, 2011
Formal Modeling of RESTful Systems Using Finite-State Machines
REST
discuss
5/63
Problems with Understanding REST
●
Lack of simple and operational formal models
●
Existing models
●
Semi-formal diagrams and natural language descriptions
●
Formal models of hypermedia systems (not REST)
●
Models focused on the WWW (not REST)
●
Separate client and server
●
Static, non-operational
●
Misuse of terminology
June 22, 2011
Formal Modeling of RESTful Systems Using Finite-State Machines
6/63
Research Goal – Formalism for Modeling
RESTful Systems
●
Any RESTful system
●
●
System as a whole
●
●
Both the static and dynamic view of operation
Simple, understandable by researchers and engineers
●
●
Integrated view of both the client and server operation (the application)
Operational
●
●
The WWW is a guide, not a judge
“Use the least powerful language suitable for expressing information,
constraints or programs on the World Wide Web.”, 2006, W3C TAG
Use established concepts and terminology
●
June 22, 2011
Dr. Fielding's thesis
Formal Modeling of RESTful Systems Using Finite-State Machines
7/63
REST Principles 101
June 22, 2011
Formal Modeling of RESTful Systems Using Finite-State Machines
8/63
REST Principles 101
User
agent
●
Layered client-server
Cacheable
Stateless
Code-on-demand
Req
Identification of resources
Manipulation of resources through
representations
Self-descriptive messages
Resp
Intermediaries
Uniform interface
Methods, link types, media types, …
Hypermedia as the engine of
application state
June 22, 2011
Origin
server
Links
Formal Modeling of RESTful Systems Using Finite-State Machines
9/63
REST Principles 101
Layered client-server
●
Cacheable
User
agent
●
Cache
Stateless
Code-on-demand
Req
Resp
Intermediaries
Uniform interface
Identification of resources
Manipulation of resources through
representations
Cache
Self-descriptive messages
Methods, link types, media types, …
Hypermedia as the engine of
application state
Cache
June 22, 2011
Origin
server
Links
Formal Modeling of RESTful Systems Using Finite-State Machines
10/63
REST Principles 101
Layered client-server
●
Cacheable
●
Stateless
User
agent
●
App
state
Cache
Code-on-demand
Req
Resp
Intermediaries
Uniform interface
Identification of resources
Manipulation of resources through
representations
Cache
Self-descriptive messages
Methods, link types, media types, …
Hypermedia as the engine of
application state
Cache
June 22, 2011
Origin
server
Links
Formal Modeling of RESTful Systems Using Finite-State Machines
11/63
REST Principles 101
Layered client-server
●
Cacheable
●
Stateless
●
Code-on-demand
User
agent
●
App
state
COD engine
Req
Resp
Intermediaries
Uniform interface
Identification of resources
Manipulation of resources through
representations
Cache
Self-descriptive messages
Methods, link types, media types, …
Hypermedia as the engine of
application state
Cache
Origin
server
Links
June 22, 2011
Cache
Formal Modeling of RESTful Systems Using Finite-State Machines
12/63
REST Principles 101
Layered client-server
●
Cacheable
●
Stateless
●
Code-on-demand
●
Uniform interface
●
App
state
COD engine
Req
Cache
Resp
Intermediaries
●
User
agent
●
Identification of resources
Manipulation of resources through
representations
Cache
Self-descriptive messages
Methods, link types, media types, …
Hypermedia as the engine of
application state
Cache
June 22, 2011
Res
Res
Res
Formal Modeling of RESTful Systems Using Finite-State Machines
Origin
server
Links
13/63
REST Principles 101
●
Cacheable
●
Stateless
●
Code-on-demand
●
Uniform interface
●
●
●
Message
processor
App
state
COD engine
Req
Cache
Resp
Identification of resources
Manipulation of resources through
representations
Message
processor
Cache
Self-descriptive messages
–
Operations, media types, metadata …
Hypermedia as the engine of
application state
June 22, 2011
Cache
Message
processor
Formal Modeling of RESTful Systems Using Finite-State Machines
Res
Res
Res
Origin
server
Links
Intermediaries
Layered client-server
User
agent
●
14/63
REST Principles 101
●
Cacheable
●
Stateless
●
Code-on-demand
●
Uniform interface
●
●
●
COD engine
Req
Cache
Resp
Identification of resources
Manipulation of resources through
representations
Message
processor
Cache
Self-descriptive messages
–
●
Message
processor
App
state
Operations, media types, metadata …
Hypermedia as the engine of
application state
June 22, 2011
Links
Cache
Message
processor
Formal Modeling of RESTful Systems Using Finite-State Machines
Res
Res
Res
Origin
server
–
Intermediaries
Layered client-server
User
agent
●
15/63
Finite State Machines
●
ε-NFA formalism
Nondeterministic
Epsilon transitions
States × (Inputs U ε) →
P(State)
June 22, 2011
Formal Modeling of RESTful Systems Using Finite-State Machines
16/63
Finite State Machines
●
ε-NFA formalism
●
Finite state machine
Nondeterministic
Epsilon transitions
States × (Inputs U ε) →
P(State)
S1
S0
S2
June 22, 2011
Formal Modeling of RESTful Systems Using Finite-State Machines
17/63
Finite State Machines
●
ε-NFA formalism
●
Finite state machine
Nondeterministic
Epsilon transitions
States × (Inputs U ε) →
P(State)
S1
S0
S2
June 22, 2011
Formal Modeling of RESTful Systems Using Finite-State Machines
18/63
Finite State Machines
●
ε-NFA formalism
●
Finite state machine
Nondeterministic
Epsilon transitions
States × (Inputs U ε) →
P(State)
a
S1
S0
b
S2
June 22, 2011
Formal Modeling of RESTful Systems Using Finite-State Machines
19/63
Finite State Machines
●
ε-NFA formalism
●
Finite state machine
Nondeterministic
Epsilon transitions
States × (Inputs U ε) →
P(State)
a
S1
S0
b
S2
S2
June 22, 2011
Formal Modeling of RESTful Systems Using Finite-State Machines
20/63
Finite State Machines
●
ε-NFA formalism
●
Finite state machine
●
Nondeterministic
Epsilon transitions
States × (Inputs U ε) →
P(State)
a
S0
S1
a
b
S2
S2
June 22, 2011
Formal Modeling of RESTful Systems Using Finite-State Machines
21/63
Finite State Machines
●
ε-NFA formalism
●
Finite state machine
●
Nondeterministic
●
Epsilon transitions
States × (Inputs U ε) →
P(State)
a
S1
a
S0
b
ε
S2
S2
June 22, 2011
Formal Modeling of RESTful Systems Using Finite-State Machines
22/63
Finite State Machines
●
ε-NFA formalism
●
Finite state machine
●
Nondeterministic
●
Epsilon transitions
●
Transition Function:
States × (Inputs U ε) → P(States)
a
S1
Power set!
a
S0
b
ε
S2
S2
June 22, 2011
Formal Modeling of RESTful Systems Using Finite-State Machines
23/63
Finite State Machines
●
ε-NFA formalism
●
Finite state machine
●
Nondeterministic
●
Epsilon transitions
●
System level view
Nondeterministism
Transition function returns
any state from a set, not
known in advance which
one
Transition Function:
States × (Inputs U ε) → P(States)
a
S1
Power set!
a
S0
b
Input
Input
Symbol
Symbol
Generator
Generator
(2)
(1)
(2)
ε
S2
S2
June 22, 2011
●
Current
Current
State
State
Formal Modeling of RESTful Systems Using Finite-State Machines
Transition
Transition
Function
Function
(3)
24/63
Mapping REST to eNFA
●
FSM = (States, Inputs, Initial, TransitionFunction, Accepting)
States = AppStates, AppStates ⊆ P(Representations) − {}
Application state is a set of resource representations
Start state = initial application state at system startup
Representation with links to entry-points of know applications
Inputs ⊆ (Requests × LinkTypes)
Requests ⊆ (Operations×ResourceIDs×Representations)
TransitionFunction : AppStates × ((Requests × LinkTypes) U ε) → P(AppStates)
Translation of input symbols into server requests
Processing of requests into responses (nondeterministic!)
Integration of response representations into the next application state
Code-on-demand transitions on the client
Accepting = SteadyStates, SteadyStates ⊆ AppStates
In steady states, representations of all embedded resources are present in the application state
June 22, 2011
Formal Modeling of RESTful Systems Using Finite-State Machines
25/63
Mapping REST to eNFA
●
FSM = (States, Inputs, Initial, TransitionFunction, Accepting)
●
States = AppStates, AppStates ⊆ P(Representations) − {}
–
Application state is a subset of all possible representations of all resources
Start state = initial application state at system startup
Representation with links to entry-points of know applications
Inputs ⊆ (Requests × LinkTypes)
Requests ⊆ (Operations×ResourceIDs×Representations)
TransitionFunction : AppStates × ((Requests × LinkTypes) U ε) → P(AppStates)
Translation of input symbols into server requests
Processing of requests into responses (nondeterministic!)
Integration of response representations into the next application state
Code-on-demand transitions on the client
Accepting = SteadyStates, SteadyStates ⊆ AppStates
In steady states, representations of all embedded resources are present in the application state
June 22, 2011
Formal Modeling of RESTful Systems Using Finite-State Machines
26/63
Mapping REST to eNFA
●
FSM = (States, Inputs, Initial, TransitionFunction, Accepting)
●
States = AppStates, AppStates ⊆ P(Representations) − {}
–
●
Application state is a subset of all possible representations of all resources
Initial = initial application state at system startup
–
Representation with links to entry-points of known applications
Inputs ⊆ (Requests × LinkTypes)
Requests ⊆ (Operations×ResourceIDs×Representations)
TransitionFunction : AppStates × ((Requests × LinkTypes) U ε) → P(AppStates)
Translation of input symbols into server requests
Processing of requests into responses (nondeterministic!)
Integration of response representations into the next application state
Code-on-demand transitions on the client
Accepting = SteadyStates, SteadyStates ⊆ AppStates
In steady states, representations of all embedded resources are present in the application state
June 22, 2011
Formal Modeling of RESTful Systems Using Finite-State Machines
27/63
Mapping REST to eNFA
●
FSM = (States, Inputs, Initial, TransitionFunction, Accepting)
●
States = AppStates, AppStates ⊆ P(Representations) − {}
–
●
Initial = initial application state at system startup
–
●
Application state is a subset of all possible representations of all resources
Representation with links to entry-points of known applications
Inputs ⊆ (Requests × LinkTypes)
–
Requests ⊆ (Operations×ResourceIDs×Representations)
TransitionFunction : AppStates × ((Requests × LinkTypes) U ε) → P(AppStates)
Translation of input symbols into server requests
Processing of requests into responses (nondeterministic!)
Integration of response representations into the next application state
Code-on-demand transitions on the client
Accepting = SteadyStates, SteadyStates ⊆ AppStates
In steady states, representations of all embedded resources are present in the application state
June 22, 2011
Formal Modeling of RESTful Systems Using Finite-State Machines
28/63
Importance of Link Types
●
Different state transition semantics
GET /photo.jpg HTTP/1.1
HTTP/1.1 200 OK
●
Navigation to image (<a>) or embedding in a
Web page (<img>)?
June 22, 2011
Formal Modeling of RESTful Systems Using Finite-State Machines
29/63
Mapping REST to eNFA
●
FSM = (States, Inputs, Initial, TransitionFunction, Accepting)
●
States = AppStates, AppStates ⊆ P(Representations) − {}
–
●
Initial = initial application state at system startup
–
●
Representation with links to entry-points of known applications
Inputs ⊆ (Requests × LinkTypes)
–
●
Application state is a subset of all possible representations of all resources
Requests ⊆ (Operations×ResourceIDs×Representations)
TransitionFunction : AppStates × ((Requests × LinkTypes) U ε) → P(AppStates)
–
–
–
–
Translation of input symbols into server requests
Processing of requests into responses (nondeterministic!)
Integration of response representations into the next application state
Code-on-demand transitions on the client
Accepting = SteadyStates, SteadyStates ⊆ AppStates
In steady states, representations of all embedded resources are present in the application state
June 22, 2011
Formal Modeling of RESTful Systems Using Finite-State Machines
30/63
Mapping REST to eNFA
●
FSM = (States, Inputs, Initial, TransitionFunction, Accepting)
●
States = AppStates, AppStates ⊆ P(Representations) − {}
–
●
Initial = initial application state at system startup
–
●
Requests ⊆ (Operations×ResourceIDs×Representations)
TransitionFunction : AppStates × ((Requests × LinkTypes) U ε) → P(AppStates)
–
–
–
–
●
Representation with links to entry-points of known applications
Inputs ⊆ (Requests × LinkTypes)
–
●
Application state is a subset of all possible representations of all resources
Translation of input symbols into server requests
Processing of requests into responses (nondeterministic!)
Integration of response representations into the next application state
Code-on-demand transitions on the client
Accepting = SteadyStates, SteadyStates ⊆ AppStates
–
June 22, 2011
In steady states, representations of all embedded resources are present in the application state
Formal Modeling of RESTful Systems Using Finite-State Machines
31/63
Mapping REST to eNFA
Input
Input Symbol
Symbol Generator
Generator
Transition
Transition Function
Function
Current
Current State
State
June 22, 2011
Formal Modeling of RESTful Systems Using Finite-State Machines
32/63
Mapping REST to eNFA
REST client
Input
Input Symbol
Symbol Generator
Generator
Transition
Transition Function
Function
REST
server
Current
Current State
State
June 22, 2011
Formal Modeling of RESTful Systems Using Finite-State Machines
33/63
Mapping REST to eNFA
REST client
Input
Input Symbol
Symbol Generator
Generator
Transition
Transition Function
Function
REST
server
Application
State
Current
Current State
State
June 22, 2011
Formal Modeling of RESTful Systems Using Finite-State Machines
34/63
Mapping REST to eNFA
REST client
Transition
Transition Function
Function
REST
server
Media Type
Processor
Input
Input Symbol
Symbol Generator
Generator
(1)
Application
State
Current
Current State
State
June 22, 2011
Formal Modeling of RESTful Systems Using Finite-State Machines
35/63
Mapping REST to eNFA
REST client
Transition
Transition Function
Function
Application-level
Logic
(2)
Hypermedia-level
Logic
REST
server
Media Type
Processor
Input
Input Symbol
Symbol Generator
Generator
(1)
Application
State
Current
Current State
State
June 22, 2011
Formal Modeling of RESTful Systems Using Finite-State Machines
36/63
Mapping REST to eNFA
REST client
Application-level
Logic
Transition
Transition Function
Function
(3)
Request
Preprocessor
(2)
Hypermedia-level
Logic
REST
server
Media Type
Processor
Input
Input Symbol
Symbol Generator
Generator
(1)
Application
State
Current
Current State
State
June 22, 2011
Formal Modeling of RESTful Systems Using Finite-State Machines
37/63
Mapping REST to eNFA
REST client
Application-level
Logic
Transition
Transition Function
Function
(3)
Request
Preprocessor
(4)
(2)
Hypermedia-level
Logic
Request
Processor
REST
server
Media Type
Processor
Input
Input Symbol
Symbol Generator
Generator
(1)
Application
State
Current
Current State
State
June 22, 2011
Formal Modeling of RESTful Systems Using Finite-State Machines
38/63
Mapping REST to eNFA
REST client
Application-level
Logic
Transition
Transition Function
Function
(3)
Request
Preprocessor
(4)
(2)
Hypermedia-level
Logic
Request
Processor
(5)
(1)
Application
State
REST
server
Media Type
Processor
Input
Input Symbol
Symbol Generator
Generator
State
Integrator
Current
Current State
State
June 22, 2011
Formal Modeling of RESTful Systems Using Finite-State Machines
39/63
Mapping REST to eNFA
REST client
Transition
Transition Function
Function
Application-level
Logic
(3)
Request
Preprocessor
(4)
(2)
Hypermedia-level
Logic
Request
Processor
(5)
(1)
Application
State
(6)
REST
server
Media Type
Processor
Input
Input Symbol
Symbol Generator
Generator
State
Integrator
Current
Current State
State
June 22, 2011
Formal Modeling of RESTful Systems Using Finite-State Machines
40/63
Mapping REST to eNFA
REST client
Transition
Transition Function
Function
Application-level
Logic
(3)
(2)
Hypermedia-level
Logic
Request
Processor
(5)
(1)
Application
State
Current
Current State
State
June 22, 2011
(4)
Request
Preprocessor
(6)
State
Integrator
REST
server
Media Type
Processor
Input
Input Symbol
Symbol Generator
Generator
(7)
Code-on-demand
Engine
(7)
Formal Modeling of RESTful Systems Using Finite-State Machines
41/63
Mapping REST to eNFA
REST client
Transition
Transition Function
Function
Application-level
Logic
(3)
(2)
Hypermedia-level
Logic
Request
Processor
(5)
(1)
Application
State
Current
Current State
State
June 22, 2011
(4)
Request
Preprocessor
(6) (8)
State
Integrator
REST
server
Media Type
Processor
Input
Input Symbol
Symbol Generator
Generator
(7)
Code-on-demand
Engine
(7)
Formal Modeling of RESTful Systems Using Finite-State Machines
42/63
Example: Weather Forecast Web Application
/main
/details
<A>
Welcome!
Details
June 22, 2011
<A>
Main
Formal Modeling of RESTful Systems Using Finite-State Machines
43/63
Example: Weather Forecast Web Application
/main
/details
<A>
Welcome!
<SCRIPT>
<A>
Details
Main
// script changes
// color of <a> tags
/script
June 22, 2011
Formal Modeling of RESTful Systems Using Finite-State Machines
44/63
Example: Weather Forecast Web Application
/main
/details
<A>
Welcome!
<SCRIPT>
<A>
Details
Main
// script changes
// color of <a> tags
/script
June 22, 2011
Temp: 25C
XHR
{25, 15}
/temp
Formal Modeling of RESTful Systems Using Finite-State Machines
45/63
Example: Weather Forecast Web Application
/main
/sunny
/details
<A>
<IMG>
Welcome!
<SCRIPT>
<A>
Details
Temp: 25C
Main
/cloudy
// script changes
// color of <a> tags
/script
June 22, 2011
XHR
{25, 15}
/temp
Formal Modeling of RESTful Systems Using Finite-State Machines
46/63
Example: Weather Forecast Web Application
Initial State
S2
0
June 22, 2011
Formal Modeling of RESTful Systems Using Finite-State Machines
47/63
Example: Weather Forecast Web Application
Initial State Main page
a
S2
0
June 22, 2011
1
Formal Modeling of RESTful Systems Using Finite-State Machines
48/63
Example: Weather Forecast Web Application
Script fetch and
Initial State Main page color changes
S2
2
b
ε
a
S2
0
1
ε
S2
3
June 22, 2011
Formal Modeling of RESTful Systems Using Finite-State Machines
49/63
Example: Weather Forecast Web Application
Script fetch and
Initial State Main page color changes
ε
a
S2
0
c
1
S2
3
c
5
Formal Modeling of RESTful Systems Using Finite-State Machines
Cloudy weather
c
ε
June 22, 2011
4
Sunny weather
c
S2
2
b
Details page
50/63
Example: Weather Forecast Web Application
Script fetch and
Initial State Main page color changes
ε
a
S2
0
d
S2
6
c
1
S2
3
c
5
e
S2
7
Formal Modeling of RESTful Systems Using Finite-State Machines
Cloudy weather
c
ε
June 22, 2011
4
Weather image
Sunny weather
c
S2
2
b
Details page
51/63
Example: Weather Forecast Web Application
Script fetch and
Initial State Main page color changes
Details page
Temperature fetches
and changes
Weather image
c
S2
2
b
ε
a
S2
0
4
d
S2
6
S2
12
f
f
S2
9
c
ε
S2
13
1
S2
3
c
S2
10
5
e
S2
7
ε
f
S2
14
f
S2
11
Formal Modeling of RESTful Systems Using Finite-State Machines
ε
S2
15
Cloudy weather
c
ε
June 22, 2011
ε
Sunny weather
S2
8
52/63
Example: Weather Forecast Web Application
Script fetch and
Initial State Main page color changes
Details page
Temperature fetches
and changes
Weather image
S2
8
c
S2
2
b
ε
a
S2
0
4
d
S2
6
ε
f
f
S2
9
c
S2
12
ε
S2
13
Sunny weather
a
a
1
S2
3
c
S2
10
5
e
S2
7
ε
f
S2
14
f
S2
11
ε
S2
15
Cloudy weather
c
ε
a
June 22, 2011
Formal Modeling of RESTful Systems Using Finite-State Machines
53/63
Example: Weather Forecast Web Application
ASmain = [(metadata : “...”, data : “/main contents”),
(metadata : “...”, data : “/script contents”)]
Fully loaded
/main page
IStoDetails = (request : (method : “GET ”, resourceId : “/details”,
representation : “”), linkType : “<a>”)
δ(ASmain, IStoDetails) = {ASdetailsCloudy, ASdetailsSunny}
ASdetailsCloudy = [(metadata : [mediaType : “text/html”],
data : “/details content with link to /cloudy”)]
ASdetailsSunny = [(metadata : [mediaType : “text/html”],
data : “/details content with link to /sunny”)]
δ(ASdetailsCloudy, IStoDetails) = {}
June 22, 2011
Formal Modeling of RESTful Systems Using Finite-State Machines
54/63
Example: Weather Forecast Web Application
ASmain = [(metadata : “...”, data : “/main contents”),
(metadata : “...”, data : “/script contents”)]
Fully loaded
/main page
IStoDetails = (request : (method : “GET ”, resourceId : “/details”,
representation : “”), linkType : “<a>”)
/details page
request
δ(ASmain, IStoDetails) = {ASdetailsCloudy, ASdetailsSunny}
ASdetailsCloudy = [(metadata : [mediaType : “text/html”],
data : “/details content with link to /cloudy”)]
ASdetailsSunny = [(metadata : [mediaType : “text/html”],
data : “/details content with link to /sunny”)]
δ(ASdetailsCloudy, IStoDetails) = {}
June 22, 2011
Formal Modeling of RESTful Systems Using Finite-State Machines
55/63
Example: Weather Forecast Web Application
ASmain = [(metadata : “...”, data : “/main contents”),
(metadata : “...”, data : “/script contents”)]
Fully loaded
/main page
IStoDetails = (request : (method : “GET ”, resourceId : “/details”,
representation : “”), linkType : “<a>”)
/details page
request
δ(ASmain, IStoDetails) = {ASdetailsCloudy, ASdetailsSunny}
/details transition
ASdetailsCloudy = [(metadata : [mediaType : “text/html”],
data : “/details content with link to /cloudy”)]
ASdetailsSunny = [(metadata : [mediaType : “text/html”],
data : “/details content with link to /sunny”)]
δ(ASdetailsCloudy, IStoDetails) = {}
June 22, 2011
Formal Modeling of RESTful Systems Using Finite-State Machines
56/63
Example: Weather Forecast Web Application
ASmain = [(metadata : “...”, data : “/main contents”),
(metadata : “...”, data : “/script contents”)]
Fully loaded
/main page
IStoDetails = (request : (method : “GET ”, resourceId : “/details”,
representation : “”), linkType : “<a>”)
/details page
request
δ(ASmain, IStoDetails) = {ASdetailsCloudy, ASdetailsSunny}
/details transition
ASdetailsCloudy = [(metadata : [mediaType : “text/html”],
data : “/details content with link to /cloudy”)]
ASdetailsSunny = [(metadata : [mediaType : “text/html”],
data : “/details content with link to /sunny”)]
Partially loaded
/details page
δ(ASdetailsCloudy, IStoDetails) = {}
June 22, 2011
Formal Modeling of RESTful Systems Using Finite-State Machines
57/63
Future Work
●
Reduce state explosion problem
●
Aggregating similar states into a single state
–
States are similar if they have the same representations
with the same links, but data may be different
Apply the formalism to more systems
Web 1.0 documents vs Web 2.0 applications
Web APIs vs Web applications
Unaddressed priciples of RESTful systems
Layered and cacheable constraints
Software framework for development of RESTful
systems
June 22, 2011
Formal Modeling of RESTful Systems Using Finite-State Machines
58/63
Future Work
●
Reduce state explosion problem
●
Aggregating similar states into a single state
–
●
States are similar if they have the same representations
with the same links, but data may be different
Apply the formalism to more systems
●
Web 1.0 documents vs Web 2.0 applications
●
Web APIs vs Web applications
Unaddressed priciples of RESTful systems
Layered and cacheable constraints
Software framework for development of RESTful
systems
June 22, 2011
Formal Modeling of RESTful Systems Using Finite-State Machines
59/63
Future Work
●
Reduce state explosion problem
●
Aggregating similar states into a single state
–
●
●
States are similar if they have the same representations
with the same links, but data may be different
Apply the formalism to more systems
●
Web 1.0 documents vs Web 2.0 applications
●
Web APIs vs Web applications
Unaddressed priciples of RESTful systems
●
Layered and cacheable constraints
Software framework for development of RESTful
systems
June 22, 2011
Formal Modeling of RESTful Systems Using Finite-State Machines
60/63
Future Work
●
Reduce state explosion problem
●
Aggregating similar states into a single state
–
●
●
Apply the formalism to more systems
●
Web 1.0 documents vs Web 2.0 applications
●
Web APIs vs Web applications
Unaddressed priciples of RESTful systems
●
●
States are similar if they have the same representations
with the same links, but data may be different
Layered and cacheable constraints
Software framework for development of RESTful
systems
June 22, 2011
Formal Modeling of RESTful Systems Using Finite-State Machines
61/63
Conclusion
●
Understanding REST is important
●
●
●
Formal models, systematization, terminology
eNFA formalism
●
Captures “~98%” of REST's principles
●
Simple, generic, operational, system-wide
Exciting directions for future research!
●
June 22, 2011
Annonymous reviewer: “A model by itself has little
value unless it is used for some purpose.”
Formal Modeling of RESTful Systems Using Finite-State Machines
62/63
Thank you!
Contact:
[email protected]
http://twitter.com/izuzak
June 22, 2011
Formal Modeling of RESTful Systems Using Finite-State Machines
63/63
© Copyright 2026 Paperzz