The increasing maturity of some well-established technologies – such as XPath – along with the sharp rise of brand-new ones – i.e. the blockchain – presents new opportunities to researchers in the field of multi-agent coordination. In this talk we briefly discuss a few technologies which, once suitably interpreted and integrated, have the potential to impact the very roots of tuple-based coordination as it stems from the archetypal LINDA model.
Labelling Requirements and Label Claims for Dietary Supplements and Recommend...
Novel Opportunities for Tuple-based Coordination: XPath, the Blockchain, and Stream Processing
1. Novel Opportunities for Tuple-based Coordination:
XPath, the Blockchain, and Stream Processing
Stefano Mariani† Andrea Omicini Giovanni Ciatto
stefano.mariani@unimore.it, {andrea.omicini, giovanni.ciatto}@unibo.it
†Dipartimento di Scienza e Metodi dell’Ingegneria (DISMI), Universit`a di Modena e Reggio
Emilia
Dipartimento di Informatica – Scienza e Ingegneria (DISI), Universit`a di Bologna
18th Workshop “From Objects to Agents (WOA 2017)”
Scilla, RC, Italy, 16 June 2017
Mariani, Omicini, Ciatto (UniMoRe, UniBo) Opportunities for Tuple-based Coordination WOA 2017 1 / 33
3. Motivation & Goal
Next in Line. . .
1 Motivation & Goal
2 Enabling Technologies
3 Impact on Tuple-based Coordination
4 Conclusion & Outlook
Mariani, Omicini, Ciatto (UniMoRe, UniBo) Opportunities for Tuple-based Coordination WOA 2017 3 / 33
4. Motivation & Goal
Motivation & Goal I
coordination technologies still struggle to gain momentum in industry
nevertheless, they are likely to become essential in forthcoming
scenarios such as the Internet of Things (IoT) [Gubbi et al., 2013]
their practical success is likely to depend on their ability to integrate
with industry-ready technologies
Mariani, Omicini, Ciatto (UniMoRe, UniBo) Opportunities for Tuple-based Coordination WOA 2017 4 / 33
5. Motivation & Goal
Motivation & Goal II
Our bold claim
Well-established and new technologies such as
XPath
the blockchain
in-stream processing
may improve industry adoption of middleware technologies such as those
based on tuple-based coordination models [Rossi et al., 2001]—once suitably
integrated
Mariani, Omicini, Ciatto (UniMoRe, UniBo) Opportunities for Tuple-based Coordination WOA 2017 5 / 33
6. Enabling Technologies
Next in Line. . .
1 Motivation & Goal
2 Enabling Technologies
3 Impact on Tuple-based Coordination
4 Conclusion & Outlook
Mariani, Omicini, Ciatto (UniMoRe, UniBo) Opportunities for Tuple-based Coordination WOA 2017 6 / 33
7. Enabling Technologies
XPath I
XPath [W3C, 2017]
XPath is a major element in the XSLT standard, enabling navigation
through elements and attributes of an XML document
path expressions to select (sets of) nodes
selection symbols to match nodes wherever they are
predicates to match precise siblings
wildcards to match any attribute node
XPath axes to define sets of nodes relative to the current one1
Mariani, Omicini, Ciatto (UniMoRe, UniBo) Opportunities for Tuple-based Coordination WOA 2017 7 / 33
8. Enabling Technologies
XPath II
Path expressions
child::*/child::price
matches all price grandchildren of the current node
/bookstore/book[position()<3]
matches the first two book nodes children of the bookstore element
//title[@*]
matches all title elements which have at least one attribute,
regardless of its kind
Mariani, Omicini, Ciatto (UniMoRe, UniBo) Opportunities for Tuple-based Coordination WOA 2017 8 / 33
9. Enabling Technologies
XPath III
Key benefit of XPath
It is possible to select an XML element regardless of its location within the
XML document—that is, with no clue on the structure of the XML
document itself (e.g., depth and breadth of the XML tree)
1
http://www.w3schools.com/xml/xpath_axes.asp
Mariani, Omicini, Ciatto (UniMoRe, UniBo) Opportunities for Tuple-based Coordination WOA 2017 9 / 33
10. Enabling Technologies
The Blockchain I
The blockchain [Underwood, 2016]
The blockchain is a distributed shared ledger where transactions are
verified against programmed rules and persistently tracked in append-only
blocks.
transactions imply synchronisation with all other ledgers in the same
network
consensus among replicas of the ledger about transactions verification
occurs through programmed rules called smart contracts
smart contracts encode the rules that transactions must abide to for
passing verification
cryptographic hashes and asymmetric key encryption guarantee
blocks’ integrity and identification of participants, respectively
Mariani, Omicini, Ciatto (UniMoRe, UniBo) Opportunities for Tuple-based Coordination WOA 2017 10 / 33
11. Enabling Technologies
The Blockchain II
Key benefit
trust between parties, access transparency, and accountability come
for free
synchronisation and consensus to achieve consistency
Mariani, Omicini, Ciatto (UniMoRe, UniBo) Opportunities for Tuple-based Coordination WOA 2017 11 / 33
12. Enabling Technologies
In-stream Processing I
In-stream processing [Marz and Warren, 2015]
A stream processing engine is just a sort of data processing engine that is
designed to deal with infinite data sets
de-facto standard for implementing the big data infrastructures
underlying many IoT applications [Gubbi et al., 2013]
in-stream processing focusses on unbounded streams of data which
are continuously processed to deliver partial results always up-to-date
system architecture
front-end of fault-tolerant data buffers
back-end of stream processors coordinating so as to split the
computational load
storage layer for both processing state and output data
Mariani, Omicini, Ciatto (UniMoRe, UniBo) Opportunities for Tuple-based Coordination WOA 2017 12 / 33
15. Enabling Technologies
In-stream Processing IV
Key benefits
stream replay to rollback a stream to fetch older data
lineage tracking to correlate streaming data and processing events
Mariani, Omicini, Ciatto (UniMoRe, UniBo) Opportunities for Tuple-based Coordination WOA 2017 15 / 33
16. Impact on Tuple-based Coordination
Next in Line. . .
1 Motivation & Goal
2 Enabling Technologies
3 Impact on Tuple-based Coordination
4 Conclusion & Outlook
Mariani, Omicini, Ciatto (UniMoRe, UniBo) Opportunities for Tuple-based Coordination WOA 2017 16 / 33
17. Impact on Tuple-based Coordination Novel Application Domains
Focus on. . .
1 Motivation & Goal
2 Enabling Technologies
3 Impact on Tuple-based Coordination
Novel Application Domains
Increased Expressiveness
4 Conclusion & Outlook
Mariani, Omicini, Ciatto (UniMoRe, UniBo) Opportunities for Tuple-based Coordination WOA 2017 17 / 33
18. Impact on Tuple-based Coordination Novel Application Domains
Privacy Demanding Applications I
Problem
Privacy demanding application domains (e.g., healthcare) may be
troublesome for tuple-based coordination
extra-linguistic means to address the issue of “who may get access to
what” [Busi et al., 2003]
typically, the infrastructure is patched with role-based access control
[Viroli et al., 2007]
Mariani, Omicini, Ciatto (UniMoRe, UniBo) Opportunities for Tuple-based Coordination WOA 2017 18 / 33
19. Impact on Tuple-based Coordination Novel Application Domains
Privacy Demanding Applications II
XPath solution
Partial and obscure pattern matching prevents interacting agents to
discover the whole structure of an information item given a portion of it
(e.g., an XML tuple representing a medical record from a patient’s
personal health folder)
Mariani, Omicini, Ciatto (UniMoRe, UniBo) Opportunities for Tuple-based Coordination WOA 2017 19 / 33
20. Impact on Tuple-based Coordination Novel Application Domains
Privacy Demanding Applications III
Blockchain solution
Transparency, accountability, and consistency straightforwardly support
univocal and secure identification of who is interacting with whom
(e.g., which clinicians with which patient)
protection from frauds (e.g., many nodes should be simultaneously
corrupted to break the system)
seamless observability and traceability of workflows (e.g., which
medical records are accessed for what purpose)
Mariani, Omicini, Ciatto (UniMoRe, UniBo) Opportunities for Tuple-based Coordination WOA 2017 20 / 33
21. Impact on Tuple-based Coordination Novel Application Domains
IoT Landscape I
Problem
Besides the privacy issue, which stays strong in the IoT domain too,
tuple-based solutions may be easily outperformed by message-based ones,
most notably due to the additional cost of synchronisation while retrieving
tuples (unnecessary when receiving messages)
the pace of data/events prosumption demands for stream processing
techniques
loosely-coupled interactions require decentralised coordination
Mariani, Omicini, Ciatto (UniMoRe, UniBo) Opportunities for Tuple-based Coordination WOA 2017 21 / 33
22. Impact on Tuple-based Coordination Novel Application Domains
IoT Landscape II
In-stream processing solution
Stream processing components may exploit tuple spaces to buffer streams
of tuples and split incoming data and aggregate partial results, actually
coordinating into processing pipelines able to
detect correlations between data/events through lineage
tracking—actually spotting dependencies while maintaining loose
coupling
cope with fast-paced data/events through stream replay
Mariani, Omicini, Ciatto (UniMoRe, UniBo) Opportunities for Tuple-based Coordination WOA 2017 22 / 33
23. Impact on Tuple-based Coordination Increased Expressiveness
Focus on. . .
1 Motivation & Goal
2 Enabling Technologies
3 Impact on Tuple-based Coordination
Novel Application Domains
Increased Expressiveness
4 Conclusion & Outlook
Mariani, Omicini, Ciatto (UniMoRe, UniBo) Opportunities for Tuple-based Coordination WOA 2017 23 / 33
24. Impact on Tuple-based Coordination Increased Expressiveness
Improving Linda Associative Access
associative access in Linda enables agents to access data based on
content rather than on name, address, location, etc. [Gelernter, 1985]
nevertheless, it requires agents to know in advance the structure of
the data item they want to access (e.g., position of arguments in a
tuple, depth in case of nested tuples, etc.)
XPath
Adopting XPath as the pattern matching language in a XML-tuples
setting enables partial and obscure pattern matching
the overall structure of the data items is unknown. . .
. . . and it cannot be dynamically discovered as a side-effect of pattern
matching itself (namely, not the whole tuple is returned, but only a
suitable portion)
⇒ fine-grained observability of data is straightforwardly enabled
Mariani, Omicini, Ciatto (UniMoRe, UniBo) Opportunities for Tuple-based Coordination WOA 2017 24 / 33
25. Impact on Tuple-based Coordination Increased Expressiveness
Extending Observability to Interaction Chains
Blockchain
The blockchain further expands observability beyond tuples, towards
interaction chains and coordination rules, by supporting event correlation
by checking consistency of distributed transactions—namely, which
transactions precede and follows a given one and whether they are
admissible
then, transactions : interactions = event correlation : coordination
and, coordination policies = smart contracts
⇒ since smart contracts are programs, expressiveness would naturally
lean towards the Turing-equivalent expressiveness of coordination
languages such as ReSpecT [Omicini, 2007]
Mariani, Omicini, Ciatto (UniMoRe, UniBo) Opportunities for Tuple-based Coordination WOA 2017 25 / 33
26. Impact on Tuple-based Coordination Increased Expressiveness
The Opportunity of Causal Correlation
Causal correlation
In-stream processing techniques such as lineage tracking may improve
construction of interaction traces towards causal correlation between
interaction events, for instance, occurring in the same “interaction
pipeline”—intended, e.g., as the sequence of interactions where different
components get access to the same data, or perform the same operations
on different data
Mariani, Omicini, Ciatto (UniMoRe, UniBo) Opportunities for Tuple-based Coordination WOA 2017 26 / 33
27. Conclusion & Outlook
Next in Line. . .
1 Motivation & Goal
2 Enabling Technologies
3 Impact on Tuple-based Coordination
4 Conclusion & Outlook
Mariani, Omicini, Ciatto (UniMoRe, UniBo) Opportunities for Tuple-based Coordination WOA 2017 27 / 33
28. Conclusion & Outlook
Conclusion & Outlook I
novel application scenarios such as the IoT mandate for new
abstractions and tools for agent coordination, so as to properly adapt
to the specific application requirements
specific technologies may
impact the expressive reach of coordination mechanisms and models,
by providing novel technical possibilities
extend their applicability to further application domains previously
unsuitable
Mariani, Omicini, Ciatto (UniMoRe, UniBo) Opportunities for Tuple-based Coordination WOA 2017 28 / 33
29. Conclusion & Outlook
Conclusion & Outlook II
Now what?
For instance, a brand-new model and middleware for tuple-based
coordination featuring
XPath-based coordination primitives (on XML tuples)
a blockchain-based backbone implementing the distributed tuple space
smart contracts and transactions as coordination rules
stream-processing oriented interaction paradigm for the coordinating
agents
may be conceived and built to advance beyond Linda limitations
Mariani, Omicini, Ciatto (UniMoRe, UniBo) Opportunities for Tuple-based Coordination WOA 2017 29 / 33
30. References
References I
Busi, N., Gorrieri, R., Lucchi, R., , and Zavattaro, G. (2003).
Secspaces: a data-driven coordination model for environments open to untrusted agents.
Electronic Notes in Theoretical Computer Science, 68(3):310 – 327.
Gelernter, D. (1985).
Generative communication in Linda.
ACM Transactions on Programming Languages and Systems, 7(1):80–112.
Gubbi, J., Buyya, R., Marusic, S., and Palaniswami, M. (2013).
Internet of Things (IoT): A vision, architectural elements, and future directions.
Future Generation Computer Systems, 29(7):1645–1660.
Marz, N. and Warren, J. (2015).
Big Data: Principles and best practices of scalable realtime data systems.
Manning Publications Co.
Omicini, A. (2007).
Formal ReSpecT in the A&A perspective.
Electronic Notes in Theoretical Computer Science, 175(2):97–117.
Mariani, Omicini, Ciatto (UniMoRe, UniBo) Opportunities for Tuple-based Coordination WOA 2017 30 / 33
31. References
References II
Rossi, D., Cabri, G., and Denti, E. (2001).
Tuple-based technologies for coordination.
In Omicini, A., Zambonelli, F., Klusch, M., and Tolksdorf, R., editors, Coordination of
Internet Agents: Models, Technologies, and Applications, chapter 4, pages 83–109.
Springer.
Underwood, S. (2016).
Blockchain beyond Bitcoin.
Communications of the ACM, 59(11):15–17.
Viroli, M., Omicini, A., and Ricci, A. (2007).
Infrastructure for RBAC-MAS: An approach based on Agent Coordination Contexts.
Applied Artificial Intelligence, 21(4–5):443–467.
W3C (2017).
XML Path Language (XPath) 3.1.
W3C.
Mariani, Omicini, Ciatto (UniMoRe, UniBo) Opportunities for Tuple-based Coordination WOA 2017 31 / 33
32. Extras
URLs
Slides
On APICe
→ http://apice.unibo.it/xwiki/bin/view/Talks/CoordinationWoa2017
On SlideShare
→ http://www.slideshare.net/andreaomicini/novel-opportunities-for-
tuplebased-coordination-xpath-the-blockchain-and-stream-processing
Paper
On APICe
→ http://apice.unibo.it/xwiki/bin/view/Publications/CoordinationWoa2017
Mariani, Omicini, Ciatto (UniMoRe, UniBo) Opportunities for Tuple-based Coordination WOA 2017 32 / 33
33. Novel Opportunities for Tuple-based Coordination:
XPath, the Blockchain, and Stream Processing
Stefano Mariani† Andrea Omicini Giovanni Ciatto
stefano.mariani@unimore.it, {andrea.omicini, giovanni.ciatto}@unibo.it
†Dipartimento di Scienza e Metodi dell’Ingegneria (DISMI), Universit`a di Modena e Reggio
Emilia
Dipartimento di Informatica – Scienza e Ingegneria (DISI), Universit`a di Bologna
18th Workshop “From Objects to Agents (WOA 2017)”
Scilla, RC, Italy, 16 June 2017
Mariani, Omicini, Ciatto (UniMoRe, UniBo) Opportunities for Tuple-based Coordination WOA 2017 33 / 33