Top
Print

# Distributed Programming in Mozart - A Tutorial Introduction

## Peter Van Roy, Seif Haridi and Per Brand

> This tutorial shows how to write efficient and robust distributed applications with the Mozart programming system. We first present and motivate the distribution model and the basic primitives needed for building distributed applications. We then progressively introduce examples of distributed applications to illustrate servers, agents, mobility, collaborative tools, fault tolerance, and security.

> The tutorial is suitable for Oz programmers who want to be able to quickly start writing distributed programs. The document is deliberately informal and thus complements the other Oz tutorials and the research papers on distribution in Oz.

> The Mozart programming system has been developed by researchers from DFKI (the German Research Center for Artificial Intelligence), SICS (the Swedish Institute of Computer Science), the University of the Saarland, UCL (the Université catholique de Louvain), and others.

> Warning: The material in this document is still incomplete and subject to change from day to day.

# Index

A | B | C | D | E | F | G | H | I | J | L | M | N | O | P | R | S | T | U | V | W

### A

advanced failure model: 5.3 Advanced model

agent: 4 Mobile Agents

agent
  agent server: 4.1.1 Installing the agent servers
  barrier synchronization example: 4 Mobile Agents
  getting an agent server: 4.1.1 Installing the agent servers
  publishing an agent server: 4.1.1 Installing the agent servers
  resource: 4 Mobile Agents
  simple example: 4.1.2 Programming agents
  task: 4 Mobile Agents

agent server: 4.1.1 Installing the agent servers

agent server
  definition: 4.1.6 Definition of `AgentServer`

application
  connected: 1 Introduction
  overall structure: 2.3 Bringing it all together

array
  sited entity: 2.1.5 Sited entities

asynchronous failure detection: 5.3.2 Eager detection with watchers

asynchronous many-to-one channel: 2.1.2 Other stateful entities

atom: 2.1.4 Stateless entities

### B

base module: 2.1.5 Sited entities

basic failure model: 5.2 Basic model

### C

cached object: 2.1.1 Objects

cell
  analogy to C and Java: 2.1.2 Other stateful entities
  fault states: 5.4.5 Cells and locks

centralized semantics: see language semantics (2 Distribution Model)

channel
  port (asynchronous many-to-one): 2.1.2 Other stateful entities

chunk: 2.1.4 Stateless entities

C language
  relation to Oz cell: 2.1.2 Other stateful entities

class: 2.1.4 Stateless entities

communication failure: 5 Failure Model

component-based programming: 2.3 Bringing it all together

computed functor: 3.1.3 Remote computations and functors

compute server: 3.2.4 A compute server

concurrency
  90% rule: 2.1.3 Single-assignment entities

connected applications: 1 Introduction

`Connection` module: 1 Introduction

`Connection` module
  example: 3.1.1 Connecting applications by means of tickets

constrained variable: 2.1.5 Sited entities

CORBA: 1 Introduction

cross-site cycle: 2.2.2 Distributed memory management

cycle: 2.2.2 Distributed memory management

### D

data-flow: 2.1.2 Other stateful entities

default failure detection: 5.2.1 Enabling exceptions on faults

dictionary
  sited entity: 2.1.5 Sited entities

distributed semantics
  array: 2.1.5 Sited entities
  atom: 2.1.4 Stateless entities
  chunk: 2.1.4 Stateless entities
  class: 2.1.4 Stateless entities
  definition: 2 Distribution Model
  dictionary: 2.1.5 Sited entities
  function: 2.1.4 Stateless entities
  functor: 2.1.4 Stateless entities
  list: 2.1.4 Stateless entities
  name: 2.1.4 Stateless entities
  number: 2.1.4 Stateless entities
  object: 2.1.4 Stateless entities
  object-record: 2.1.4 Stateless entities
  procedure: 2.1.4 Stateless entities
  record: 2.1.4 Stateless entities
  space: 2.1.5 Sited entities
  string: 2.1.4 Stateless entities
  thread: 2.1.5 Sited entities

### E

eager
  failure detection: 5.3.2 Eager detection with watchers
  stateless data: 5.4.1 Eager stateless data

example
  client crash: 6.1 A fault-tolerant hello server
  using `Connection` module: 3.1.1 Connecting applications by means of tickets
  using `Pickle` module: 3.1.2 Persistent data structures by means of pickles
  using `Remote` module: 3.1.3 Remote computations and functors

exception
  format for failure exception: 5.2.3 Exception formats
  in failure model: 5.2 Basic model

### F

fail-silent assumption: 5 Failure Model

failure
  advanced model: 5.3 Advanced model
  basic model: 5.2 Basic model
  binding logic variables: 5.2.2 Binding logic variables
  detection
    default: 5.2.1 Enabling exceptions on faults
  exception format: 5.2.3 Exception formats
  fail-silent: 5 Failure Model
  handler (synchronous detection): 5.3.1 Lazy detection with handlers
  partial failure property: 5 Failure Model
  permanent network problem: 5 Failure Model
  temporary network problem: 5 Failure Model
  watcher (asynchronous detection): 5.3.2 Eager detection with watchers

fault detection
  level: 5.2.4 Levels of fault detection

fault handler: 5.3.1 Lazy detection with handlers

fault level: 5.2.4 Levels of fault detection

fault level
  relation with sitedness: 5.2.5 Levels and sitedness

`Fault` module: 1 Introduction

fault state: 5.1 Fault states

fault state
  cell: 5.4.5 Cells and locks
  eager stateless data (records, procedures, functions, classes, functors): 5.4.1 Eager stateless data
  exhaustive list: 5.1.2 Remote problems
  lock: 5.4.5 Cells and locks
  logic variable: 5.4.4 Logic variables
  object: 5.4.6 Objects
  port: 5.4.3 Ports
  sited entities: 5.4.2 Sited entities

fault watcher: 5.3.2 Eager detection with watchers

feeling
  warm, fuzzy: 2.3 Bringing it all together

finite domain variable: 2.1.5 Sited entities

finite set variable: 2.1.5 Sited entities

free record variable: 2.1.5 Sited entities

function: 2.1.4 Stateless entities

functor: 2.1.4 Stateless entities

functor
  computed: 3.1.3 Remote computations and functors

future: 2.1.5 Sited entities, 2.1.3 Single-assignment entities

### G

garbage collection
  distributed: 2.2.2 Distributed memory management
  in a server: 3.2.6 A dynamically-extensible server

geographic distribution: 2 Distribution Model

global name
  external: 3.1 Global naming
  hostname: 3.1 Global naming
  internal: 3.1 Global naming
  ticket: 3.1 Global naming
  URL: 3.1 Global naming

### H

halt
  abnormal: see shutdown, abnormal (2.2.1 Controlled system shutdown)
  normal: see shutdown, normal (2.2.1 Controlled system shutdown)

handler: 5.3.1 Lazy detection with handlers

home site: 2.1.5 Sited entities

hostname
  definition: 3.1 Global naming

### I

Internet: 1 Introduction

### J

Java language: 1 Introduction

Java language
  limitation: 3.2.6 A dynamically-extensible server
  relation to Oz cell: 2.1.2 Other stateful entities

### L

language entity
  module: 2.1.5 Sited entities
  sited: 2.1.5 Sited entities
  unsited: 2.1.5 Sited entities

language semantics: 2 Distribution Model

latency tolerance: 2.1.3 Single-assignment entities

lazy
  class: 2.1.1 Objects
  failure detection: 5.3.1 Lazy detection with handlers

level
  relation with sitedness: 5.2.5 Levels and sitedness

level of fault detection: 5.2.4 Levels of fault detection

lightweight thread: 2.1.1 Objects

list: 2.1.4 Stateless entities

lock
  fault states: 5.4.5 Cells and locks
  thread-reentrant: 2.1.2 Other stateful entities

logic variable: 2.1.3 Single-assignment entities

logic variable
  binding in failure model: 5.2.2 Binding logic variables
  constrained: 2.1.5 Sited entities
  constrained variable: 2.1.5 Sited entities
  fault states: 5.4.4 Logic variables
  finite domain: 2.1.5 Sited entities
  free record: 2.1.5 Sited entities
  read-only (future): 2.1.5 Sited entities, 2.1.3 Single-assignment entities

### M

memory management: 2.2.2 Distributed memory management

mobile agent: see agent (4 Mobile Agents)

mobile object: 2.1.1 Objects

module
  base
    `Cell`: 2.1.5 Sited entities
    definition: 2.1.5 Sited entities
    `Float`: 2.1.5 Sited entities
    `Int`: 2.1.5 Sited entities
    `List`: 2.1.5 Sited entities
    `Lock`: 2.1.5 Sited entities
    `Number`: 2.1.5 Sited entities
    `Port`: 2.1.5 Sited entities
    `Procedure`: 2.1.5 Sited entities
    `Record`: 2.1.5 Sited entities
  definition: 2.1.5 Sited entities
  system
    `Application`: 2.1.5 Sited entities
    `Browser`: 2.1.5 Sited entities
    `Connection`: 1 Introduction
    `Connection`: 2.1.5 Sited entities
    definition: 2.1.5 Sited entities
    `Fault`: 1 Introduction
    `FD`: 2.1.5 Sited entities
    `Module`: 2.1.5 Sited entities
    `Open`: 2.1.5 Sited entities
    `OS`: 2.1.5 Sited entities
    `Pickle`: 1 Introduction
    `Pickle`: 2.1.5 Sited entities
    `Property`: 2.1.5 Sited entities
    `Remote`: 1 Introduction
    `Remote`: 2.1.5 Sited entities
    `Search`: 2.1.5 Sited entities
    `Tk`: 2.1.5 Sited entities

multicast: 2.1.3 Single-assignment entities

multitasking: 2 Distribution Model

### N

name: 2.1.4 Stateless entities

network-transparent: 2 Distribution Model

network failure: 5 Failure Model

number: 2.1.4 Stateless entities

### O

object
  cached: 2.1.1 Objects
  fault states: 5.4.6 Objects
  mobile: 2.1.1 Objects
  object-record: 2.1.4 Stateless entities
  sequential asynchronous stationary: 2.1.1 Objects
  stationary: 2.1.1 Objects, 3.2.3 Making stationary objects

owner site: 2.1.1 Objects, 2.1.5 Sited entities

### P

partial failure property: 5 Failure Model

pickle: 3.1 Global naming

`Pickle` module: 1 Introduction

`Pickle` module
  example: 3.1.2 Persistent data structures by means of pickles

port: 2.1.2 Other stateful entities

port
  fault states: 5.4.3 Ports
  Oz vs. Unix: 2.1.2 Other stateful entities

procedure: 2.1.4 Stateless entities

process: 2 Distribution Model

programming
  component-based: 2.3 Bringing it all together

proxy site: 2.1.1 Objects

### R

record: 2.1.4 Stateless entities

record
  module: 2.1.5 Sited entities
  object-record: 2.1.4 Stateless entities

remote computation
  example: 3.1.3 Remote computations and functors
  of a statement (needing resources): 3.1.3 Remote computations and functors
  of a statement (not needing resources): 3.2.4 A compute server

`Remote` module: 1 Introduction

`Remote` module
  example: 3.1.3 Remote computations and functors

resource: 2.1.5 Sited entities

### S

semantics
  distributed: 2 Distribution Model
  language: 2 Distribution Model

server: 3.2 Servers

server
  compute server: 3.2.4 A compute server
  dynamically-extensible: 3.2.6 A dynamically-extensible server

shutdown
  abnormal: 2.2.1 Controlled system shutdown
  normal: 2.2.1 Controlled system shutdown

site
  definition: 2 Distribution Model
  multitasking: 2 Distribution Model
  owner: 2.1.1 Objects
  proxy: 2.1.1 Objects

sited entity
  array: 2.1.5 Sited entities
  definition: 2.1.5 Sited entities
  dictionary: 2.1.5 Sited entities
  resource: 2.1.5 Sited entities
  space: 2.1.5 Sited entities
  thread: 2.1.5 Sited entities

sitedness
  relation with fault detection: 5.2.5 Levels and sitedness

space
  sited entity: 2.1.5 Sited entities

stateless entity
  pickle: 3.1 Global naming

stationary object
  definition: 2.1.1 Objects
  definition: 3.2.3 Making stationary objects
  example: 3.2.2 The hello server with stationary objects

stream: 2.1.3 Single-assignment entities

string: 2.1.4 Stateless entities

synchronous failure detection: 5.3.1 Lazy detection with handlers

system module: 2.1.5 Sited entities

### T

task: 4 Mobile Agents

thread: 2.1.2 Other stateful entities

thread
  data availability: 2.1.3 Single-assignment entities
  lightweight: 2.1.1 Objects
  reentrant lock: 2.1.2 Other stateful entities
  sited entity: 2.1.5 Sited entities

thread-reentrant lock: 2.1.2 Other stateful entities

ticket
  definition: 3.1 Global naming
  example: 3.1.1 Connecting applications by means of tickets

time-out
  difference with temporary fault: 5.1.1 Temporary faults

### U

Unix port: 2.1.2 Other stateful entities

unsited entity: 2.1.5 Sited entities

URL
  definition: 3.1 Global naming

### V

variable
  `final` in Java: 2.1.3 Single-assignment entities
  logic variable: 2.1.3 Single-assignment entities

### W

watcher: 5.3.2 Eager detection with watchers