# Dynamic Linked Data: A SPARQL Event Processing Architecture
## 1 Introduction
Furthermore, we extend the concept of Wed of Data to applications that become the actionable extension of the Semantic Web. Nowadays, the Web of Data is becoming a Web of Dynamic Data, where detecting, communicating and tracking the evolution of data changes play crucial roles and open new research questions [3; 4]. Moreover, detecting data changes is functional to enable the development of distributed Web of Data applications where software agents may interact and synchronize through the knowledge base [5; 6]. The need for solutions on detecting and communicating data changes over the Web of Data has been emphasized in the past few years by research focused on enabling interoperability in the Internet of Things through the use of Semantic Web technologies (like the ones shown in [7; 8; 9; 10] just to cite a few). Last but not least, an attempt made by W3C is represented by the Web of Things ([[https://www.w3](https://www.w3)]([https://www.w3](https://www.w3)). org/WoT/) working group and by the Linked Data Notifications ([[https://www.w3.org/TR/ldn/](https://www.w3.org/TR/ldn/)]([https://www.w3.org/TR/ldn/](https://www.w3.org/TR/ldn/))) released in 2017 that provide the recommendation to enable notifications over Linked Data. In this paper, we propose a decentralized Web-based software architecture, named SEPA (SPARQL Event Processing Architecture) built on top of the authors' experience acquired developing an open interoperability platform for smart space applications [11; 12; 13; 14; 15; 16; 17; 18; 19; 20; 21]. SEPA derives and extends the architecture presented in [22] through the use of standard Linked Data technologies and protocols. It enables the detection and communication of changes over the Web of Data by means of a content-based publish-subscribe mechanism where the W3C SPARQL 1.1 Update and Query languages are fully supported respectively by publishers and subscribers. SEPA is built on top of the SPARQL 1.1 Protocol and introduces the SPARQL 1.1 Secure Event protocol and the SPARQL 1.1 Subscribe Language as a means for conveying and expressing subscription requests and notifications. In particular, assuming an event as \"any change in an RDF store\", SEPA has been mainly designed to enable event detection and distribution. The core element of SEPA is its broker (see Figure 1): it implements a content-based publish-subscribe mechanism where publishers and subscribers use respectively SPARQL 1.1 Updates (i.e., to generate events) and SPARQL 1.1 Queries (i.e., to subscribe to events). In particular, at subscription time, subscribers receive the SPARQL query results. Subsequent notifications about events (i.e., changes in the RDF knowledge base) are expressed in terms of added and removed query results since the previous notification. With this approach, subscribes can easily track the evolution of the query results (i.e., the context), with the lowest impact on the network bandwidth (i.e., the entire results set is not sent every time, but just the delta of the results). The SEPA broker design is detailed in Section 4. Figure 1: From the Web of Data to the Web of Dynamic Data. SEPA, SPARQL Event Processing Architecture. In this paper, we propose the SPARQL 1.1 Secure Event (SE) Protocol and the SPARQL 1.1 Subscribe Language presented, along with the mechanisms to support client and server authentication, data encryption and message integrity, in Section 3. The SPARQL 1.1 SE Protocol allows agents to interact with the broker like with a standard SPARQL Protocol service (also know as the SPARQL endpoint), but at the same time, it allows one to convey subscriptions and notifications expressed according to the SPARQL 1.1 Subscribe Language. SEPA provides developers with a design pattern where an application is constituted by a collection of agents. As shown in Figure 1, each agent plays a specific role within an application (i.e., producer, aggregator or consumer) and can be shared among different applications.