Exploiting

Actors

as

an

Extensible

Language

Extension

Carlos

H.

C.

Duarte

Department

of

Computing

Imperial

College

Queen

's

Gate

London

United

Kingdom

e-mail

Abstract

This

paper

describes

Deli

a

distributed

extension

of

Lua

with

Actors

Lua

is

an

embeddable

sequential

language

that

can

be

used

locally

in

configuring

and

extending

applications

Even

end

users

can

deal

with

its

features

due

to

intuitive

and

powerful

data

description

mechanisms

Actors

on

the

other

hand

provides

an

appropriate

treatment

to

such

activities

when

distribution

is

taken

into

account

These

languages

not

only

can

be

combined

in

a

non-intrusive

way

but

also

provide

together

an

improved

linguistic

support

for

the

configuration

and

extension

of

open

distributed

systems

The

paper

explains

the

design

and

implementation

of

Deli

and

illustrates

the

use

of

this

language

extension

in

some

challenging

applications

taken

from

the

literature

Introduction

Recently

there

have

been

increasing

efforts

to

provide

means

of

configuring

and

extending

software

systems

-LSB-

-RSB-

These

activities

demand

describing

the

immutable

part

of

the

functionality

provided

by

software

components

Further

the

provision

of

ways

of

configuring

components

into

applications

and

of

customising

or

extending

functionality

is

required

Such

tasks

become

more

complex

when

distributed

applications

from

telecommunications

and

electric

power

supply

are

taken

into

account

since

these

often

require

change

to

happen

on

the

fly

In

addition

it

is

not

always

possible

to

foresee

the

entire

execution

environment

of

such

applications

or

the

kinds

of

customisation

demanded

by

their

end

users

Implementations

that

treat

all

these

characteristics

are

usually

called

open

-LSB-

-RSB-

Actors

has

been

proposed

as

a

model

for

open

distributed

computation

-LSB-

-RSB-

As

an

object-based

paradigm

Actors

supports

components

with

encapsulated

state

that

can

only

be

changed

through

message

processing

As

a

concurrency

paradigm

interaction

between

autonomous

objects

happens

via

asynchronous

point-to-point

message

passing

The

model

also

permits

the

dynamic

reconfiguration

of

object

communities

a

prerequisite

to

support

extensibility

in

distributed

systems

With

these

characteristics

Actors

allows

for

a

decomposition

of

functionality

that

usually

leads

to

better

structuring

and

modularity

Some

implementations

of

Actor

languages

have

already

been

described

in

the

literature

-LSB-

-RSB-

We

feel

that

Actors

as

a

linguistic

means

of

configuring

and

extending

distributed

systems

can

be

used

to

enlarge

the

domain

of

application

of

our

extension

language

framework

We

have

developed

Lua

-LSB-

-RSB-

as

a

procedural

language

supporting

language

extensions

As

an

embeddable

language

-LSB-

-RSB-

its

interpreter

can

be

linked

to

host

applications

to

configure

and

extend

their

compiled

kernels

even

at

run

time

Moreover

associative

arrays

and

few

data

types

support

powerful

and

intuitive

data

description

mechanisms

which

can

be

used

by

end

users

Furthermore

its

implementation

is

portable

as

a

library

of

lines

of

ANSI

C

code

Although

Lua

is

sequential

many

industrial

projects

have

already

been

benefited

by

its

use

In

this

paper

we

describe

Deli

a

distributed

yet

extensible

Lua

implementation

which

has

been

developed

so

as

to

extend

Lua

with

Actors

Taking

advantage

of

similarities

between

these

languages

such

as

reflection

-LSB-

-RSB-

we

are

able

to

produce

an

elegant

language

extension

In

line

with

other

projects

the

Actor

constructs

extend

the

sequential

language

without

changing

its

original

local

semantics

-LSB-

-RSB-

Our

extension

obtained

in

this

way

is

itself

extensible

as

new

message

types

can

be

defined

for

instance

It

is

also

embeddable

and

portable

since

client

and

server

of

the

distributed

interpreter

can

be

linked

to

host

applications

as

a

C

library

written

using

a

standard

networking

toolkit

As

a

result

Deli

can

be

seen

as

a

tool

providing

desirable

support

for

the

configuration

and

extension

of

open

distributed

systems

In

the

following

section

we

provide

a

brief

introduction

to

Lua

Next

the

design

of

Deli

and

the

implementation

of

its

run

time

architecture

are

described

Applications

taken

from

the

literature

are

used

subsequently

to

illustrate

the

usefulness

of

Deli

We

conclude

the

paper

with

related

and

future

work

A

brief

description

of

Lua

Lua

is

an

embeddable

language

Its

interpreter

can

be

linked

to

compiled

C

applications

called

hosts

so

that

Lua

programs

are

able

to

capture

configuration

information

The

run

time

interaction

between

interpreted

and

compiled

parts

happens

via

data

exchange

and

function

invocation

When

a

Lua

program

is

supplied

to

a

function

in

the

application-procedure

interface

of

Lua

it

is

first

compiled

and

then

executed

sequentially

In

the

opposite

direction

the

C

function

is

called

directly

As

long

as

the

information

required

by

the

compiled

part

is

supplied

the

functionality

of

the

Lua

program

can

be

dynamically

modified

to

reconfigure

and

extend

the

whole

application

More

details

about

Lua

and

its

use

in

real

applications

can

be

found

in

-LSB-

-RSB-

Here

we

describe

the

relevant

features

of

the

language

for

the

remainder

of

the

paper

In

Lua

variables

are

not

typed

only

data

values

These

values

belong

to

few

types

provided

by

the

language

including

functions

and

tables

Tables

are

implemented

as

associative

arrays

and

provide

a

powerful

way

of

representing

complex

data

structures

They

permit

the

use

of

names

as

indexes

and

of

distinct

table

constructors

These

make

programs

a

lot

easier

to

understand

For

example

a

terminal

node

of

a

generic

liked

list

can

be

represented

as

List

-LCB-

next

-RCB-

The

usual

dot

notation

can

be

used

to

make

reference

to

the

elements

of

a

table

Unless

otherwise

stated

every

data

definition

is

considered

global

Some

reflective

mechanisms

are

supported

by

Lua

Variables

of

function

type

can

capture

and

substitute

pre-defined

functions

Moreover

functions

to

manipulate

the

global

execution

environment

are

provided

For

instance

it

is

possible

to

determine

all

the

variable

names

and

their

value

in

an

executing

program

using

the

nextvar

function

A

similar

function

called

next

can

be

used

to

transverse

a

table

The

joint

use

of

structured

tables

and

environment

handling

mechanisms

facilitates

automated

program

manipulation

As

a

procedural

language

Lua

entails

a

familiar

programming

style

Most

of

the

control

structures

found

in

high

level

languages

are

present

such

as

conditionals

and

function

definitions

In

particular

compact

programs

can

be

created

using

side

effect

free

multiple

assignments

and

functions

returning

multiple

values

A

typical

function

to

find

an

element

in

a

linked

list

is

provided

in

Figure

function

find

-LRB-

list

id

-RRB-

local

previous

found

current

list

while

current

do

if

current.key

id

then

found

current

current

end

if

not

found

then

previous

current

current

current.next

end

end

return

found

previous

end

Figure

A

function

in

Lua

to

find

an

element

in

a

generic

linked

list

The

design

and

implementation

of

Deli

The

Actors

model

and

its

realisation

in

Lua

The

Actors

model

relies

on

location

transparent

names

on

asynchronous

sends

and

on

dynamic

creation

of

new

objects

to

support

reconfigurable

communities

of

distributed

objects

These

characteristics

are

realised

directly

as

the

following

new

public

functions

in

the

execution

environment

of

Lua

ffl

become

-LRB-

name

-RRB-

ffl

send

-LRB-

name

message

-RRB-

ffl

accept

-LRB-

-RRB-

ffl

new

-LRB-

name

-LSB-

source

-LSB-

bindings

-LSB-

host

-LSB-

server

-RSB-

-RSB-

-RSB-

-RSB-

-RRB-

Although

these

functions

have

an

intuitive

meaning

and

provide

a

simple

interface

through

which

actors

can

be

created

and

can

communicate

it

is

necessary

to

explain

here

the

behaviour

of

actors

to

understand

how

such

functions

could

be

accommodated

properly

into

Lua

Each

actor

has

a

mail

address

a

list

of

acquaintances

and

a

behaviour

definition

Mail

addresses

here

are

called

actor

names

and

are

used

in

message

exchange

At

the

time

of

its

creation

using

new

an

actor

receives

a

name

has

the

source

code

of

its

behaviour

designated

and

becomes

aware

of

some

definitions

provided

by

the

environment

Such

definitions

are

bound

to

the

local

execution

context

of

the

actor

The

process

of

assigning

bindings

to

actor

definitions

resembles

the

notion

of

instantiation

of

parameterised

abstract

data

types

in

that

behaviour

definitions

do

not

need

to

be

completely

specified

to

be

used

as

source

code

Among

such

bindings

there

may

be

names

of

existing

actors

These

names

are

usually

called

acquaintances

Both

behaviour

definitions

and

acquaintances

can

be

sent

as

message

contents

in

our

implementation

It

is

important

to

point

out

that

there

is

not

physical

configuration

information

within

the

local

context

of

each

actor

The

names

used

as

mail

addresses

do

not

depend

on

any

association

of

the

actor

to

a

physical

node

of

the

underlying

execution

environment

On

the

contrary

these

given

names

can

be

customised

by

actors

themselves

using

become

Although

such

construct

is

normally

used

to

define

a

new

behaviour

for

an

actor

here

it

has

this

slightly

these

functions

return

in

case

of

error

or

absence

of

necessary

information

different

meaning

since

actors

may

receive

behaviour

definitions

in

messages

Many

equivalent

variations

on

the

semantics

of

become

appear

described

in

-LSB-

-RSB-

Even

the

definition

at

creation

time

of

the

node

of

an

actor

and

of

the

server

node

of

the

distributed

interpreter

is

carried

out

by

supplying

the

names

of

actors

controlling

such

resources

These

actors

stand

for

relative

location

information

and

are

part

of

the

meta-architecture

of

our

implementation

Each

actor

also

has

a

mail

queue

where

messages

are

stored

upon

receipt

This

stems

from

the

fact

that

a

receiver

may

not

be

ready

to

process

a

message

immediately

Indeed

the

only

guarantee

provided

by

the

Actors

model

is

of

message

delivery

that

messages

always

arrive

within

a

finite

but

unbound

period

of

time

-LRB-

fairness

-RRB-

Not

even

preservation

of

dispatch

ordering

is

guaranteed

The

accept

function

is

used

by

an

actor

when

it

is

willing

to

process

a

possibly

received

message

Only

due

to

message

processing

the

local

definitions

of

an

actor

can

be

changed

The

internal

structure

of

messages

is

not

addressed

directly

by

the

Actors

model

Here

we

selected

a

flexible

way

of

dealing

with

them

in

the

form

of

tables

in

Lua

Messages

are

typed

and

can

carry

annotations

in

this

way

According

to

the

type

of

a

message

its

processing

semantics

may

differ

and

this

may

also

vary

between

different

actors

The

processing

of

an

statement

by

a

conventional

actor

and

by

its

backup

should

have

distinct

meanings

for

instance

By

modifying

the

semantics

of

all

message

types

an

actor

can

protect

itself

against

malicious

elements

that

may

be

able

to

confiscate

strategic

information

of

other

actors

-LSB-

-RSB-

In

Lua

table

types

are

a

syntactic

sugar

for

functions

Consequently

each

message

type

should

be

implemented

as

a

polymorphic

function

that

receives

an

array

records

it

on

stable

storage

and

returns

an

identifier

encoded

together

with

a

type

tag

and

some

annotations

This

results

in

the

actual

information

used

by

send

At

the

receiver

side

the

same

function

is

called

to

decode

such

an

information

and

to

supply

the

proper

semantics

to

the

transmitted

message

Of

course

a

programmer

is

not

obliged

to

deal

with

such

details

and

can

simply

use

the

pre-defined

types

data

source

and

statement

provided

However

the

programmer

is

allowed

to

manipulate

the

meta-level

of

our

architecture

whenever

necessary

The

functions

described

above

augment

Lua

in

the

definition

of

actor

behaviours

A

simple

example

definition

is

provided

below

describing

an

actor

which

sends

itself

a

signal

-LRB-

empty

data

message

-RRB-

and

waits

for

it

exiting

not

send

-LRB-

myname

data

-LCB-

-RCB-

-RRB-

while

not

exiting

do

message

exiting

accept

-LRB-

-RRB-

end

Notice

that

the

semantics

of

data

messages

is

the

provision

of

their

contents

as

the

secondary

result

of

accept

Remembering

that

messages

are

always

delivered

we

can

see

that

the

actor

above

will

always

terminate

even

if

messages

from

other

actors

arrive

while

it

is

waiting

for

the

self-addressed

message

Architectural

description

of

Deli

Our

runtime

architecture

is

clearly

divided

into

two

parts

server

and

client

of

the

distributed

interpreter

Both

can

be

embedded

into

C

programs

Since

we

required

as

a

design

principle

that

the

semantics

of

Lua

should

not

be

changed

each

host

application

needs

to

carry

the

whole

Lua

interpreter

Therefore

the

functionality

of

the

Deli

server

is

restricted

to

the

provision

of

actor

names

and

location

information

Even

though

Deli

follows

the

client-server

paradigm

it

is

important

to

stress

that

actors

supported

as

clients

can

interact

among

themselves

in

diversely

open

manners

LL

LL

LL

oe

oeoe

oe

oe

oe

oe

Embedding

oe

oe

oe

oe

A

D

E

Message

Message

Queue

Actor

Actor

Actor

Service

Service

Service

File

Send

File

Send

Synchronous

local

Asynchronous

local

Synchronous

remote

Types

of

connection

Data

Message

Message

B

C

Figure

Configuration

-LRB-

letters

-RRB-

and

message

exchange

-LRB-

numbers

-RRB-

in

Deli

Figure

illustrates

the

configuration

of

an

actor

community

Each

box

represents

a

process

running

on

a

physical

node

of

the

distributed

network

and

the

arrows

denote

connections

established

for

interaction

purposes

Once

the

Deli

server

is

started

-LRB-

A

-RRB-

actors

can

be

created

-LRB-

B

C

-RRB-

During

this

task

the

actor

service

-LRB-

provided

by

the

server

of

the

distributed

interpreter

-RRB-

is

contacted

to

verify

the

unicity

of

chosen

names

-LRB-

D

-RRB-

When

necessary

a

service

enabling

message

exchange

is

created

on

the

local

physical

node

-LRB-

E

-RRB-

Actor

and

message

services

are

provided

conjointly

at

the

server

node

These

services

are

used

throughout

the

execution

of

the

distributed

system

As

we

have

already

mentioned

there

are

resource

controlling

actors

that

provide

essential

support

for

both

services

above

These

constitute

the

meta-level

of

our

architecture

like

the

communicators

found

in

the

literature

-LSB-

-RSB-

They

support

the

creation

of

actors

virtually

detached

from

any

host

application

and

also

remote

actor

creation

If

requests

of

this

kind

are

addressed

to

the

controlling

actor

of

a

node

it

will

guarantee

that

no

other

behaviour

will

be

shown

by

the

locally

created

actor

apart

from

that

defined

in

its

behaviour

definition

In

addition

the

actor

controlling

the

node

of

the

Deli

server

is

also

responsible

for

sending

in

a

message

the

source

code

of

every

actor

As

an

advantage

all

actors

have

their

source

maintained

in

single

central

location

which

can

be

easily

managed

In

spite

of

this

usual

configuration

files

written

in

Lua

can

still

be

kept

in

local

storage

Message

exchange

gives

rise

to

several

runtime

connections

in

our

architecture

These

are

also

described

by

Figure

First

the

contents

of

a

message

are

saved

in

stable

storage

-LRB-

-RRB-

After

the

location

of

the

receiver

is

looked

up

-LRB-

-RRB-

and

the

corresponding

message

service

is

contacted

-LRB-

-RRB-

The

message

is

transmitted

asynchronously

via

a

data

connection

-LRB-

-RRB-

Then

the

queue

of

the

receiver

is

updated

-LRB-

-RRB-

and

the

message

can

be

detected

-LRB-

-RRB-

and

processed

-LRB-

-RRB-

The

literate

reader

will

correctly

observe

that

the

upper

part

of

the

Figure

is

a

model

of

a

file

transfer

protocol

The

fairness

requirement

is

guaranteed

by

our

local

continue

index

result

while

continue

do

if

result

then

local

id

read

-LRB-

-RRB-

send

-LRB-

service

statement

-LCB-

-LSB-

-LSB-

connect

-LRB-

-RSB-

-RSB-

myname

-LSB-

-LSB-

-RSB-

-RSB-

id

-LSB-

-LSB-

-RRB-

-RSB-

-RSB-

-RCB-

-RRB-

end

local

message

while

not

message

do

message

result

accept

-LRB-

-RRB-

end

if

type

-LRB-

result

-RRB-

table

and

result

-LSB-

-RSB-

then

continue

end

end

Figure

A

generic

client

written

in

Deli

implementation

Such

implementation

takes

advantage

of

capabilities

provided

by

the

language

C

as

process

forking

and

remote

procedure

calls

to

map

directly

Deli

constructs

performing

many

run

time

optimisations

There

is

no

multithread

simulation

since

this

would

make

our

run

time

system

less

propitious

to

be

supported

as

an

embeddable

tool

Our

architecture

differs

from

other

proposals

for

actor

execution

Since

every

computational

object

carries

an

interpreter

there

is

no

need

for

a

distinguished

meta-level

actor

for

this

purpose

like

in

-LSB-

-RSB-

While

this

slightly

increases

the

size

of

applications

there

is

a

reduction

in

the

number

of

messages

exchanged

between

actors

at

the

same

location

Moreover

as

host

programs

are

autonomous

and

must

terminate

spontaneously

it

is

not

necessary

to

perform

distributed

garbage

collection

-LSB-

-RSB-

Yet

Lua

performs

garbage

collection

on

local

memory

On

the

use

of

Deli

Client-server

computing

Although

actors

supported

by

Deli

do

not

need

to

follow

the

client-server

paradigm

they

can

be

configured

to

work

in

this

way

In

Figure

for

example

a

generic

client

is

shown

Notice

that

neither

the

server

nor

the

required

service

are

defined

there

Instead

an

unbound

variable

called

service

represents

the

mail

address

of

the

actor

providing

the

demanded

service

This

information

must

be

provided

by

the

environment

at

creation

time

or

in

a

subsequently

received

message

since

an

actor

can

not

guess

the

mail

address

of

other

actors

The

client

in

the

Figure

is

quite

generic

The

few

assumptions

concerning

the

functionality

of

the

server

are

that

a

function

connect

can

be

supplied

and

that

a

boolean

signal

will

be

sent

to

the

client

denoting

whether

or

not

the

connection

could

be

established

The

client

sends

the

request

for

a

connection

as

a

to

be

executed

at

the

server

and

then

it

waits

until

a

message

containing

the

termination

signal

is

received

Any

other

message

will

be

accepted

and

in

particular

those

containing

definition

of

functionality

that

the

client

is

required

to

provide

to

end

users

or

to

request

from

the

server

during

the

connection

In

this

way

the

program

in

the

Figure

can

be

a

client

of

as

diverse

services

as

those

providing

mail

or

talk

sessions

The

latter

case

is

exemplified

by

the

actor

in

Figure

Lua

double

brackets

inverted

commas

or

quotation

marks

can

be

used

to

delimitate

strings

Double

dots

denote

string

concatenation

regs

function

connect

-LRB-

actor

id

-RRB-

local

found

previous

find

-LRB-

regs

id

-RRB-

if

not

found

then

local

c

-LCB-

next

key

id

info

actor

connected

-RCB-

attempting

-RCB-

-RCB-

if

not

previous

then

regs

c

else

previous.next

c

end

local

message

-LSB-

-LSB-

function

talk

-LRB-

id

-RRB-

local

omsg

imsg

exiting

while

not

exiting

do

local

userin

read

-LRB-

-RRB-

if

strfind

-LRB-

userin

exit

-RRB-

then

omsg

-LSB-

-LSB-

disconnect

-LRB-

-RSB-

-RSB-

myname

-LSB-

-LSB-

-RSB-

-RSB-

id

-LSB-

-LSB-

-RRB-

-RSB-

-RSB-

send

-LRB-

service

statement

-LCB-

omsg

-RCB-

-RRB-

elseif

end

repeat

imsg

exiting

accept

-LRB-

-RRB-

until

-LRB-

exiting

or

not

imsg

-RRB-

end

send

-LRB-

myname

data

-LCB-

-RCB-

-RRB-

end

service

-RSB-

-RSB-

myname

-LSB-

-LSB-

talk

-LRB-

-RSB-

-RSB-

id

-LSB-

-LSB-

-RRB-

-RSB-

-RSB-

send

-LRB-

actor

statement

-LCB-

message

-RCB-

-RRB-

else

send

-LRB-

actor

data

-LCB-

-RCB-

-RRB-

end

end

while

do

accept

-LRB-

-RRB-

end

Figure

A

talk

service

written

in

Deli

The

talk

service

relies

on

identifications

provided

by

end

users

to

establish

conversation

sessions

Such

identifications

are

stored

in

regs

If

the

actor

detects

that

an

attempt

of

using

an

identification

already

taken

has

happened

then

an

invalid

connection

signal

is

issued

Otherwise

the

functionality

of

the

provided

service

is

sent

to

the

client

in

a

message

Notice

that

within

such

message

service

is

set

as

the

name

of

the

talk

service

Upon

processing

this

variable

will

contain

such

a

value

in

the

local

memory

of

the

client

Then

the

user

becomes

able

to

use

the

service

to

contact

a

partner

or

to

break

the

connection

for

which

it

has

to

supply

the

server

with

its

own

name

and

identification

The

distinct

uses

of

myname

in

these

cases

is

a

good

example

of

the

kind

of

meta-programming

supported

by

Deli

Both

client

and

server

in

our

example

appear

embedded

in

host

applications

Given

the

functionality

described

in

Figures

and

it

is

a

fact

that

such

applications

do

not

need

to

provide

any

function

to

enable

that

Deli

programs

to

run

The

client

application

may

give

a

final

shape

to

the

communications

exchanged

among

users

for

instance

That

is

why

moderation

is

recommended

in

the

use

of

embeddable

programs

to

avoid

that

they

become

the

main

part

of

the

application

which

is

sometimes

unsafe

This

however

does

not

invalidate

the

use

of

embeddable

languages

to

support

extension

and

configuration

of

compiled

applications

particularly

when

they

were

not

supposed

to

be

networked

For

example

it

would

be

nice

to

function

-LRB-

-RRB-

send

send

accept

accept

encode

encode

clients

-LCB-

-RCB-

time

timeout

incount

local

init

-LSB-

-LSB-

-RSB-

-RSB-

myname

-LSB-

-LSB-

role

backup

-RSB-

-RSB-

-LSB-

-LSB-

send

-LRB-

myserver

statement

-LCB-

send

-LRB-

myname

source

-LCB-

backup.lua

-RCB-

-RRB-

-RCB-

-RRB-

-RSB-

-RSB-

mybackup

new

-LRB-

myname

backup

mysource

init

-RRB-

end

Figure

Installation

procedure

of

a

backup

protocol

on

a

server

think

on

software

systems

that

if

a

configuration

parameter

is

missing

provide

a

talk

session

with

the

administrator

to

sort

out

the

problem

instead

of

stopping

with

an

error

Software

fault

tolerance

In

the

literature

the

Actors

model

has

been

proposed

as

a

linguistic

framework

for

the

dynamic

composition

of

dependability

protocols

-LSB-

-RSB-

An

specification

language

called

DIL

has

been

developed

in

order

to

enable

the

description

of

such

protocols

-LSB-

-RSB-

We

borrow

from

the

latter

reference

the

description

of

an

Auragen

primary

backup

and

show

that

Deli

allows

for

the

implementation

and

use

of

this

protocol

to

extend

applications

with

fault

tolerant

behaviour

The

Auragen

protocol

is

to

be

used

by

pairs

of

components

that

interact

following

the

client-server

paradigm

The

messages

exchanged

between

such

actors

are

assumed

to

be

received

in

the

order

they

are

sent

An

additional

actor

called

backup

is

created

as

a

replica

of

the

server

and

is

meant

to

substitute

that

object

in

case

of

failures

In

-LSB-

-RSB-

the

protocol

is

described

in

terms

of

generic

methods

triggered

when

input

or

output

operations

are

performed

Using

Deli

this

is

captured

using

reflection

Figure

describes

the

function

called

when

the

implementation

of

the

protocol

is

installed

on

an

actor

playing

the

role

of

server

The

first

three

lines

of

that

function

are

precisely

to

trap

in

global

variables

the

previous

implementation

of

input

-LRB-

accept

-RRB-

and

output

-LRB-

encode

send

-RRB-

operations

of

the

server

and

to

substitute

them

via

reflection

The

new

functions

will

consider

in

addition

that

a

replica

of

each

message

sent

by

the

server

will

be

multicast

to

the

backup

containing

the

name

of

the

server

encoded

as

an

annotation

The

backup

unit

is

dynamically

created

as

a

replica

of

the

server

during

the

installation

procedure

As

a

result

it

is

also

necessary

to

install

the

dependability

protocol

on

such

an

actor

After

requesting

the

source

code

of

the

backup

protocol

from

the

Deli

server

this

object

will

start

working

as

if

the

server

Once

a

message

containing

such

an

information

is

received

and

the

protocol

is

installed

the

backup

will

only

expect

to

receive

regularly

an

state

update

from

the

server

In

Lua

the

process

of

state

capture

also

employs

reflection

in

a

way

illustrated

in

-LSB-

-RSB-

If

the

implementation

above

is

used

together

with

the

talk

server

described

in

Section

for

instance

such

state

information

will

be

that

contained

in

regs

Failures

are

detected

by

clients

in

the

example

above

If

a

message

could

not

be

sent

to

the

server

before

a

deadline

the

client

notifies

the

backup

unit

The

function

in

Figure

is

called

on

the

backup

to

recover

the

error

After

restoring

the

communication

functions

with

their

old

behaviour

and

taking

over

the

server

name

the

backup

sends

itself

all

messages

received

by

the

server

since

the

last

state

update

In

the

end

these

function

-LRB-

-RRB-

accept

if

become

-LRB-

-RRB-

then

local

count

index

value

next

-LRB-

received

index

-RRB-

while

index

do

count

count

if

count

outcount

then

send

-LRB-

myname

received

-LSB-

index

-RSB-

-RRB-

else

removemessage

-LRB-

value

-RRB-

end

index

value

next

-LRB-

received

index

-RRB-

end

end

end

Figure

Backup

recovers

fault

and

becomes

the

server

messages

are

processed

as

if

they

had

been

received

by

the

original

server

The

implementation

of

the

Auragen

backup

described

above

does

not

rely

on

any

characteristic

of

either

server

or

clients

Consequently

any

pair

of

components

configured

in

this

way

can

be

augmented

with

fault

tolerant

behaviour

Due

to

reflection

not

only

the

transparent

use

in

isolation

but

also

the

composition

of

compatible

protocols

for

dependability

becomes

straightforward

in

Deli

Dealing

with

features

Perhaps

the

most

challenging

problems

in

reliable

distributed

computing

appear

when

the

introduction

of

new

features

into

existing

software

is

taken

into

account

Unlike

dependability

protocols

features

add

new

functionality

to

a

system

so

that

it

can

be

perceived

by

end

users

In

the

extension

of

telecommunication

services

for

instance

the

unpredicted

interactions

that

arise

when

distinct

features

are

put

together

became

notorious

-LSB-

-RSB-

Deli

appears

to

be

an

appropriate

tool

to

produce

organised

implementations

for

such

systems

The

architecture

we

have

in

mind

for

this

kind

of

software

looks

like

Figure

Each

black-and-while

box

represents

an

actor

and

its

constituent

parts

embedded

program

in

black

and

host

application

in

white

The

compiled

kernel

of

each

application

should

be

responsible

for

controlling

at

least

the

immutable

parts

of

the

connected

equipment

those

which

have

a

fixed

semantics

and

also

need

to

have

an

optimised

performance

The

interpreted

part

keeps

track

of

the

communication

exchanged

along

the

network

and

of

equipment

state

In

this

way

such

objects

can

be

both

reconfigured

and

extended

For

the

addition

of

new

features

to

the

system

the

dynamic

binding

of

functionality

to

each

actor

turns

out

to

be

central

To

supply

an

automatic

call

back

on

busy

line

for

example

a

terminal

controlling

actor

in

the

role

of

receiver

would

be

augmented

with

a

message

sent

by

an

attempting

partner

to

call

itself

as

soon

as

the

line

is

not

engaged

If

in

addition

the

characteristics

of

each

equipment

are

made

public

as

Lua

data

descriptions

it

is

possible

to

customise

locally

each

terminal

and

to

endow

the

system

with

negotiation

skills

to

deal

with

minimisation

of

previously

detected

undesirable

interactions

and

with

heterogeneity

These

would

provide

the

end

user

with

the

most

proper

and

reliable

connection

If

equipment

A

is

a

telephone

and

B

is

a

videophone

the

right

connection

would

be

one

that

provides

only

voice

communication

An

implementation

of

such

a

simulated

architecture

is

under

way

AA

AA

oe

oe

oe

Network

Terminal

A

Terminal

B

Switch

Figure

Architecture

of

a

featured

telecommunication

network

in

Deli

Discussion

As

noticed

in

-LSB-

-RSB-

instead

of

maintaining

in

parallel

several

distinct

and

perhaps

incompatible

extension

languages

Lua

was

designed

so

as

to

provide

a

single

language

framework

wherein

applications

in

different

domains

could

be

treated

by

proper

language

extensions

Apart

from

Deli

other

extensions

exist

such

as

Tche

for

visual

programming

-LSB-

-RSB-

Lua

is

contrasted

in

-LSB-

-RSB-

to

other

sequential

extension

languages

and

in

-LSB-

-RSB-

to

other

visual

programming

environments

Here

we

examine

other

approaches

to

the

configuration

and

extension

of

distributed

systems

The

Conic

environment

-LSB-

-RSB-

allows

the

configuration

of

applications

based

on

nodes

described

in

a

separate

configuration

language

The

dynamic

reconfiguration

of

an

application

is

possible

since

nodes

are

logical

units

that

are

linked

to

each

other

and

bound

to

physical

nodes

at

any

time

Even

if

this

permits

extensibility

via

addition

or

change

of

components

the

environment

does

not

provide

support

for

the

dynamic

extension

of

pre-existing

components

This

happens

because

there

is

only

a

one-way

communication

in

such

configuration

process

namely

from

the

run

time

architecture

to

the

application

Oberon

-LSB-

-RSB-

on

the

other

hand

as

both

a

language

and

an

operating

system

provides

built-in

support

for

the

extension

of

applications

but

configuration

information

is

intermixed

with

program

code

It

appears

that

our

architecture

can

properly

deal

with

both

activities

in

an

integrated

way

The

support

provided

by

distributed

programming

languages

and

frameworks

offers

great

flexibility

in

configuring

and

extending

applications

In

-LSB-

-RSB-

a

framework

for

extensible

software

is

proposed

based

on

the

separation

of

interfaces

and

implementations

of

components

written

in

C++

This

has

the

inconvenient

of

fixing

the

interface

of

each

component

which

therefore

can

not

provide

more

units

of

functionality

than

those

considered

in

its

design

The

embeddable

language

Tcl

-LSB-

-RSB-

provides

support

for

both

configuration

and

extension

of

applications

but

obliges

distinct

programs

to

share

the

same

X

server

To

overcome

this

problem

Tcl

Distributed

Programming

-LRB-

Tcl-DP

-RRB-

has

been

developed

-LSB-

-RSB-

In

essence

Tcl-DP

is

similar

to

Deli

as

a

language

extension

although

the

constructs

to

deal

with

communication

are

synchronous

and

of

a

quite

low

level

to

be

intuitive

to

end

users

Further

there

is

not

a

meta-level

architecture

in

Tcl-DP

This

leads

to

lacking

means

of

dealing

with

dynamic

and

remote

object

creation

The

Actor

constructs

-LSB-

-RSB-

have

been

shown

the

right

basis

for

an

extension

of

Lua

that

accounts

for

distribution

We

have

already

made

experiments

programming

distributed

applications

in

an

even-based

manner

-LSB-

-RSB-

considering

the

mode

of

interaction

between

components

asynchronous

and

their

location

transparent

It

soon

became

clear

that

in

this

way

applications

could

not

be

augmented

with

fault

tolerant

behaviour

as

illustrated

in

Section

due

to

the

absence

of

mechanisms

to

support

dynamic

object

creation

Nevertheless

we

did

not

found

necessary

the

additional

Actor

features

for

high

level

programming

described

in

-LSB-

-RSB-

since

Lua

is

already

a

complete

general

purpose

language

Deli

is

the

product

of

an

extension

of

Lua

with

Actors

It

is

an

embeddable

distributed

interpreter

that

can

be

used

to

configure

and

extend

safe

compiled

applications

in

a

distributed

execution

environment

Its

implementation

is

portable

as

a

tiny

library

of

lines

of

C

code

written

using

a

standard

networking

toolkit

Even

though

we

have

not

made

exhaustive

performance

experiments

yet

we

believe

that

it

supports

efficient

computation

In

our

first

re-implementation

of

Deli

for

instance

many

local

functions

with

a

medium

interaction

with

Lua

and

originally

written

in

C

were

recoded

in

Lua

itself

Surprisingly

the

overall

performance

of

the

architecture

increased

Further

work

is

in

progress

to

improve

Deli

As

part

of

our

design

we

will

consider

the

possibility

of

providing

actor

information

through

several

replicated

servers

thus

enforcing

reliability

and

enhancing

load

balance

Moreover

although

we

have

not

relied

on

the

existing

object-based

programming

capabilities

of

Lua

in

our

implementation

it

appears

to

be

worthwhile

considering

their

integration

with

those

of

Actors

It

is

important

to

notice

however

that

this

would

imply

changing

the

original

semantics

of

Lua

The

implementation

of

Deli

described

in

here

is

available

in

the

Internet

The

full

version

of

our

example

applications

is

supplied

among

the

distribution

demos

They

can

be

found

at

the

following

address

Acknowledgements

The

work

described

in

this

paper

has

been

supported

by

CNPq

the

Brazilian

Research

Council

This

is

joint

work

with

R.

Ierusalimschy

Deli

was

designed

and

implemented

during

the

visit

of

the

author

to

Hewlett

Packard

Laboratories

Bristol

U.K.

References

-LSB-

-RSB-

G.

Agha

Actors

A

Model

of

Concurrent

Computation

in

Distributed

Systems

MIT

Press

-LSB-

-RSB-

G.

Agha

S.

Frolund

R.

Panwar

and

D.

Sturman

A

linguistic

framework

for

dynamic

composition

of

dependability

protocols

In

C.

E.

Landwehg

B.

Randell

and

L.

Simoncini

editors

Dependable

Computing

for

Critical

Applications

volume

of

Dependable

Computing

and

Fault

Tolerant

Systems

pages

-LCB-

-LSB-

-RSB-

A.

Carregal

and

R.

Ierusalimschy

Tche

A

visual

environment

for

the

Lua

language

In

Proc

IX

Brazilian

Symposium

on

Graphic

Computing

pages

-LCB-

-LSB-

-RSB-

R.

Cerqueira

N.

Rodriguez

and

R.

Ierusalimschy

An

experiment

in

event-driven

distributed

programming

In

Proc

XXI

Latin

American

Conference

on

Informatics

-LRB-

PANEL

-RRB-

pages

-LCB-

July/August

In

Portuguese

-LSB-

-RSB-

D.

Decouchant

Design

of

a

distributed

object

manager

for

system

In

Proc

ObjectOriented

Programming

Systems

Languages

and

Applications

-LRB-

OOPSLA

-RRB-

pages

-LCB-

ACM

Press

-LSB-

-RSB-

N.

D.

Griffeth

and

Y.-J

Lin

Extending

telecommunication

systems

The

feature

interaction

problem

IEEE

Computer

August

-LSB-

-RSB-

C.

Houck

and

G.

Agha

Hal

A

high-level

actor

language

and

its

distributed

implementation

In

Proc

International

Conference

on

Parallel

Processing

-LRB-

ICPP

-RRB-

pages

-LCB-

August

-LSB-

-RSB-

R.

Ierusalimschy

L.

H.

de

Figueiredo

and

W.

C.

Filho

Reference

manual

of

the

programming

language

Lua

Technical

report

MCC

Department

of

Informatics

Pontificial

Catholic

University

of

Rio

de

Janeiro

Brazil

Available

via

ftp

at

ftp.inf.puc-rio

br/pub/docs

techreports

-LSB-

-RSB-

R.

Ierusalimschy

L.

H.

de

Figueiredo

and

W.

C.

Filho

Lua

an

extensible

extension

language

To

appear

in

Software

Practice

and

Experience

-LSB-

-RSB-

P.

Maes

Concepts

and

experiments

in

computational

reflection

In

Proc

Object-Oriented

Programming

Systems

Languages

and

Applications

-LRB-

OOPSLA

-RRB-

pages

-LCB-

ACM

Press

October

-LSB-

-RSB-

J.

Magee

J.

Kramer

and

M.

Sloman

Constructing

distributed

systems

in

Conic

Transactions

on

Software

Engineering

-LRB-

-RRB-

June

-LSB-

-RSB-

H.

Mossennbock

Extensibility

in

the

Oberon

system

Nordic

Journal

of

Computing

-LSB-

-RSB-

J.

K.

Ousterhout

Tcl

An

embeddable

command

language

In

Proc

Winter

USENIX

Conference

USENIX

Association

-LSB-

-RSB-

B.

C.

Smith

and

L.

A.

Rowe

Tcl

distributed

programming

-LRB-

Tcl-DP

-RRB-

Version

Available

via

ftp

at

mm-ftp

June

-LSB-

-RSB-

D.

Struman

and

G.

Agha

A

protocol

description

language

for

customizing

failure

semantics

In

Proc

Symposium

on

Reliable

Distributed

Systems

pages

-LCB-

-LSB-

-RSB-

N.

Venkatasubramanian

and

C.

Talcott

A

meta

architecture

for

distributed

resource

management

In

Proc

Hawaii

International

Conference

on

System

Sciences

pages

-LCB-

IEEE

Computer

Society

Press

January

-LSB-

-RSB-

P.

Wegner

Dimensions

of

object-based

language

design

In

Proc

Object

Oriented

Programming

Systems

Languages

and

Applications

-LRB-

OOPSLA

-RRB-

pages

-LCB-

October

-LSB-

-RSB-

S.

M.

Whether

and

M.

C.

Little

The

design

and

implementation

of

a

framework

for

extensible

software

Broadcast

project

technical

report

Department

of

Computing

Science

University

of

Newcastle

upon

Tyne

O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O B I O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O

actors
distributed systems
embeddable languages
extensibility