26: Using Places

  1. A place is a process that remains in one location on a single engine.
  2. Kinds of places
    1. An engine place is the place with the largest scope: it runs on a single Telescript engine and contains all other places running on that engine.
    2. All places within an engine place are virtual places.
  3. Larger locational entities
    1. A region is one or more engine places that run under the same authority.
      1. Each engine place in a region has a finder that knows the location of all the other engine places in the region. This knowledge ties the engine places of a region together.
    2. A telesphere is a network of one or more Telescript regions. It is, in essence, the entire Telescript networking world.
  4. Place nesting
    1. All virtual places must reside within another place. The engine place sits at the top level.
    2. A virtual place may have other places residing within itself.
    3. One place located within a second place is a subplace of the second place; the second place is the superplace of the first place.
  5. Place location
    1. Every place has a read-only address attribute that stores a teleaddress for the place.
      1. A teleaddress specifies the place's location and can be used to direct an agent to the place.
      2. A teleaddress contains three attributes
        1. authority, which contains the authority that created the place. This is the same type of authority used in the place's telename; it's assigned administratively
        2. location, a unique and assigned octet string that identifies a unique location for this place. If the place is not unique (that is, it shares the same location as its superplace), this attribute is a nil. Location may be assigned administratively or programatically.
        3. routingAdvice, a list of octet strings that denote regions (each region is denoted by its authority) that can route an agent to the location, put in order of decreasing preference.
      3. A place whose teleaddress has no location is located in its superplace's location. This allows a place and its subplaces to occupy the same location.
      4. A place whose teleaddress has a location is advertised. Its location is different than that of its superplace.
        1. All engine places are advertised.
    2. Every region maintains a specialized database called the finder.
      1. The finder contains information about the region's advertised places.
      2. Once an agent reaches a location's region, it can present a teleaddress to the finder. The finder can read the teleaddress and direct the agent to whatever of its advertised locations fits the teleaddress.
  6. Occupying a place
    1. A place may be occupied by other places and agents--or not occupied at all.
      1. Each process in the place is an occupant of the place.
      2. The engine allows references between a place and its occupants and references between occupants and their place of occupancy. This means that a place may call operations on its occupants and vice versa.
    2. As agents enter and exit a place, the number of the place's occupants changes.
    3. The place's contacts attribute is a list of the unprotected references to the place's occupants. The engine updates this list as processes enter and exit the place.
  7. Entering a place
    1. A process can enter a place in these ways:
      1. The place can instantiate the process.
      2. An agent occupying the place can instantiate the process.
      3. An agent can arrive as the result of a trip.
    2. Every place has an entering operation.
      1. The engine calls a place's entering operation whenever a process enters the place.
      2. The entering operation is a sponsored operation (discussed later), so it runs under the authority of the place.
      3. The engine passes as arguments the telename, class, permit and--optionally--the ticket (if an arriving agent) of the entering process.
      4. The entering operation can allow or deny occupancy depending on the arguments.
        1. If occupancy is allowed, the process occupies the place. The entering operation returns an object (whatever it wishes) that the engine stores as a record of the occupant. The engine updates the place's contacts attribute to include a reference to the new occupant.
        2. If occupancy is denied, the process throws an exception that states the denial.
      5. The entering operation may reset entering process's local permit if desired.
  8. Recording occupants
    1. Whenever an occupant successfully enters a place, the entering operation returns an object that the engine stores as a record of the occupant.
    2. The place can modify that record from time to time to keep track of its state of interaction with the occupant.
      1. The "who" op on any process returns its record so that the record can be read or changed.
  9. Exiting a place
    1. A process exits a place in these ways:
      1. The process finishes its live operation and dies.
      2. The process exhausts its permit (exceeds its age or other resources) and is killed.
      3. The process violates its permit and is terminated.
      4. An agent departs on a trip.
    2. When a process exits a place, the engine sends a signal to the place containing an ExitEvent object. (Events and signals are a multicast communication mechanism discussed in a later chapter.)
    3. The engine removes the reference to the exiting process from the place's contacts attribute.
    4. The occupant record is part of contacts, a dictionary mapping a process to its occupant record

TS Ref - 26 JUN 1996

Generated by the sweat of Mike Boom's brow.