tuple space model
Download
Skip this Video
Download Presentation
Tuple Space Model

Loading in 2 Seconds...

play fullscreen
1 / 17

Tuple Space Model - PowerPoint PPT Presentation


  • 88 Views
  • Uploaded on

Tuple Space Model. tuple. out. tuple space. eval. in/rd. process. process. process. process. Tuple Space Concepts. Tuple Space Operations. tuple : a series of typed fields examples: (“label”, 10, 2.15) (5, “term”)

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about ' Tuple Space Model' - kaiya


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
tuple space model

Tuple Space Model

CS 5204 Fall 99

tuple space concepts

tuple

out

tuple space

eval

in/rd

process

process

process

process

Tuple Space Concepts

CS 5204 Fall 99

tuple space operations
Tuple Space Operations
  • tuple: a series of typed fields
  • examples: (“label”, 10, 2.15)
  • (5, “term”)
  • (100)
  • Operations
    • out(t) insert the tuple t into the tuple space (non-blocking)
    • in(t) find and remove a “matching” tuple from the tuple space; block until a matching tuple is found
    • rd(t) like in(t) except that the tuple is not removed
    • eval(t) add the active tuple t to the tuple space

CS 5204 Fall 99

tuple matching
Tuple Matching

Let t(i) denote the ith field in the tuple t.

A tuple t given in a in(t) or rd(t) operation “matches” a tuple t’ in the tuple space iff:

1. t and t’ have the same number of fields, and

2. for each field

if t(i) is a value then t(i) = t’(i)

or

if t(i) is of the form ?x then t’(i) is a valid value for the

type of variable x

If more than one tuple in the tuple space matches, then one is selected nondeterministically.

As a result of tuple matching if t(i) is of the form ?x, then x := t’(i)

CS 5204 Fall 99

examples of tuple matching
Examples of Tuple Matching

The tuple defined by:

int i;

float f;

(“label”, ? i, ? f, 10)

Matches these: Does not match any of these:

(“label” , 20, 1.5, 10) (“label, 20, 1.5)

and i := 20; f:= 1.5; (“label”, 20, 1.5, 10, 2)

(“other”, 20, 1.5, 10)

(“label”, 0, 2.7, 10) (“label, 20, 1.5, 5)

and i:=0; f:=2.7 (“label”, “20”, 1.5, 10)

(“label”, 20, “1.5”, 10)

CS 5204 Fall 99

client server example

client

in

in

out

out

client

in

out

(“server”, I, req)

(“server index”,i)

out

server

in

(“client, i, resp)

Client-Server Example

CS 5204 Fall 99

client server example1
Client-Server Example

client()

{ int index;

request req;

response resp;

. . .

in(“server index”, ?index);

out(“server index:, index+1);

. . .

out(“server”, index, req);

in(“client”, index, resp);

}

server()

{ int index = 1;

request req;

response resp;

. . .

while(1) {

in(“server”, index, ? req);

//compute resp

out(“client”, index, resp);

index = index + 1;

}

}

CS 5204 Fall 99

uses of tuple spaces
Uses of Tuple Spaces

As a coordination language: added to existing programming languages to facilitate distributed and parallel programming

As a distributed registry of names, events, information among loosely coupled processes

CS 5204 Fall 99

agent model

Agent Model

CS 5204 Fall 99

characteristics of mobile agents
Characteristics of Mobile Agents
  • Encapsulated: code, data, itinerary, activity, etc.
  • Autonomous: decisions on what to do, where to go and when to go.
  • Asynchronous: has its own thread of execution
  • Local interaction : with other mobile agents or stationary objects locally.
  • Disconnected operation: in the absence of a network connection
  • Parallel execution: among agent dispatched to different sites

CS 5204 Fall 99

mobile agents
Mobile Agents

CS 5204 Fall 99

places and agents
Places and Agents

CS 5204 Fall 99

travel and meeting
Travel and Meeting

CS 5204 Fall 99

example
Example

CS 5204 Fall 99

architecture
Architecture

CS 5204 Fall 99

lange s seven good reasons for using mobile agents
Lange’s Seven Good Reasons for Using Mobile Agents
  • reduce network load
  • overcome network latency
  • encapsulate protocols
  • execute asynchronously and autonomously
  • adapt dynamically
  • naturally heterogeneous
  • robust and fault-tolerant

CS 5204 Fall 99

ad