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 INCOMPLETE. THIS DOCUMENT WILL EVENTUALLY BE SUPERSEDED BY A COMPLETE DOCUMENT. IN THE MEANTIME, WE RECOMMEND LOOKING AT THE DISTRIBUTED PROGRAMMING (DP) CATEGORY OF THE MOGUL ARCHIVE AND READING CHAPTER 11 OF THE BOOK 'CONCEPTS, TECHNIQUES, AND MODELS OF COMPUTER PROGRAMMING'.

# 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: 4.3 Advanced model

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

array
  sited entity: 2.1.5 Sited entities

asynchronous failure detection: 4.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: 4.2 Basic model

### C

cached object: 2.1.1 Objects

cell
  analogy to C and Java: 2.1.2 Other stateful entities
  fault states: 4.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: 4 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: 4.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: 4.3.2 Eager detection with watchers
  stateless data: 4.4.1 Eager stateless data

example
  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: 4.2.3 Exception formats
  in failure model: 4.2 Basic model

### F

fail-silent assumption: 4 Failure Model

failure
  advanced model: 4.3 Advanced model
  basic model: 4.2 Basic model
  binding logic variables: 4.2.2 Binding logic variables
  detection
    default: 4.2.1 Enabling exceptions on faults
  exception format: 4.2.3 Exception formats
  fail-silent: 4 Failure Model
  handler (synchronous detection): 4.3.1 Lazy detection with handlers
  partial failure property: 4 Failure Model
  permanent network problem: 4 Failure Model
  temporary network problem: 4 Failure Model
  watcher (asynchronous detection): 4.3.2 Eager detection with watchers

fault detection
  level: 4.2.4 Levels of fault detection

fault handler: 4.3.1 Lazy detection with handlers

fault level: 4.2.4 Levels of fault detection

fault level
  relation with sitedness: 4.2.5 Levels and sitedness

`Fault` module: 1 Introduction

fault state: 4.1 Fault states

fault state
  cell: 4.4.5 Cells and locks
  eager stateless data (records, procedures, functions, classes, functors): 4.4.1 Eager stateless data
  exhaustive list: 4.1.2 Remote problems
  lock: 4.4.5 Cells and locks
  logic variable: 4.4.4 Logic variables
  object: 4.4.6 Objects
  port: 4.4.3 Ports
  sited entities: 4.4.2 Sited entities

fault watcher: 4.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.3 Single-assignment entities, 2.1.5 Sited 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: 4.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: 4.3.1 Lazy detection with handlers

level
  relation with sitedness: 4.2.5 Levels and sitedness

level of fault detection: 4.2.4 Levels of fault detection

lightweight thread: 2.1.1 Objects

list: 2.1.4 Stateless entities

lock
  fault states: 4.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: 4.2.2 Binding logic variables
  constrained: 2.1.5 Sited entities
  constrained variable: 2.1.5 Sited entities
  fault states: 4.4.4 Logic variables
  finite domain: 2.1.5 Sited entities
  free record: 2.1.5 Sited entities
  read-only (future): 2.1.3 Single-assignment entities, 2.1.5 Sited entities

### M

memory management: 2.2.2 Distributed memory management

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`: 2.1.5 Sited entities
    `Connection`: 1 Introduction
    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`: 2.1.5 Sited entities
    `Pickle`: 1 Introduction
    `Property`: 2.1.5 Sited entities
    `Remote`: 2.1.5 Sited entities
    `Remote`: 1 Introduction
    `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: 4 Failure Model

number: 2.1.4 Stateless entities

### O

object
  cached: 2.1.1 Objects
  fault states: 4.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: 4 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: 4.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: 4.2.5 Levels and sitedness

space
  sited entity: 2.1.5 Sited entities

stateless entity
  pickle: 3.1 Global naming

stationary object
  definition: 3.2.3 Making stationary objects
  definition: 2.1.1 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: 4.3.1 Lazy detection with handlers

system module: 2.1.5 Sited entities

### T

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: 4.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: 4.3.2 Eager detection with watchers