Formal Modeling of RESTful Systems Using Finite-State...
Transcript of Formal Modeling of RESTful Systems Using Finite-State...
Formal Modeling of RESTful Systems Formal Modeling of RESTful Systems Using Finite-State MachinesUsing Finite-State Machines
Ivan Zuzak, Ivan Budiselic, Goran DelacSchool of Electrical Engineering and Computing, University of Zagreb, Zagreb, Croatia
June 22, 2011 Formal Modeling of RESTful Systems Using Finite-State Machines 2/63
Ivan Zuzak
● Ph.D student, University of Zagreb● Consumer Computing Laboratory
● http://www.geppeto.fer.hr ● Consumer programming methodology● Architectural styles, WWW infrastructure
● This Week in REST http://thisweekinrest.wordpress.com ● Bi-weekly blog on recent news about the REST style
June 22, 2011 Formal Modeling of RESTful Systems Using Finite-State Machines 3/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 4/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
● HTTP, URI, HTML
June 22, 2011 Formal Modeling of RESTful Systems Using Finite-State Machines 5/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?
● 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, …
Real-Time Web
RESTdiscuss
June 22, 2011 Formal Modeling of RESTful Systems Using Finite-State Machines 6/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 7/63
Research Goal – Formalism for Modeling RESTful Systems
● Any RESTful system● The WWW is a guide, not a judge
● System as a whole ● Integrated view of both the client and server operation (the application)
● Operational● Both the static and dynamic view of operation
● Simple, understandable by researchers and engineers● “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● Dr. Fielding's thesis
June 22, 2011 Formal Modeling of RESTful Systems Using Finite-State Machines 8/63
REST Principles 101
June 22, 2011 Formal Modeling of RESTful Systems Using Finite-State Machines 9/63
REST Principles 101
● Layered client-server
Cacheable
Stateless
Code-on-demand
Uniform interface
Identification of resources
Manipulation of resources through representations
Self-descriptive messagesMethods, link types, media types, …
Hypermedia as the engine of application state
Links
User
agen
tIn
terme d
iariesO
rigin
server
Req Resp
June 22, 2011 Formal Modeling of RESTful Systems Using Finite-State Machines 10/63
REST Principles 101
● Layered client-server
● Cacheable
Stateless
Code-on-demand
Uniform interface
Identification of resources
Manipulation of resources through representations
Self-descriptive messagesMethods, link types, media types, …
Hypermedia as the engine of application state
Links
User
agen
tIn
terme d
iariesO
rigin
server
Cache
Cache
Cache
Req Resp
June 22, 2011 Formal Modeling of RESTful Systems Using Finite-State Machines 11/63
REST Principles 101
● Layered client-server
● Cacheable
● Stateless
Code-on-demand
Uniform interface
Identification of resources
Manipulation of resources through representations
Self-descriptive messagesMethods, link types, media types, …
Hypermedia as the engine of application state
Links
User
agen
tIn
terme d
iariesO
rigin
server
Cache
Cache
Cache
Appstate
Req Resp
June 22, 2011 Formal Modeling of RESTful Systems Using Finite-State Machines 12/63
REST Principles 101
● Layered client-server
● Cacheable
● Stateless
● Code-on-demand
Uniform interface
Identification of resources
Manipulation of resources through representations
Self-descriptive messagesMethods, link types, media types, …
Hypermedia as the engine of application state
Links
User
agen
tIn
terme d
iariesO
rigin
server
Cache
Cache
Cache
Appstate
Req Resp
COD engine
June 22, 2011 Formal Modeling of RESTful Systems Using Finite-State Machines 13/63
REST Principles 101
● Layered client-server
● Cacheable
● Stateless
● Code-on-demand
● Uniform interface● Identification of resources
● Manipulation of resources through representations
Self-descriptive messagesMethods, link types, media types, …
Hypermedia as the engine of application state
Links
User
agen
tIn
terme d
iariesO
rigin
server
Cache
Cache
Cache
Appstate
ResResRes
Req Resp
COD engine
June 22, 2011 Formal Modeling of RESTful Systems Using Finite-State Machines 14/63
REST Principles 101
● Layered client-server
● Cacheable
● Stateless
● Code-on-demand
● Uniform interface● Identification of resources
● Manipulation of resources through representations
● Self-descriptive messages
– Operations, media types, metadata …
Hypermedia as the engine of application state
Links
User
agen
tIn
terme d
iariesO
rigin
server
Cache
Cache
Cache
Appstate
ResResRes
Req Resp
MessageprocessorMessage
processor
Messageprocessor
Messageprocessor
COD engine
June 22, 2011 Formal Modeling of RESTful Systems Using Finite-State Machines 15/63
REST Principles 101
● Layered client-server
● Cacheable
● Stateless
● Code-on-demand
● Uniform interface● Identification of resources
● Manipulation of resources through representations
● Self-descriptive messages
– Operations, media types, metadata …
● Hypermedia as the engine of application state
– Links
User
agen
tIn
terme d
iariesO
rigin
server
Cache
Cache
Cache
Appstate
ResResRes
Req Resp
MessageprocessorMessage
processor
Messageprocessor
Messageprocessor
COD engine
June 22, 2011 Formal Modeling of RESTful Systems Using Finite-State Machines 16/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 17/63
Finite State Machines
● ε-NFA formalism
● Finite state machine
Nondeterministic
Epsilon transitions
States × (Inputs U ε) → P(State)
S0
S1
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)
S0
S1
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)
S0
S1
S2
a
b
a
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)
S0
S1
S2S2
a
b
a
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)
S0
S1
S2S2
a
a
b
a
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
States × (Inputs U ε) → P(State)
S0
S1
S2S2
a
a
b
a
ε
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● Transition Function:
States × (Inputs U ε) → P(States)
S0
S1
S2S2
a
a
b
a
ε
Power set!
June 22, 2011 Formal Modeling of RESTful Systems Using Finite-State Machines 24/63
Finite State Machines
● ε-NFA formalism
● Finite state machine● Nondeterministic● Epsilon transitions● Transition Function:
States × (Inputs U ε) → P(States)
S0
S1
S2S2
● System level view
Nondeterministism
Transition function returns any state from a set, not known in advance which one
a
a
b
a
ε
InputSymbol
Generator
InputSymbol
Generator
CurrentState
CurrentState
TransitionFunction
TransitionFunction(1)
(2)
(2)
(3)
Power set!
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 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 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
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 27/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 28/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 29/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 30/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 31/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 32/63
Mapping REST to eNFA
Input Symbol GeneratorInput Symbol Generator
Current StateCurrent State
Transition FunctionTransition Function
June 22, 2011 Formal Modeling of RESTful Systems Using Finite-State Machines 33/63
Mapping REST to eNFA
Input Symbol GeneratorInput Symbol Generator
Current StateCurrent State
Transition FunctionTransition Function
REST client
RE
ST
server
June 22, 2011 Formal Modeling of RESTful Systems Using Finite-State Machines 34/63
Mapping REST to eNFA
Input Symbol GeneratorInput Symbol Generator
Current StateCurrent State
Transition FunctionTransition Function
ApplicationState
REST client
RE
ST
server
June 22, 2011 Formal Modeling of RESTful Systems Using Finite-State Machines 35/63
Mapping REST to eNFA
Input Symbol GeneratorInput Symbol Generator
Current StateCurrent State
Transition FunctionTransition Function
Med
ia T
ype
Pro
cess
or
ApplicationState
(1)
REST client
RE
ST
server
June 22, 2011 Formal Modeling of RESTful Systems Using Finite-State Machines 36/63
Mapping REST to eNFA
Input Symbol GeneratorInput Symbol Generator
Current StateCurrent State
Transition FunctionTransition Function
Med
ia T
ype
Pro
cess
or
Application-levelLogic
ApplicationState
Hypermedia-level Logic
(1)
(2)
REST client
RE
ST
server
June 22, 2011 Formal Modeling of RESTful Systems Using Finite-State Machines 37/63
Mapping REST to eNFA
Input Symbol GeneratorInput Symbol Generator
Current StateCurrent State
Transition FunctionTransition Function
RequestPreprocessor
Med
ia T
ype
Pro
cess
or
Application-levelLogic
ApplicationState
Hypermedia-level Logic
(1)
(2)
(3)
REST client
RE
ST
server
June 22, 2011 Formal Modeling of RESTful Systems Using Finite-State Machines 38/63
Mapping REST to eNFA
Input Symbol GeneratorInput Symbol Generator
Current StateCurrent State
Transition FunctionTransition Function
RequestPreprocessor
RequestProcessor
Med
ia T
ype
Pro
cess
or
Application-levelLogic
ApplicationState
Hypermedia-level Logic
(1)
(2)
(3)
(4)
REST client
RE
ST
server
June 22, 2011 Formal Modeling of RESTful Systems Using Finite-State Machines 39/63
Mapping REST to eNFA
Input Symbol GeneratorInput Symbol Generator
Current StateCurrent State
Transition FunctionTransition Function
StateIntegrator
RequestPreprocessor
RequestProcessor
Med
ia T
ype
Pro
cess
or
Application-levelLogic
ApplicationState
Hypermedia-level Logic
(1)
(2)
(3)
(4)
(5)
REST client
RE
ST
server
June 22, 2011 Formal Modeling of RESTful Systems Using Finite-State Machines 40/63
Mapping REST to eNFA
Input Symbol GeneratorInput Symbol Generator
Current StateCurrent State
Transition FunctionTransition Function
StateIntegrator
RequestPreprocessor
RequestProcessor
Med
ia T
ype
Pro
cess
or
Application-levelLogic
ApplicationState
Hypermedia-level Logic
(1)
(2)
(3)
(4)
(5)
(6)
REST client
RE
ST
server
June 22, 2011 Formal Modeling of RESTful Systems Using Finite-State Machines 41/63
Mapping REST to eNFA
Input Symbol GeneratorInput Symbol Generator
Current StateCurrent State
Transition FunctionTransition Function
StateIntegrator
RequestPreprocessor
Code-on-demand Engine
RequestProcessor
Med
ia T
ype
Pro
cess
or
Application-levelLogic
ApplicationState
Hypermedia-level Logic
(1)
(2)
(3)
(4)
(5)
(6)
(7)
(7)
REST client
RE
ST
server
June 22, 2011 Formal Modeling of RESTful Systems Using Finite-State Machines 42/63
Mapping REST to eNFA
Input Symbol GeneratorInput Symbol Generator
Current StateCurrent State
Transition FunctionTransition Function
StateIntegrator
RequestPreprocessor
Code-on-demand Engine
RequestProcessor
Med
ia T
ype
Pro
cess
or
Application-levelLogic
ApplicationState
Hypermedia-level Logic
(1)
(2)
(3)
(4)
(5)
(6)
(7)
(7)
(8)
REST client
RE
ST
server
June 22, 2011 Formal Modeling of RESTful Systems Using Finite-State Machines 43/63
Example: Weather Forecast Web Application
Welcome!
Details Main
/main /details
<A>
<A>
June 22, 2011 Formal Modeling of RESTful Systems Using Finite-State Machines 44/63
Example: Weather Forecast Web Application
Welcome!
Details Main
/main /details
// script changes// color of <a> tags
/script
<SCRIPT>
<A>
<A>
June 22, 2011 Formal Modeling of RESTful Systems Using Finite-State Machines 45/63
Example: Weather Forecast Web Application
Welcome!
Details Main
/main /details
// script changes// color of <a> tags {25, 15}
Temp: 25C
/temp/script
<SCRIPT>
XHR
<A>
<A>
June 22, 2011 Formal Modeling of RESTful Systems Using Finite-State Machines 46/63
Example: Weather Forecast Web Application
Welcome!
Details Main
/main /details
// script changes// color of <a> tags {25, 15}
Temp: 25C
/sunny
/cloudy
/temp/script
<IMG>
<SCRIPT>
XHR
<A>
<A>
June 22, 2011 Formal Modeling of RESTful Systems Using Finite-State Machines 47/63
Example: Weather Forecast Web Application
S20
Initial State
June 22, 2011 Formal Modeling of RESTful Systems Using Finite-State Machines 48/63
Example: Weather Forecast Web Application
S20 1
Main page
aa
Initial State
June 22, 2011 Formal Modeling of RESTful Systems Using Finite-State Machines 49/63
Example: Weather Forecast Web Application
S20 1
Main pageScript fetch and color changes
S22
S23
a
b
a
ε
ε
Initial State
June 22, 2011 Formal Modeling of RESTful Systems Using Finite-State Machines 50/63
Example: Weather Forecast Web Application
S20 1
4
5
Main pageScript fetch and color changes Details page
S22
S23
a
b
c
c
c
c
a
ε
ε
Initial State
Sunny w
eatherC
loudy weathe r
June 22, 2011 Formal Modeling of RESTful Systems Using Finite-State Machines 51/63
Example: Weather Forecast Web Application
S20 1
4
5
Main pageScript fetch and color changes Details page Weather image
S22
S23
S26
S27
a
b
c d
ec
c
c
a
ε
ε
Initial State
Sunny w
eatherC
loudy weathe r
June 22, 2011 Formal Modeling of RESTful Systems Using Finite-State Machines 52/63
Example: Weather Forecast Web Application
S20 1
4
5
Main pageScript fetch and color changes Details page Weather image
Temperature fetches and changes
S22
S23
S26
S27
S28 S212
S29 S213
S210 S214
S211 S215
a
b
c d
ec
c
c
a
f
f f
f
ε
ε
ε
ε
ε
ε
Initial State
Sunny w
eatherC
loudy weathe r
June 22, 2011 Formal Modeling of RESTful Systems Using Finite-State Machines 53/63
Example: Weather Forecast Web Application
S20 1
4
5
Main pageScript fetch and color changes Details page Weather image
Temperature fetches and changes
S22
S23
S26
S27
S28 S212
S29 S213
S210 S214
S211 S215
a
b
c d
ec
c
c
a a
a
a
f
f f
f
ε
ε
ε
ε
ε
ε
Initial State
Sunny w
eatherC
loudy weathe r
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”)]
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”)] AS
detailsSunny = [(metadata : [mediaType : “text/html”],
data : “/details content with link to /sunny”)]
δ(ASdetailsCloudy
, IStoDetails
) = {}
Fully loaded/main page
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”)]
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”)] AS
detailsSunny = [(metadata : [mediaType : “text/html”],
data : “/details content with link to /sunny”)]
δ(ASdetailsCloudy
, IStoDetails
) = {}
Fully loaded/main page
/details page request
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”)]
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”)] AS
detailsSunny = [(metadata : [mediaType : “text/html”],
data : “/details content with link to /sunny”)]
δ(ASdetailsCloudy
, IStoDetails
) = {}
Fully loaded/main page
/details page request
/details transition
June 22, 2011 Formal Modeling of RESTful Systems Using Finite-State Machines 57/63
Example: Weather Forecast Web Application
ASmain
= [(metadata : “...”, data : “/main contents”),
(metadata : “...”, data : “/script contents”)]
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”)] AS
detailsSunny = [(metadata : [mediaType : “text/html”],
data : “/details content with link to /sunny”)]
δ(ASdetailsCloudy
, IStoDetails
) = {}
Fully loaded/main page
/details page request
/details transition
Partially loaded /details page
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
– 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 61/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 62/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!● Annonymous reviewer: “A model by itself has little
value unless it is used for some purpose.”
June 22, 2011 Formal Modeling of RESTful Systems Using Finite-State Machines 63/63
Thank you!Contact:
http://twitter.com/izuzak