=Paper= {{Paper |id=Vol-1594/paper12 |storemode=property |title=Towards Specification and Execution of Linked Systems |pdfUrl=https://ceur-ws.org/Vol-1594/paper12.pdf |volume=Vol-1594 |authors=Andreas Harth,Tobias Käfer |dblpUrl=https://dblp.org/rec/conf/gvd/HarthK16 }} ==Towards Specification and Execution of Linked Systems== https://ceur-ws.org/Vol-1594/paper12.pdf
     Towards Specification and Execution of Linked Systems

                           Andreas Harth                                                Tobias Käfer
                           Institute AIFB                                               Institute AIFB
              Karlsruhe Institute of Technology (KIT)                      Karlsruhe Institute of Technology (KIT)
             Kaiserstr.12, 76131 Karlsruhe, Germany                       Kaiserstr.12, 76131 Karlsruhe, Germany
                            harth@kit.edu                                         tobias.kaefer@kit.edu


ABSTRACT                                                                 1. A uniform protocol to decentralised components, to
We introduce the formalism of Linked Systems for specifying                 be able to manipulate and interact with components
and executing dynamical systems that operate over Read-                     without writing adaptors.
Write Linked Data. Linked Systems cover user agents (com-
ponents that emit HTTP requests) and servers (components                 2. A uniform data model, a suitable knowledge represen-
that receive HTTP requests). The formalisation is inspired                  tation language and an associated query language, to
by automata theory and the concepts of state transition sys-                be able to represent, integrate and query data on a
tems and state machines. For the proposed formalism to                      global scale.
scale to the web, we try to minimise the burden on compo-
nent providers. We thus assume a Read-Write Linked Data                  3. A uniform description of the behaviour of components,
interface that offers only a few operations: resources identi-              to be able to apply techniques from the fields of formal
fied via URIs can be created and deleted, and the state of                  verification and AI planning.
resources is expressed in RDF and can be read and updated.
Our near-term goal is to provide executable specifications of             With these uniform interfaces we could specify and ex-
autonomous behaviour expressed in a rule-based language,               ecute systems that operate autonomously; perform static
without requiring formal service descriptions of the opera-            analysis, verification and simulation of these systems; and
tions on resources. In the long term, we plan to use our               automatically generate these systems, given component de-
formalism as basis for applying techniques from the fields of          scriptions and a goal. While these uniform interfaces been
formal verification and artificial intelligence (AI) planning.         available in closed systems (for example, in the field of arti-
                                                                       ficial intelligence), such a level of elaboration has been elu-
                                                                       sive on the web, which is an open decentralised system with
1.    INTRODUCTION                                                     many contributors. Different communities, however, work
   Users can gain access to arbitrary content and functional-          towards providing (parts of) elaborate uniform interfaces in
ity on the web with a browser in one unified user interface.           open environments:
On mobile devices, however, the dominant user interface
to content and functionality are apps. Each tailored app                 1. The followers of the architectural style Representa-
communicates with a backend server, often via web proto-                    tional State Transfer (REST) [7] encourage people to
cols. Universal user interfaces are desirable so that users                 use the abstraction of resources, on which a constrained
can comfortably access any network-accessible component                     set of operations (e.g. reading and writing, creating
or combinations of components. Potential future universal                   and deleting) can be executed. Hyperlinks provide
user interfaces could be dialogue systems, such as chatbots                 connections between resources that provide data and
and virtual assistants, or virtual reality environments.                    functionality. The Richardson Maturity Model (RMM)1
   A fundamental research challenge has been to find the                    introduces different levels of adherence to the REST
appropriate abstractions for interfaces to networked compo-                 ideas. RESTful interfaces, however, do not require a
nents to facilitate the interaction with components and en-                 certain syntax for the representation of resource state.
able the interoperation between them. Realising the overall
goal of enabling flexible access to content and functionality            2. The Linked Data community follows a different (but
from a large number of sources requires at least the following              similar) set of principles [3] to publish and access data
from component providers:                                                   on the web that mandate the Resource Description
                                                                            Framework (RDF) as a graph-structured data model
                                                                            for representing resource state. The Linked Data prin-
                                                                            ciples, however, only cover read-access to resource state.
                                                                            The combination of the higher RMM levels and Linked
                                                                            Data leads to Read-Write Linked Data [4], in which
                                                                            resources are linked and resource state represented in
                                                                            RDF can be manipulated.
28th GI-Workshop on Foundations of Databases (Grundlagen von Daten-    1
banken), 24.05.2016 – 27.05.2016, Nörten-Hardenberg, Germany.            http://martinfowler.com/articles/
Copyright is held by the author/owner(s).                              richardsonMaturityModel.html




                                                                  62
           Towards Specification and Execution of Linked Systems



     3. Finally, different communities concerned with dynam-       as t). Given the enormous breadth of dynamical systems,
        ical systems (for instance, control systems and cyber-     we can only provide a subjective selection of related work of
        physical systems) abstract from specific protocols and     the discrete-time variants.
        often use a simple data model. Formal descriptions of         In computational systems, Harel and Pneuli [9] introduce
        services or actions – the “laws” of a system – are cen-    the dichotomy between a transformational system “that ac-
        tral to the applied verification methods, such as model    cepts inputs, performs transformations on them and pro-
        checking or simulation. The Semantic Web commu-            duces output” and reactive systems that in contrast “are
        nity had attempted to create a respectable amount of       repeatedly prompted by the outside world and their role is
        fully-described services, and the REST community is        to continuously respond to external inputs”. The goal of our
        working towards having standardised input and output       work is to provide a formalism to specify reactive systems5
        descriptions for APIs widely available.                    that combine both user agents (systems that emit requests)
                                                                   and servers (systems that accept requests) into a single rep-
   Currently, we cannot assume that elaborate uniform inter-       resentation.
faces to components are commonplace on the open web. To-              Formal models are popular for describing reactive systems
day, many APIs provide a resource-oriented modelling with          in closed environments [5, 2, 15, 1]. These approaches re-
constrained operations (REST). Linked Data is popular for          quire full descriptions of the “laws” of the systems, to be
read-access to RDF data. Read-Write Linked Data, as the            able to generate the entire state space for a given vocabu-
combination of the two popular paradigms, could provide            lary if the systems have finite domains, or to use simulation
access to a sizable amount of components with a limited            for infinite domains. However, often the data representation
additional burden for component providers, for example as          is limited: either variables with values in the case of the
specified in the W3C Linked Data Platform recommenda-              cyber-physical systems community, or propositional logic in
tion2 with editors from IBM and Oracle.                            the case of the model checking and automata communities.
   Thus, in this paper, we focus on manual specification of           McCarthy’s situation calculus is an early formalism to
systems that operate on components which have a Read-              describe dynamical systems in the area of artificial intel-
Write Linked Data interface, but do not provide formal ser-        ligence. The situation calculus includes actions that can be
vice descriptions. The goal is to have a formal model of           performed in the world and fluents that describe the (chang-
systems that are able to use and provide Read-Write Linked         ing) state of the world. As we conceptually operate on a
Data resources. We present an approach for executable for-         single ternary triple predicate for representing state, we do
mal specifications. The approach can be extended to sup-           not have the possibility to identify fluents (predicates that
port formal verification and AI planning in case a suffi-          change over time). Also, we assume the open web as task
cient amount of components with formal service descriptions        environment rather than a closed system, and distinguish
should become available.                                           between user agents and servers.
   We have applied prototypes that implement the proposed             Abstract State Machines (ASMs) [8] use first-order struc-
formalism for specifying interactive systems based on a Read-      tures (functions and relations) over a fixed vocabulary to
Write Linked Data interface in several settings. In the Ger-       represent state. ASMs heavily inspired our approach, but
man ARVIDA project3 , we break up monolithic industrial            our formalism is targeted for the web: we use RDF instead
Virtual and Augmented Reality (VR and AR) systems into             of first-order structures. We further do not make the as-
components with a Read-Write Linked Data interface, and            sumption of a fixed vocabulary, as on the web we want to
specify and execute VR applications based on these inter-          follow links during runtime, which may lead to hitherto un-
faces. In the European i-VISION project4 , we provide means        known URIs. Instead of arbitrary external functions to in-
to connect a workflow analysis software with a flight simu-        teract with the environment, we limit the external functions
lator to perform Human Factors analysis of aircraft cock-          to HTTP requests with create-read-update-delete (CRUD)
pits in a VR environment at run-time; the components are           methods.
also based on Read-Write Linked Data interfaces. We have              Approaches for Web Service Composition [13] are based
demonstrated that the execution of the system specifications       on XML-based WS-* standards, such as WSDL for inter-
achieved update rates sufficient for an immersive experience       face description to remote procedure calls [14]. We use a
in the VR environment [11, 12].                                    resource-based abstraction with CRUD operations instead.
   We begin the remainder of the paper with related work           These approaches use BPEL (Web Services Business Process
in Section 2, introduce necessary definitions in Section 3,        Execution Language), an industry standard for specifying
formalise the notion of a Linked System in Section 4, and          service compositions. We rather use a formal model based
conclude with a summary and a list of open issues in Sec-          on state transition systems as the foundation.
tion 5.                                                               The Guard-Stage-Milestone (GSM) framework for artifact-
                                                                   centric workflows [6] provides a business process view on
2.     RELATED WORK                                                dynamical systems. Instead of a fixed data schema (that is,
   Dynamical systems are fundamental to many fields. Fields        the information model as attribute/value pairs) partitioned
concerned with the “real” world – such as physics, control         into data (static) and status attributes (fluent), we use the
theory, and cyber-physical systems – study primarily con-          semistructured RDF triples data model without the distinc-
tinuous-time systems. In the digital world of computation,         tion of fixed and fluent partitions. GSM systems operate on
discrete-time systems are common, with a monotonically in-         incoming events and outgoing events. In contrast to GSM
creasing sequence of integers denoting time (often written         and also our earlier work [16], we distinguish between ac-
2
  http://www.w3.org/TR/ldp                                         5
                                                                     Or interactive systems, that in contrast to newer definitions
3
  http://www.arvida.de/                                            of reactive systems do not have the strict timing requirement
4
  http://www.ivision-project.eu/                                   to react at the pace of the environment.




                                                              63
          Towards Specification and Execution of Linked Systems



tions and events, and user agents and servers. While GSM           URI and the version information). In a HTTP response
assumes a fixed representation of different steps and mile-        message, the start line S consists of a HTTP status code
stones in the system, we do not assume a fixed model but           and information on the used HTTP version.
provide the possibility to model such representations in RDF
triples. In GSM, updates to the world state are visible im-           Interaction with HTTP URIs is done in request/response
mediately. In our model, updates to the world state are only       pairs. The message body B of a HTTP message contains a
visible in the next step once a new sensing round accessing        representation of the current state of the resource identified
the resource state has been carried out.                           via the request URI in the start line. Representations of
   Semantic Web Services [17] assume a fully described task        state can vary over time, just like the resource can change.
environment, and use expressive first-order logic, similar to         A HTTP request has a HTTP method in its status line.
ASMs, to represent the state. In Semantic Web Services,            The HTTP methods include GET, PUT, POST, and DELETE.
AI planning based on descriptions is central for combining         Less popular methods include PATCH and OPTIONS7 . There
arbitrary network-accessible functions (via SOAP) into an          exists a rough mapping from the HTTP methods to the
executable plan. Instead of arbitrary functions, we assume         CRUD operations, create, read, update, delete – the basic
a resource-oriented CRUD interface. We share the long-             operations for persistent storage, which we present as we
term vision of Semantic Web Services and Agents in the             describe the HTTP methods. We call methods that are free
Semantic Web [10]. But we focus on the part that we feel           of side effects “safe”. The safe HTTP methods are:
is widely deployable today, namely specifying and executing
systems combining comparably simple Read-Write Linked                   • A GET request retrieves the representation of the cur-
Data components without descriptions.                                     rent resource state (corresponding to “read” in CRUD).
                                                                        • An OPTIONS request results in the methods that are
3.     PRELIMINARIES                                                      allowed on a resource. The body of response messages
  In the following, we provide definitions for web interfaces             to OPTIONS requests could contain formal service de-
based on a common access protocol and a common knowl-                     scriptions in a possible extension of our approach. We
edge representation language. We assume Read-Write Linked                 currently do not use OPTIONS.
Data [4], which informally can be alternatively viewed as
                                                                     Methods that change the state of a resource are called “un-
the combination of Linked Data [3] and HTTP CRUD oper-
                                                                   safe” (e.g., PUT, POST, DELETE, PATCH). The unsafe requests
ations, or as Web APIs on an RMM level of at least 2 that
                                                                   (those are for “create”, “update” and “delete” in CRUD) are:
serve RDF in one of its various syntaxes.

3.1     Resources and URIs                                              • A PUT request with message body b assigns b as the
                                                                          representation of the resource state. PUT can be used
  The following definitions build on the notions of a resource            to create a resource with a URI set by the client.
a URI, an identifier for a resource.
                                                                        • A PATCH request with body b updates a resource rep-
   Definition 1 (Resource, URI). A resource is an ab-                     resentation (remove and add data) based on the sent
stract notion for things of discourse, be they abstract or con-           patch specification b.
crete, physical or virtual (e.g., a document on the web, a
car, or the set of the natural numbers). A Uniform Re-                  • A POST request can serve different purposes:
source Identifier (URI) is a character string that identifies
a resource.                                                                 – append data to an existing representation of a
                                                                              resource;
  A URI has a scheme, which is the beginning of the charac-                 – create a new resource with a URI determined by
ter string until the first colon. The scheme specifies how to                 the server; or
interpret the rest of the URI. We focus on the http scheme
                                                                            – perform RPC-style arbitrary data-processing (not
(the considerations analogously apply to the https scheme).
                                                                              possible on file URIs).
Moreover, we provide an analogy for http URIs with the
scheme file. Collections (e. g. lists, sets) are a particular             The POST request allows for data processing in a remote
kind of resources, treated later.                                         procedure call (RPC) fashion. Therefore, POST allows
                                                                          for invoking arbitrary operations (functions). To ben-
3.2     Hypertext Transfer Protocol                                       efit from the uniform interface of REST, in this pa-
   While a URI with the scheme http first is to identify a                per we only consider state updates, in-line with RMM
resource, the scheme also indicates that second we may be                 level 2.
able to interact with the resource using the Hypertext Trans-
fer Protocol (HTTP)6 . HTTP is the prototypical variant of              • A DELETE request removes a resource.
REST.
                                                                      If multiple applications of the same method yield the same
   Definition 2 (HTTP Request, HTTP Response).                     result, we call these methods “idempotent” (e.g., GET because
A HTTP message is a tuple hS, H, Bi, where S is the manda-         it is safe, PUT because if the resource state is overwritten
tory start line, H is an optional list of header name/value        multiple times with the same data, the resulting resource
pairs, and B is the message body, also optional. A HTTP re-        state is still the same).
quest is a HTTP message in which the start line S consists            Using the HTTP methods, we operate with resources iden-
of a request line (with the HTTP method and the request            tified by URIs with the http scheme. Alternatively, we
6                                                                  7
    http://tools.ietf.org/html/rfc7230                                 http://tools.ietf.org/html/rfc7231




                                                              64
         Towards Specification and Execution of Linked Systems



can define the HTTP methods also for URIs with the file            4.1   Semantics of HTTP Operations
scheme, i.e. URIs that identify files and directories. For ex-       Let S be an RDF dataset. We write St for RDF dataset
ample, GET on such a URI would retrieve the content of the         S at time t . With GET, we are able to obtain the resource
file; PUT on a file URI would create the file with the pay-        state, so that we can process the resource state as part of
load; PUT on a file URI ending in a slash character would          our world model. Let u be a URI from U identifying not a
create a directory.                                                collection resource. Let r a request/response pair involving
                                                                   u which relates to a named graph in S.
3.3    Resource Description Framework                                We contrast the current state t of an RDF dataset S before
  As indicated by the Linked Data principles, we assume            the request/response pair r with the state of S at t + 1 after
that the representation of the state of resources is given us-     the request/response pair r. Now we can formally define how
ing the Resource Description Framework (RDF) in an RDF             PUT, POST and DELETE behave. We denote a “don’t-care” as
graph.                                                             a dot (“·”).

   Definition 3 (RDF Term, Triple, Graph). The set                    • PUT: Let r be a request/response pair hPUT u, ·, Bi,
of RDF terms consists of the set of URIs U , the set of blank           h200 OK, ·, ·i. Applying r to St yields St+1 , where in
nodes B and the set of RDF literals L, all being pairwise dis-          St+1 the triples belonging to u are B.
joint. A tuple hs, p, oi ∈ (U ∪ B) × U × (U ∪ B ∪ L) is called
                                                                      • POST: Let r be a request/response pair hPOST u, ·, Bi,
an RDF triple, where s is the subject, p is the predicate, and
                                                                        h200 OK, ·, ·i. Applying r to St yields St+1 , where in
o is the object of the triple. A set of triples is called RDF
                                                                        St+1 there are additional triples (related to those in B,
graph.
                                                                        if B 6= ∅) related to u.
   To be able to talk about the state representations retrieved       • DELETE: Let r be a request/response pair hDELETE u, ·, ·i,
from multiple resources, i.e. multiple RDF graphs, we intro-            h204 No Content, ·, ·i. Applying r to St yields St+1 ,
duce the notion of an RDF dataset.                                      where in St+1 there is no representation available at u.

  Definition 4 (Named Graph, RDF Dataset).                           Now, let uc be a URI from U identifying a collection re-
Let G be the set of RDF graphs and let U be the set of URIs.       source.
A pair hg, ui ∈ G × U is called a named graph. An RDF
                                                                      • PUT: PUT is not possible on collection resources (we as-
dataset consists of a (possibly empty) set of named graphs
                                                                        sume collections are managed by the server). LDP
(with distinct names) and a default graph g ∈ G without a
                                                                        does not require the PUT request to be supported in
name.
                                                                        the context of collections either.
  To talk about the state of resources at different times, we         • POST: Let r be a request/response pair hPOST uc, ·, Bi,
introduce an index t, which denotes the point in time to                h201 Created, H, ·i. Applying r to St yields St+1 ,
which an RDF dataset D refers, thus yielding Dt . We as-                where in St+1 there are additional triples (those in B)
sume discrete time represented as monotonically increasing              related to a newly created8 URI ue that is linked to
integers.                                                               uc. Also, uc is different now, as the link to the newly
                                                                        created resource identified via URI ue is part of the
4.    LINKED SYSTEMS                                                    state of the collection resource. The set of headers H
                                                                        contains ue as the value of the Location header. In
   In the following, we first introduce the general notion for
                                                                        compliance with LDP, we assume no representation in
dynamics in Linked Data which we call Linked Data Tran-
                                                                        the body of the response.
sition System. We then define user agents and servers, and
next outline Linked Systems.                                          • DELETE: Let r be a request/response pair hDELETE uc, ·, ·i,
   The Linked Data Platform (LDP) recommendation poses                  h204 No Content, ·, ·i. Applying r to St yields St+1 ,
restrictions on how to interact with web resources, partic-             where in St+1 there is no representation available for
ularly collection resources, in a Linked Data context. Our              uc. Whether deleting the collection resource uc also
Read-Write Linked Data interface as described in the fol-               affects its associated element resources depends on the
lowing definitions adheres to LDP where it concerns HTTP-               type of the relation between the collection and its ele-
based interaction with collection resources. We omit the                ments (cf. the container types specified in LDP).
various header fields that are part of LDP.
   On the web, we operate in a decentralised system in which       4.2   Linked Data Transition System
we cannot control each participant. REST provides a lim-             Having covered the semantics of one transition from t to
ited set of constraints on the components that allow users         t + 1, we now can define a transition system that describes
to assume a certain behaviour. The use of resource-based           resource states (represented as RDF datasets) over multiple
CRUD operations is one such constraint. However, certain           transitions. That is, we can we say what happens with the
behaviours are under-specified. For instance, if we overwrite      resource state at t + 1 relative to resource state at t.
a resource state with PUT, the resulting state of the resource
may differ from what has been sent in the message body               Definition 5 (Linked Data Transition System).
of the PUT request. Also, changing the state of resource A         Let Req, Resp be the set of all request/response pairs with
may affect the state of resource B. In our definitions of the      unsafe operations. A Linked Data Transition System is a
semantics of HTTP operations that follow, we allow such            pair (S, →):
side effects only to occur between collection resources and        8
                                                                     Or taken from a pre-filled reservoir of URIs, for example
element resources.                                                 as defined in ASMs.




                                                              65
          Towards Specification and Execution of Linked Systems



   • A set of RDF datasets S representing resource states.                  • The transition relation → over S × 2E × 2A × S. The
                                                                              transition consists of a set of events from E and a set
   • The transition relation → over S × 2Req,Resp × S. We                     of actions from A.
     can contrast the current state st with the next state
     st+1 , given a transition occurs. A transition consists               Linked Systems cover both user agents and servers. In
     of a set of request/response pairs.                                 case E is the empty set, we arrive at the special case of a
                                                                         Linked Data User Agent. In case A is the empty set, we
   For Linked Data Transition Systems we assume an om-                   arrive at the special case of a Linked Data Server.
niscient view, where we assume we can readily observe all                  We now can define the execution of a Linked System.
request/response pairs in the system and all resource states.
The states S are the states of all resources in the system. We              Definition 9 (Run, Step). A run of a Linked System
write s0 , s1 . . . sn to denote datasets at different time points.      M is a sequence of states, unsafe events, and unsafe actions.
                                    r0
We write (so , ro , s1 ) ∈→ as so −→    s1 . We can define the his-      A run has multiple steps. One transition is a step. A suc-
tory of a system by a sequence so −→
                                           r0     r1
                                              s1 −→   s2 . . ., where    cessful run starts in s0 and ends in a state sn ∈ F , where n
so , s1 , s2 are states, and r0 , r1 are sets of request/response        denotes the number of steps carried out during the run.
pairs.                                                                                                                  eo ,a
                                                                                                                            0
   Next, we introduce a limited point of view, where we dis-                An example of a one-step run would be so −−−→      s1 , where
tinguish the direction of requests relative to a user agent or           s1 ∈ F .
server.                                                                     In case the Linked System is a user agent only (and thus
                                                                         only emits actions), we can run the system from the com-
4.3    Actions and Events                                                mand line. In case the Linked System is a server, we have
  We now can define the notion of a Linked Data User                     to provide a HTTP interface to have the ability to receive
Agents and Linked Data Servers. A HTTP message ex-                       events.
change involves two parties: user agents and servers. The                   We start the execution of a Linked Data User Agent from
user agent creates the request and the server creates the                the command line. We start with the initial state so . As the
response.                                                                user agent does not receive events, we successively execute
                                                                         steps until a final state f ∈ F is reached. Each step t consists
   Definition 6 (User Agent, Action). Let Req be a                       of the following:
HTTP request message, and Resp be a HTTP response mes-                      • Collect the resource state st by dereferencing the graph
sage. The function send(Req, Resp) denotes a system emit-                     names in the RDF dataset st . We provide link traver-
ting Req and receiving Resp. An action is an outgoing re-                     sal specifications using rules that yield the graph names
quest/response pair. User agents are systems that emit ac-                    to be dereferenced in a fixpoint procedure. We can also
tions.                                                                        provide deduction rules to encode different semantics
                                                                              (such as RDFS or subsets of OWL). The result is a
  We can group the actions into safe actions (GET) and un-                    materialised version of the resource state st .
safe actions (PUT, POST, DELETE and PATCH).
                                                                            • After computing the fixpoint to yield the overall re-
   Definition 7 (Server, Event). Let Req be a HTTP                            source state, carry out the unsafe requests as specified
request message, and Resp be a HTTP response message.                         in the transition relation. The responses of the unsafe
The function receive(Req, Resp) denotes a system receiv-                      requests become part of st+1 .
ing Req and sending Resp. An event is an incoming re-
quest/response pair. Servers are systems that receive events.               • We also provide means to register queries that are con-
                                                                              tinuously evaluated on the current internal resource
  We can group the events into safe events (GET) and unsafe                   state. To arrive at a fully streaming model, we are
events (PUT, POST, DELETE and PATCH).                                         only supporting SPARQL basic graph pattern queries,
  The same request/response pair is regarded as an action                     which can be implemented in non-blocking operators.
in the user agent and as an event on the server. Informally,               As the default, a new step t + 1 immediately starts once
the difference between user agents and servers is similar to             step t has been finished. We are able to align the start of
the difference between generators and recognisers in state               each step at specified interval boundaries, or specify a wait
machines.                                                                time between each step. We use the time-triggered execution
4.4    Linked Systems                                                    in our VR demonstrators at 30 Hertz (one step each 33ms).
                                                                           The execution of a Linked Data Server has to take into ac-
  We can now define the notion of a Linked System.                       count events from the external environment. We thus arrive
                                                                         at an event-triggered execution model: the system runs once
   Definition 8 (Linked System). Let A be the set of                     the incoming request (an event) arrives. The run proceeds
all (outgoing) unsafe actions and let E be the set of all                as in the case of Linked Data User Agents. In case the run
(incoming) unsafe events. A Linked System consists of the                succeeds, the response to the event includes a HTTP status
quadruple (S, s0 , F, →):                                                code in the 2xx range, denoting a successful run. Otherwise,
   • A set of RDF datasets S representing resource states.               a server error (HTTP status code 500) is returned. Per de-
                                                                         fault, the union of the triples in the state st is serialised as
   • The initial state, s0 ∈ S.                                          RDF triples in the body of the response. Optionally, we
                                                                         can filter the triples with a query to reduce the amount of
   • A set of the final states, F ⊆ S.                                   returned data.




                                                                    66
         Towards Specification and Execution of Linked Systems



5.   CONCLUSION                                                     [8] Y. Gurevich. Abstract State Machines: An Overview
   We have provided a formal account of Read-Write Linked               of the Project. In Proceedings of the Third
Data as a transition system. We have identified the two roles           International Symposium on Foundations of
of user agents (components that emit actions) and servers               Information and Knowledge Systems, pages 6–13.
(components that receive events), and have shown how both               Springer, 2004.
roles can be understood in terms of the transition system.          [9] D. Harel and A. Pnueli. Logics and Models of
We have outlined the notion of Linked Systems, which can                Concurrent Systems, chapter On the Development of
be instantiated in user agent or server roles, or both.                 Reactive Systems, pages 477–498. Springer, 1985.
   We base the presented formalism on our experiences col-         [10] J. Hendler. Agents and the Semantic Web. IEEE
lected with a prototype [16] that we have been using in a               Intelligent Systems, 16(2):30–37, Mar. 2001.
variety of projects. In the implementation, we represent           [11] F. L. Keppmann, T. Käfer, S. Stadtmüller,
the state transition relation in a variant of event-condition-          R. Schubotz, and A. Harth. Integrating Highly
action rules, where the condition serves as a guard that can            Dynamic RESTful Linked Data APIs in a Virtual
trigger the execution of an action. We currently only imple-            Reality Environment (Demo). In Proceedings of the
ment non-blocking operators to enable stream processing.                13th IEEE International Symposium on Mixed and
Future work includes the finalisation of the syntax for rules           Augmented Reality, pages 347–348, 2014.
and a representation of traces of runs. We also consider           [12] F. L. Keppmann, T. Käfer, S. Stadtmüller,
adding support for state representations other than RDF.                R. Schubotz, and A. Harth. High Performance Linked
Our plan is to provide the system as open source.                       Data Processing for Virtual Reality Environments. In
   Our formalism can serve as the basis for parallel execu-             Poster & Demo Proceedings of the 13th International
tion. Given that Linked Systems are based on fundamental                Semantic Web Conference, 2014.
notions common to many dynamical systems, the formalism            [13] N. Milanovic and M. Malek. Current Solutions for
could be extended to incorporate further functionality. For             Web Service Composition. IEEE Internet Computing,
example, we could add invariants, which are observed and                8(6):51–59, Nov 2004.
checked during execution. In case a substantial amount of          [14] C. Pautasso, O. Zimmermann, and F. Leymann.
descriptions for components become available, we could use              RESTful Web Services vs. ”Big” Web Services:
AI planning to generate the transition relation in a Linked             Making the Right Architectural Decision. In
System from the descriptions of the components, given an                Proceedings of the 17th International Conference on
initial and a final state. To be able to use verification tech-         World Wide Web, pages 805–814. ACM, 2008.
niques, we would likely define a reduced subset of the pre-
                                                                   [15] K. Schneider. Verification of Reactive Systems:
sented Linked System, for instance providing finite domains             Formal Methods and Algorithms. Springer, 2004.
or reducing the flexibility of the RDF triples data model.
                                                                   [16] S. Stadtmüller, S. Speiser, A. Harth, and R. Studer.
                                                                        Data-Fu: A Language and an Interpreter for
Acknowledgements                                                        Interaction with Read/Write Linked Data. In
We thank Dieter Fensel for pointing out the possible con-               Proceedings of the 22nd International Conference on
nection between REST and Abstract State Machines, Mar-                  World Wide Web, pages 1225–1236. ACM, 2013.
tin Junghans for explaining IOPE descriptions and process          [17] R. Studer, S. Grimm, and A. Abecker. Semantic Web
calculi, and Aidan Hogan for fruitful discussions related to            Services: Concepts, Technologies, and Applications.
dynamics in Linked Data. We acknowledge support from the                Springer, 2007.
BMBF ARVIDA project (FKZ 01IM13001G) and AFAP, a
BMBF Software Campus project (FKZ 01IS12051).

6.   REFERENCES
 [1] R. Alur. Principles of Cyber-Physical Systems. MIT
     Press, 2015.
 [2] C. Baier and J.-P. Katoen. Principles of Model
     Checking. MIT Press, 2008.
 [3] T. Berners-Lee. Linked Data. Design Issues, 2006.
     http://www.w3.org/DesignIssues/LinkedData.html.
 [4] T. Berners-Lee. Read-Write Linked Data. Design
     Issues, 2009. http://www.w3.org/DesignIssues/
     ReadWriteLinkedData.html.
 [5] E. M. Clarke, Jr., O. Grumberg, and D. A. Peled.
     Model Checking. MIT Press, 1999.
 [6] E. Damaggio, R. Hull, and R. Vaculı́n. On the
     Equivalence of Incremental and Fixpoint Semantics
     for Business Artifacts with Guard-Stage-Milestone
     Lifecycles. Information Systems, 38(4):561 – 584, 2013.
 [7] R. T. Fielding and R. N. Taylor. Principled Design of
     the Modern Web Architecture. ACM Transactions on
     Internet Technology (TOIT), 2(2):115–150, May 2002.




                                                              67