0% found this document useful (0 votes)
120 views7 pages

Bidirectional Tuple Space System

The document describes a bidirectional communication facility using a tuple space to allow users of a mobile application to ask and answer questions. It consists of three main components: 1. A tuple space to store questions and answers in a distributed shared memory. 2. A tuple space manager that handles matching questions to user profiles, notifying users of questions or answers, and maintaining the state of question/answer sets. 3. A web service interface that allows mobile applications to submit and retrieve questions and answers by interacting with the tuple space. The facility aims to facilitate question/answer functionality in a mobile app and serve as the foundation for communication between artificial intelligence agents as the platform develops.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
120 views7 pages

Bidirectional Tuple Space System

The document describes a bidirectional communication facility using a tuple space to allow users of a mobile application to ask and answer questions. It consists of three main components: 1. A tuple space to store questions and answers in a distributed shared memory. 2. A tuple space manager that handles matching questions to user profiles, notifying users of questions or answers, and maintaining the state of question/answer sets. 3. A web service interface that allows mobile applications to submit and retrieve questions and answers by interacting with the tuple space. The facility aims to facilitate question/answer functionality in a mobile app and serve as the foundation for communication between artificial intelligence agents as the platform develops.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Product Development Brief

“Bidirectional Tuple Space Communication Facility”


Friday, August 27, 2010

1
1. Overview! 3

2. Architecture & Functionality ! 3


2.1 The Tuple Space (TS)!.........................................................................................3

2.2 The Tuple Space Manager (TSM)!......................................................................4

2.2.1 Tuple Space Interface (TSI)! 5

2.2.2 Matcher! 5

2.2.3 Profile Handler! 5

2.2.4 Push Notification Manager (PNM)! 5

2.2.5 State Engine! 5

2.2.6 Web Service Interface (WSI)! 5

2.3 Tuple Space Web Service (TSWS)!....................................................................5

3 System Use Cases! 6

4. System Components Cost/Timeline! 8


4.1 The Tuple Space (TS)!.........................................................................................8

4.2 The Tuple Space Manager (TSM)!......................................................................8

4.3 Tuple Space Web Service (TSWS)!....................................................................8

4.4 Total Cost (TC)!....................................................................................................9

3.7 Implementation Timeline!...................................................................................9

4. Conclusion! 9

2
1. Overview
The cendoo platform requires, for its first phase release iPhone app, a two-way
communication facility that helps users ask each other questions regarding relevant topics.
While this facility is targeted at facilitating specific functionality in the iPhone application, it
should also be sufficiently forward-looking to integrate well as part of the inter-Butler
communication strategy forseen for cendoo during later development statges.

Briefly, the Facility should make it possible for a question to be posted from an iPhone
cendoo app. The question should be matched against the profiles of other cendoo users
that may have answers. These should be informed that a question is waiting using push
messaging. The originator of the question should be informed that a given number of users
recieved notifications regarding her question. Should answers be submitted, the originator
of the question should be informed using push notification, and should be able to access
the answers using the cendoo iPhone app.

2. Architecture & Functionality


Based on discussions with various partners, it was decided to implement the
communications facility as a tuple space with a web service interface and an interface to
the cendoo profile management platform, as shown in Figure 1.

Figure 1. Cendoo Communications Tuple Space Facility architecture.

It consists of the Tuple Space itself, the Tuple Space Manager with an interface to the
Profile Manager, and a web service that facilitates HTTP-based access to the tuple space.

2.1 The Tuple Space (TS)

A tuple space is an implementation of the associative memory paradigm for parallel/


distributed computing. It provides a repository of tuples that can be accessed concurrently.
3
As an illustrative example, consider that there are a group of processors that produce
pieces of data and a group of processors that use the data. Producers post their data as
tuples in the space, and the consumers then retrieve data from the space that match a
certain pattern. This is also known as the blackboard metaphor. Tuple space may be
thought as a form of distributed shared memory.

This paradigm is eminently suited to the bidirectional communication between remote


processes we which to achieve in cendoo. Here, the tuple space will be implemented as a
persistent, single-store tuple space with pattern-matching tuple retrieval. This will facilitate,
in the case of cendoo, the persistence required across server restarts, and the ability to
store bot question and answer tuples in one tuple space.

2.2 The Tuple Space Manager (TSM)

The TSM is responsible for providing the additional intelligence required to facilitate the
specific functionality needed for the cendoo communication paradigm. Its architecture is
shown in Figure 2 below.

Figure 2. Tuple Space Manager Architecture

The TSM consists of the Tuple Space Interface, a Matcher, a Profile Handler, a Push
Notification Manager, a State Engine and a Web Service Interface.

4
2.2.1 Tuple Space Interface (TSI)

The TSI handles the storage and retrieval of tuples into and from the tuple space. It can
return sets of tuples using wildcards if required, but does no matching on keywords,
leaving that up to the more powerful Matcher. It also handles deleting tuples that are no
longer required.

2.2.2 Matcher

The Matcher folds retrieved sets of tuples into binary structures that facilitate the rapid
matching of tuples using regular expressions.

2.2.3 Profile Handler

The Profile Handler interfaces with the cendoo Platform Profile Manager to request user
IDs that match, in terms of profile data, given sets of keywords received as part of
questions submitted, so as to determine which users may potentially be able to provide
answers and should therefor be informed accordingly.

2.2.4 Push Notification Manager (PNM)

The PNM maintains persistent connections to the Apple Push Notification Service secure
binary interface and the Apple Feedback Web Server to send push notifications to cendoo
iPhone app instances, and monitor which clients have received them.

2.2.5 State Engine

The state engine maintains information on the status of various question/answer sets and
determines which actions are to be taken next, including deleting completed request and
doing general housekeeping.

2.2.6 Web Service Interface (WSI)

The WSI interacts with the Web Service Interface to accept questions and answers as they
are submitted by iPhone apps, and to serve questions and answer data to those apps as
requested.

2.3 Tuple Space Web Service (TSWS)

The TSWS provides a simple HTTP interface to the tuple space. It effectively offers four
functions:

• Submit Question
• Retrieve Question
• Submit Answer
• Retrieve Answer(s)

5
In the case of submissions, the submitted information is URL-encoded for ease of use. In
the case of retrievals, the information is returned as JSON1 or XML depending on the
requirements of the retrieving entity.

3 System Use Cases


Typically, a cendoo iPhone app user would submit a question to the cendoo system using
the iPhone app, which is in turn handled by the Facility. The messages and entities
involved in submitting a question are shown in Figure 3.

Figure 3. Messages and entities involved in a question submission scenario

The Q-iPhone entity represents the originating iPhone app. The A-iPhone apps are those
belonging to users who could potentially provide answers.

Once a question has been submitted and potential answer sources informed, those
answer sources would ideally submit one or more answers. The originating app is
informed of the availability of one or more answers through push notification, and the app
can be used to retrieve available answers.

1 JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read
and write. It is easy for machines to parse and generate. It is based on a subset of the JavaScript
Programming Language, Standard ECMA-262 3rd Edition - December 1999. It is a text format that is
completely language independent but uses conventions that are familiar to programmers of the C-family of
languages, including C, C++, C#, Java, JavaScript, Perl, Python, and many others. These properties make
JSON an ideal data-interchange language.
6
The messages and entities involved in informing the originating application about available
answers, and the originating application accessing those answers, are shown in Figure 4.
below.

Figure 4. Messages and entities involved in an answer retrieval scenario

The two scenarios combined represent the bidirectional information exchange that will, in a
later phase, constantly occur between Butler agents in cendoo. As such, the infrastructure
being created for this facility can be extended and built upon for the further functionality
required in later development phases of cendoo.

You might also like