1 / 17

Tuple Space Model

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”)

kaiya
Download Presentation

Tuple Space Model

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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Tuple Space Model CS 5204 Fall 99

  2. tuple out tuple space eval in/rd process process process process Tuple Space Concepts CS 5204 Fall 99

  3. 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

  4. 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

  5. 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

  6. 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

  7. 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

  8. 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

  9. Agent Model CS 5204 Fall 99

  10. 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

  11. Mobile Agents CS 5204 Fall 99

  12. Places and Agents CS 5204 Fall 99

  13. Travel and Meeting CS 5204 Fall 99

  14. Authorization and Permission CS 5204 Fall 99

  15. Example CS 5204 Fall 99

  16. Architecture CS 5204 Fall 99

  17. 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

More Related