610 likes | 629 Views
Sergio Maffeis Joint work with Philippa Gardner. Modelling Dynamic Web Data. APPSEM'04 Tallinn, 15 April 2004. Motivation. What is d ynamic W eb d ata?. We model large scale , peer-to-peer systems for sharing dynamic data over the Web. Distribution is on large scale
E N D
Sergio Maffeis Joint work with Philippa Gardner Modelling Dynamic Web Data APPSEM'04 Tallinn, 15 April 2004
What is dynamic Web data? We model large scale, peer-to-peer systems for sharing dynamic data over the Web. • Distribution is on large scale • Each site provides and consumes data using a (standardised) set of functionalities • Data is dynamic and intensional: can contain calls to Web services, forms, scripted code, etc... • Data is interlinked
Modelling dynamic Web data Existing models: • query languages for semistructured data (XML) • Describe data manipulation • Do not include a distribution layer • process calculi for the distributed infrastructure • Are good at orchestrating data exchanges between peers • Tend to abstract from the actual data Modelling dynamic Web data requires merging these approaches.
A unified framework Reasoning about data and the distributed infrastructure in the same framework provides means to • understand the system behaviour • give schema/types to documents containing scripts • control access to resources • propose new optimisations
The Xd project • Dynamic Web data in Xd • syntax, sematics, examples • Observational equivalences • spectrum of network and process equivalences • Proof techniques • domain bisimilarity • Types and security • access control, data validation • Implementation • declarative platform for intensional data and WS-coordination
L2 L1 L3 Xd Processes Trees L4 • A flat space of locations • Locations contain (XML) trees and coordination processes
Representing data in Xd a a a a c c b Processes c b Processes T3 @L1:a/c P T’ T2 T1 L2 L1 • Unordered, edge-labelled trees • Scripted processes (no reflection) • Pointers (links)
T’ P’ L1 Data manipulation: cut = cuta/e(X).pastea/c<X> a a c P b c b e Q T L2 • select some subtrees with a path expression
T’ P’ L1 Data manipulation: cut X= = cuta/e(X).pastea/c<X> T a a c P b c b e Q T L2 • select some subtrees with a path expression • match the subtrees against a binding pattern
T’ P’ L1 Data manipulation: cut X= = cuta/e(X).pastea/c<> T T a a c P b c b e Q T L2 • select some subtrees with a path expression • match the subtrees against a binding pattern • cut away the subtrees
T’ P’ L1 Data manipulation: paste = cuta/e(X).pastea/c<> T a a c P b c b e T Q L2 • select some paths for pasting
T’ P’ L1 Data manipulation: paste = cuta/e(X).pastea/c< > T a a c P b c b e Q T L2 • select some paths for pasting • paste the subtrees in place
T’ P’ L1 Data manipulation = cuta/e(X).pastea/c< > T a a c P b c b e Q T L2 • Encode cut, copy, paste by general update command • Simple path expressions as query language (multiple selection) • Other choices possible
a a c b c b e T Process selection = runc a a c P R b c b e Q L1 L2 runactivates scripts: click on a hyperlink, system event, ...
a a c b c b e T Process selection = runc a a c P R b c b e Q L1 L2 runactivates scripts: click on a hyperlink, system event, ...
a a c b c b e T • = intuitive specification of a hyperlink Process migration = go L2.copya/c(X).go L1.pastea/e<X> a a c P R b c b e Q L1 L2
a a c b c b e T • = intuitive specification of a hyperlink Process migration = go L2.copya/c(X).go L1.pastea/e<X> a a c P R b c b e Q L1 L2
= intuitive specification of a hyperlink Process migration = go L2.copya/c(X).go L1.pastea/e< > T a a a a c c P R b b c b c b e T e Q T L1 L2
= intuitive specification of a hyperlink Process migration = go L2.copya/c(X).go L1.pastea/e< > T a a a a c c P R b b c b c b e T e Q T L1 L2
= intuitive specification of a hyperlink • over-simplified Process migration = go L2.copya/c(X).go L1.pastea/e<X> a a a a c c P R b b c b c b e e Q T T L1 L2
Communication = web service call = web service = result handling code = service instance a a a a c c P R b b c b c b e e Q T L1 L2
Communication = go L2.get<a/c,L1> = !get(x,y).copyx(z).go y.put<z> = put(x).pastea/e<x> a a a a c c P R b b c b c b e e Q T L1 L2
Communication = go L2.get<a/c,L1> = !get(x,y).copyx(z).go y.put<z> = put(x).pastea/e<x> a a a a c c P R b b c b c b e e Q T L1 L2
Communication = go L2.get<a/c,L1> = !get(x,y).copyx(z).go y.put<z> = put(x).pastea/e<x> = copya/c(z).go L1.put<z> a a a a c c P R b b c b c b e e Q T L1 L2
Communication = go L2.get<a/c,L1> = !get(x,y).copyx(z).go y.put<z> = put(x).pastea/e<x> T = copya/c(z).go L1.put< > a a a a c c P R b b c b c b e e T Q T L1 L2
Communication = go L2.get<a/c,L1> = !get(x,y).copyx(z).go y.put<z> = put(x).pastea/e<x> T = copya/c(z).go L1.put< > a a a a c c P R b b c b c b e T e Q T L1 L2
Communication = go L2.get<a/c,L1> = !get(x,y).copyx(z).go y.put<z> = put(x).pastea/e< > T = copya/c(z).go L1.put< > T a a a a c c P R b b c b c b e T e Q T L1 L2
Communication = go L2.get<a/c,L1> = !get(x,y).copyx(z).go y.put<z> = put(x).pastea/e< > T = copya/c(z).go L1.put< > T a a a a c c P R b b c b c b e e Q T T L1 L2 Potential problem: who can return a result to put?
Restriction = go L2.get<a/c,L1> = !get(x,y).copyx(z).go y.put<z> = put(x).pastea/e<x> a a a a c c P R b b c b c b e e Q T L1 L2
Restriction = go L2.get<a/c,L1,put> = !get(x,y,w).copyx(z).go y.w<z> = put(x).pastea/e<x> a a a a c c P R b b c b c b e e Q T L1 L2 • Add the return channel put as a parameter to get
Restriction = go L2.get<a/c,L1,put> = !get(x,y,w).copyx(z).go y.w<z> = put(x).pastea/e<x> = (new put)( | ) a a a a c c P R b b c b c b e e Q T L1 L2 • Add the return channel put as a parameter to get • Make put an unforgeable secret with restriction binder (new put)(-)
Restriction = go L2.get<a/c,L1,put> = !get(x,y,w).copyx(z).go y.w<z> = put(x).pastea/e<x> = (new put)( | ) a a a a c c P R b b c b c b e e Q T L1 L2
Restriction = go L2.get<a/c,L1,put> = !get(x,y,w).copyx(z).go y.w<z> = put(x).pastea/e<x> = (new put)( | ) a a a a c c P R b b c b c b e e Q T L1 L2
Restriction = go L2.get<a/c,L1,put> = !get(x,y,w).copyx(z).go y.w<z> = put(x).pastea/e<x> = (new put)( | ) a a a a c c P R b b c b c b e e Q T L1 L2
Restriction = go L2.get<a/c,L1,put> = !get(x,y,w).copyx(z).go y.w<z> = put(x).pastea/e<x> = (new put)( | ) a a a a c c P R b b c b c b e e T Q T L1 L2
Restriction = go L2.get<a/c,L1,put> = !get(x,y,w).copyx(z).go y.w<z> = put(x).pastea/e<x> = (new put)( | ) a a a a c c P R b b c b c b e e T Q T L1 L2
Restriction = go L2.get<a/c,L1,put> = !get(x,y,w).copyx(z).go y.w<z> = put(x).pastea/e<x> = (new put)( | ) a a a a c c P R b b c b c b e T e Q T L1 L2
Restriction = go L2.get<a/c,L1,put> = !get(x,y,w).copyx(z).go y.w<z> = put(x).pastea/e<x> = (new put)( | ) a a a a c c P R b b c b c b e e Q T T L1 L2 • Nothing can interefere with put now • Interference with get at L2: same technique, types, …
Function repository Data Repository Data warehouse Example: rendez-vous Client L2 L1 L3 L4
Function repository Data Repository Data warehouse Example: rendez-vous Client L2 L1 L3 L4
Function repository Data Repository Data warehouse Example: rendez-vous Client L2 L1 L3 L4
Function repository Data Repository Data warehouse Example: rendez-vous Client L2 L1 L3 L4
Function repository Data Repository Data warehouse Example: rendez-vous Client L2 L1 L3 L4
Function repository Data Repository Data warehouse Example: rendez-vous Client L2 L1 L3 L4
Function repository Data Repository Data warehouse Example: rendez-vous Client L2 L1 L3 L4
Function repository Data Repository Data warehouse Example: rendez-vous Client L2 L1 L3 L4
Function repository Data Repository Data warehouse Example: rendez-vous Client L2 L1 L3 L4
Function repository Data Repository Data warehouse Example: rendez-vous Client L2 L1 L3 L4 • Reduce network traffic • Comply to access control policies • Forward streams of results