Network Objects Abstract

advertisement
Network
Andrew
Bh-rell,
Greg
Nelson,
Digital
Objects
Susan
Systems
Owicki,
and
Research
Abstract
to
Edward
Center
providing
a design
rationale,
ber of implementation
A
network
object
be invoked
design,
over
is an
object
a network.
implementation,
network
objects
novel
for
its
overall
a thorough
rithms
and
system
for
methods
can
from
paper
describes
the
gorithms
early
network
experience
Modula-3.
simplicity.
description
for
whose
This
The
The
of realistic
with
a
system
is
paper
marshaling
previously
algo-
objects.
primary
simplicity.
those
features
that
nient
Introduction
In pure
object-oriented
access
only
the
via
plies
calls
based
on this
ago,
work
It
programming
of the
cated
seems
copying
Persistent?
a menu
button
between
program
or
Eden
more
destiny
are
inter-program
As
objects
typical
Is there
typechecking
This
paper
by
tion
handles
intra-
contributes
a data
a network
imple~ented
granted
direct
title
to
copy
provided
commercial
that
and/or
SIGOPS
@ 1993
point
for
objects
for “Modula-3.
fee
the copies
all or part
these
dis-
It
system
we
code
In addition
of this
are not made
the ACM
and its date
appear,
‘93/12
material
or distributed
copyright
and
is by permission
of the Assoclatlon
To copy otherwise,
or to republish,
specific
ACM
without
advantage,
of the publication
that copying
Machinery.
one
0-89791
to
code
format
worked
design
system,
is
the
argu-
by
mar-
transmitting
other,
and
then
receiving
pro-
is contained
in stub
mod-
the
object
type
Marshaling
byte
not
with-
in the
from
differences
different
this
our
of bytes,
values
generator.
is difficult
in
or
notice
notice
ically
is
for
data
is given
sively
for Computing
requires
a fee
more
in
the
orders
-632 -8/93
to
/0012
. ..$l
.50
217
the
Some
type,
large.
we have
provide
of the
declara-
automatically
two
for
programs
(for
representing
generate
the
Some
code
achieved
general
Existing
following
ways.
that
linked,
but
fully
way.
types
prohibiting
marshaling
C., USA
to
a satisfactory
values.
and the
permission.
/93/N.
marshaling
a stub
strictions
Permission
into
in
done
communicated
program
are generated
by
example,
one
them
The
differ-
and
from
of
inte-
gers).
describing
recently
are
bytes
number
implementation.
programming
a sequence
mi-
we orga-
is described
we have
distributed
into
com-
object
believe
and
them
more
Also,
a high-performance
results
and
a small
values
ules that
be
object
any
with
conve-
we have
we
all
strong
of which
but
to
to
marshaling,
around
performance:
set
valuable
we omitted
we believe
system
efficient
in any
gram.
they
of our
feature
memory).
each
performance,
unmarshaling
be communi-
Is the
an X server?
on
al-
network
(transactions,
shared
interfaces,
compromising
the
features
implementation
out
ment
de-
and
Finally,
simple
our
(powerful
to streams),
paper.
omitted
aspect
are
collection,
this
shaling
the
Should
simple
and
arriving
Should
they
reference?
about
but
the
quite
compatible
of distributed
hazy.
Should
by
Sys-
[1],
keep
object-oriented,
Replicated?
or
to appear
nized
including
believe
garbage
distributed
hard
typechecking?
cussions
have
and
the
the com-
system.
[12],
to be the
transformation
active?
ence
[18],
or stationary?
by
began
ap-
since
to insert
distributed
Argus
to become
be mobile
computing,
observation
including
but
we
or speculative
gration,
cannot
directly,
methodology
place
by the
of Shapiro’s
day.
This
distributed
required
a decade
tails
methods.
to
clients
of an object
are a convenient
munication
every
state
object’s
beautifully
early
programming,
concrete
the
method
tems
plex
a num-
been
unmarshaling
restricted
applications
access
present
have
network.
We
type-checking,
1
and
distinguishing
is its
distributed
that
work,
marshaling
in a heterogeneous
The
we
details
published
for
objects
includes
Wobber
can
cyclic
elaborate
resulting
handle
a lot
a better
marshaled,
for
modules
of data
in
retyp-
almost
any
are exces-
types,
inefficient.
compromise
fail
apply
graph-structured
code
stub
is excessively
Some
be
or
marshaling
systems
but
the
We believe
here
by the use
of a general-purpose
uses
the
the
same
local
mechanism
garbage
compact
data
collector
marshaling
types.
Our
stub
generator
types
(for
efficiency
complicated
code).
We
mance
is within
Since
will
any
arguments
two
cases.
object
the
(as
[5], though
implemented
efficient
of
byte
than
unstructured
pointed
ing
a stream
stream
is copied
real
over
stream
and
and
real
buffer
the
tion.
streams
kernel
data
process
[17],
via
not
to
via
a critical
When
process
in scope
to
to
process
the
a
as the
provided
In contrast,
in DCE,
municated
(and
at
cility
and
a particular
is also
garbage
the
data
in its entirety
Glasser
We
in a scheme
also
analogous
[8], but
provide
in the
at the
point
to the
network-wide
pipe
time
in the
is simpler
such
must
call
i-emote
too).
pipes
and more
Our
call
A
as a first
fined
reference-counting
old type,
218
13] and
a
we will
Arjuna
aim
not
larger
the
pro-
services;
they
dif-
building
blocks,
atomic
that
Our
[7] are like
to support
such
are implemented
network
as
transactions,
objects
and
example,
Common
We
the
by
are more
the
haven’t
A deriva-
into
Request
aimed
highly
the
ob]ect
Broker
at such
modular
tricks,
object
subcontract
are replicated.
incorporated
Object
our
between
underlying
switching
objects
has been
ob]ect
is
Ar-
a flexible
structure
for example
a reference
a method
suite.
of procedures
parameter.
as a subtype
objects
collection.
of
Mosaic,
al-
by build-
transports.
with
a record
of Gifford
transparent.
a version
Caltech
[1 1], but
they
some similar
Modula-3
paired
fa-
in
we can
Definitions
3
be comRPC
example,
than
is an intermediary
although
as the pipes
of the
con-
described
subcontract
For
of the
custom
For
application
structure,
ing
goal
and
fine-grained.
idea
playing
main
Amber
on the
to objects
[16].
lows
different.
and
distributed
whether
of this
our
object
services,
multi-machine
chitecture
original
stream.
In process
B the surrogate
stream
can be used at will,
long after the call that passed it
is finished.
[9].
uson
network
homogeneity
[12,
spaces.
Spring
adaptor
du-
acquires
data
and
and
at
here.)
much
address
can control
a stream
B
same
the
state
aim
has implemented
in that
a distributed
the
more
Argus
are oriented
tive
but
is quite
of reliable
runtime
pipes
difference:
we marshal
B,
attached
is
way,
multiprocessor
objects
The
RPC!,
remote
like
primitive
communica-
to the
limited
call.
design
communicated
with
the
to read
of this
transport-specific
are
stream
calls
mesh
by providing
and
this
objects
his work
stable
our
Leino
network
[6]
improvements
that
of Orca
(Rustan
[17,
generalize
Amber
distributed
system
conven-
system
handles.
and
hope
in
of the
RPC
performance
require
Systems
whole
stream
between
direct
feature
is not
but
RPC
A
the surrogate
is analogous
we pass
surrogate
both
is transferred
assume.
that
ideas
by
of mobility
simultaneously
[2]
reliable
literature
gramming
of the
of the
context
be used
the
network
Data
benefits
objects
We
our
pick-
objects
of the
DCE
Orca
implementations
fer
some
to obtain
can
describe
a surro-
a way
objects
is that
However,
costs.
and
like
fine-grained
commu-
buffers
in
bindings
features
simplification
non-network
some
used
Network
Modula-3
often
program.
the
DCE
st an-
to another,
the
essential
mobile.
transfer
offers
the
by providTo
stream
important
facility
of the
from
the
underlying
RPC
ration
for
data
have
writers).
between
surrogate
copies:
stream
This
of DCE
network
An
by the
and
be
important
are not
to
a multiprocessor.
and
Modula-3’s
in the receiving
the
and
for
2].
sequently
amounts
issue
An
(non-object-oriented)
design
mechanisms.
large
the most
was to provide
Her-
convenient
has
and simplify
avoiding
Part
ing
it is
could
of RPC
one program
stream,
write.
that
but
data
the
stream
the
and
minimizes
(readers
is created
our
this
support
from
objects,
are more
addressed
the
This
like
[10]
contribution
easy
Systems
is satisfactory
a system
transferring
marshaling
types
that
of Emerald
main
JVe also have
are
if
ideas
our
which
tional
on
objects
it
copying,
object
value.
as critics
We have
stream
nicate
gate
data,
out.
special
dard
for
as an
the
and perhaps
systems.
network
les make
pick-
object,
with
streams
RPC
There
object’s
mobile
straightforwardly
Inter-process
our
of
(by
work
closely
to select
of these
to mar-
a network
mobility
for
for
pack-
Alternatively,
example,
been
package
possible
is passed
entire
designed
data
[19],
performance
marshaled
is not
For
built
SOS
while
it’s
later).
of object
purposes,
have
and
perfor-
are objects.
it
the
We
of stub
and the pickle
being
marshaled
a form
many
of the
that
object,
and
code.
type,
object
by copying
provides
mes
of two
Related
by
code
machinery’s
in-line
described
being
marshaled
for
pickling
reference
in-line
the pickle
compactness
by pickling
is a network
reference
(for
or results
If
complicated
calls
2
This
used
efficient
produces
a factor
we marshal
shal
ling)
our
generated
handle
perform
), but
types
believe
mechanically
to
Pickles.
structures
of arbitrarily
simple
age for
called
runtime-type
of the
and possibly
a data
method
that
accept
the
A new
object
type
of an existing
new
to
The
type
have
new
type,
all
ones
the
as well
record
suite
object
in
can
be de-
which
methods
is
itself
case
of the
(inheritance).
The
for
subtype
can
selected
Modula-3
objects
inheritance
cludes
also
network
that
object
be invoked
by other
allocated
ing
the
method
containing
The
chines
marshaling
(overriding).
references,
and
A Modula-3
can be tested
is an object
multiple
the
owner
The
the
network
and
in addition
object.
ferent
clzent
its
client
must
select
client
and owner—and
object
is called
can be running
or in different
address
the
spaces
That
program
the
owner.
ma-
on the same
ma-
chine.
To implement
client
network
program
whose
the
methods
owner,
owner’s
not
object
the reference
points
to a surrogate
perform
remote
the
corresponding
where
know
objects,
actually
is invoked.
whether
the
procedure
The
client
method
type
owner
and
stub
generator
type
are
rather
declaration
includes
analogous
There
are
network
stub
three
type
that
real
that
data
TImpl
that
the
and
the
produced
by the
method
A has
a third
program
of the
object,
directly
from
transfer.
party
they
just
all
When
network
pected
return
type
return
the
code
produced
(if
unpickler
is legal
may
specific),
must
as in
A run-
the
object,
the
ex-
stubs
(if
or by the
data
generic
structure
subtype
check
that
position
after
declared
but
by the
is specific),
at that
what
be performed
example,
is a specific
on
as well
be necessary
test
for
a linked
type
client
because
statically.
network
type
in the
in the
owner
always
is more
types
object
depends
in the
(if,
surrogate
only.
The
code
of
is re-
is unambiguous
surrogate
almost
is a generic
object,
includes
of network
the
in the
surrogate
data
struc-
offers
starts
appropriate
semantics
third-party
the daemon
by the
first
either
an appropriate
can return
server
will
receives
from
a reference
the owner
surrogate
to a file
ideas
more
based
concrete,
on the following
we will
trivial
present
interface
service:
INTERFACE
IMPORT
that
FS ;
sup-
transfers
are
File
;
= NetObj
getChar(
.T
OBJECT
METHODS
) : CHAR;
eof ( ) : BOOLEAN
to the client
subse-
END ;
in the server.
Server
= NetObj
open(name:
to a given
END ;
a third
by the
NetObj
TYPE
server.
or from
is created
these
examples
instead
to
it has started;
be executed
make
ob-
a daemon
the
Examples
some
see.
services,
run
To
third
network
special
but
4
party
systems,
with
it may
have
by the client
a client
RPC
as we shall
and
to
reference
a third
many
systems
object,
the
is called
problematical;
servers
object
reference
transparently,
the
owned
a network
if a node
is needed:
calls
type
fields.
obtained
B. This
arrangement,
an object
quent
application
object
C can call the methods
conventional
a request
RPC
all that
by the
return
of the
be determined
will
the
are available
registered
see, this
versions
ambiguity
rule:
inheritance
of the
new
suris not
of all surrogate
type
rule
is created.
to be a pure
to
as if it had
are
work
this
test
only,
A can pass the
which
owner
most
For example,
of running
a reference
B, then
the
In
accepts
type
surrogate
whose
appropriate
stubs
TSrg
we shall
The
type
the
This
it is can’t
a field
T with
which
been
unpickling
no data
with
type
TImpl
also
one possible
since
surrogate
specific
has single
the
a sub-
the type
owner,
extends
C, after
transfers
Some
most
the declared
and
than
client,
are released.
owner.
have
time
generator
quite
for
client,
the
fields.
by program
party,
methods
generally
owned
port
calls,
This
stubs
mind:
of T with
in the
T is required
in
stub
a
module.
in the
correin the
ture).
If program
jects
RPC
is, it declares
type
TSrg
hand.
stub
keep
the
is a subtype
allocated
type
to
which
by
overrides
client
type
perform
object
of T. The
type;
The
which
by
method
types
T at
surrogate
generator,
of the
the
object
type
the
overrides
written
to a conventional
object
is pointed;
than
be declared
object
narroulest
the
in the
The
will
real
can be more
are consistent
Since
type
of the
TImpl
As
Modula-3
object’s
be selected.
TSrg
when
remote.
surrogate
must
type
available
by the
in
the owner.
the
by TImpl.
have
the
be made
with
commonly
that
or
must
arises
will
need
is local
selection
by
determine
type
interfaces
in the
is shared
determined
solved
of the
that
code
of the surrogate
must
there
(so-called
the
uniquely
in the
to
this
use dif-
methods
surrogate,
situation
ob]ect,
program
invocation
But
rogate
the
counts.
may
it has communicated
to the
owner.
network
calls
method
we
on several
network
a transport
the type
is,
sponding
on different
create
before
Second,
invok-
in the
communications
To
to the pro-
and
underlying
the client
is required
nodes
transports).
can
program
Care
different
in-
to determine
methods
code.
First,
object
whose
programs,
is called
the
client
implementations
supertype
[14].
gram
that
new
the
supported.
dynamically
A
of
are always
is not
a typecode
type
provide
methods
un-
END FS .
219
. T OBJECT
TEXT)
: File
METHODS
(Translation
clares
from
object
extended
type
two
methods,
with
would
these
types
The
FS. File,
of NetObj
fields
Modula-3:
types
. T with
go
are
and
one
between
pure.
interface
a suht ype
FS. Server,
extra
method.
OBJECT
It
and
principal
type
in an interface
T; thus
principal
type
in the
interface.)
In
our
of the
fines
the
design,
type
two
network
other
for
network
object
reading
pointed
at the
taining
client
Here
all
and
types,
to name
the
NetObj
one for
If the
stubs
for
opening
stub
call
nm.
de-
NetObj.LocateHost(nm)
agent
The
process
call
storedin
the agent’s
example
this
by the
server.
Import,
further
IMPORT
NetObj
EXPORTS
, FS,
will
returns
table
Export,
in the
section
named
the
under
be the
a handle
machine
network
the name
Svr
object
and
LocateHost
below
FSI;
exported
are
on bootstrap-
ping.
The
con-
client
types.
work
program
object
running
Maim;
the
The
is,
vast
anonymous;
only
method
server.
it
majority
the
the
object
present
of
those
using
But
is not
calls
The
by name,
machine
that
remote
ndf.eofo.”
s was exported
on the
table.
Time;
makes
. . ), f.getcharo,a
s.open(.
anonymous;
Server
on the
to NetObj.Import
object
is
of an implementation:
MODULE
returns
running
in our
described
files,
generator
a module
both
The
on the
subtypes
above
)
END Client.
. T is the
are
interface
FS, it produces
server
is a sketch
the
them.
interface
but
.getCharo
END
data
METHODS,
objects
Net Obj . T. Thus
IO.PutChar(f
de-
a subAny
is conventional
NetObj
above
of Net Ob j . T
in
any
network
netagent
f is
agent
objects
representing
major
are
services
are named.
TYPE
File
= FS. File
<buff
ers,
For
OBJECT
etc.
it
>
RPC.
OVERRIDES
get Char
eof
be
The
here
is the
implemented
interface
same
with
would
functionality
as
non-object-oriented
define
a file
as an
opaque
type:
: = GetChar;
: = Eof
INTERFACE
END ;
Svr
comparison,
would
= FS. Server
OBJECT
<directory
cache,
etc.
TYPE
T;
>
PROC Open(n:
OVERRIDES
:=
open
FS;
Open
TEXT):
PROC GetChar(f:
T;
T):
CHAR;
END ;
PROC Eof(f:
< Code
for
Get Char,
Eof
, and
Open
T):
BOOL;
>
END FS.
BEGIN
NetObj.Export(NEW(Svr),
< Pause
Aconventional
“FSI”);
indefinitely
>
this
modified
END Server.
RPC
interface
into
client
stub
generator
a client
interface
stub,
would
transform
a server
containing
stub,
explicit
and
a
binding
handles:
The
call
work
NetObj.Export(obj,
object
in a table
trieve
obj;
The
process
the
it
on a machine
the
net-
places
a reference
to
clients
can re-
contained
same
which
exports
nm, whence
istypically
on the
is a client,
running
is,
name
table
running
Here
that
under
it.
nm)
machine
assumes
named
that
inan
as the
the
it
INTERFACE
IMPORT
agent
server.
server
TYPE
FSClient;
FS;
Binding;
is
PROC
server:
Import(hostName:
MODULE
Client
IMPORT
EXPORTS
NetObj,
FS,
Open(b:
GetChar(b:
Main;
IO;
Eof(b:
TEXT):
Binding,
n:
B~nd~ng,
Binding,
f:
Binding;
TEXT):
FS.T;
f:
FS.T):
CHAR;
FS.T):
BOOL;
VAR
s:
FS.Server
END FSClient
:=
NetObj.Import
(“FSI”,
The
NetObj.LocateHost(’’server”)
f
:=
s.open(’’lusridictiwords”)
);
the
;
BEGIN
WHILE
NOT f.eofo
DO
server
client
FSClient,
the
a server
exporting
represents
220
would
would
implement
use
type
a so-called
the
Binding
the
the
interface
handle
and
interface.
represents
FS interface,
conted
FS
FSClient
In
a handle
and
the
type
on an open
on
T
file
in one of these
servers.
putation
using
coded
Here
the
is the
same
conventional
client
close.
com-
First,
of the
version:
old
we define
Client;
IMPORT
FSClient,
IO;
:=
.=
f.
FSClient.
Import
FSClient
.Open(b,
(“server”)
;
Since
);
NOT FSClient.Eof(b,
f)
DO
a file,
IO.PutChar(FSClient.GetChar(b,
f))
and
END
Comparing
the two
object
the
in
the binding
could
bindings
to
do the same
system
when
context
the
example,
opaque
type
the
buffers
and
On
the
other
stantiate
the
make
compromising
Subtyping
that
in the
are to add
For
instantiate
containing
hand,
a client
type
file server
the
These
additional
the
to ship
both
old
space
the
new
the files
we want
have
a new
since
it
has
more
the
type
For
the
third
parties.
5
Implementation
the
agent
methods,
can
agent
process
. Export
a table
needs
of these
it only
be
can be-
and NetObj
subtypes
their
might
its type
containing
. T. The
actual
call
You
. T is useless,
surrogate
example,
. Import
will
automat-
type.
NetObj
the
into
it at all
program
where
program
NetObj
imported
into
this
But
NetObj
one-page
about
for
program,
specific.
of type
object
of type
no methods.
implements
section
we we will
detail
of ob-
no informaobjects,
passes
since
them
to
to
try
guide
to describe
anyone
who
our
system
might
want
system
with
it.
any
to be
We
and
system
level
by
the
object
types
ity
clients,
at
locate
changes
for
the
method
called
the
our
design
threads,
single
with
would
garbage
inheritance.
the
for
following
work
on
collection,
At
the
capabilities
type
types
of the
direct
and
inheritance
of an object
given
the
type,
and
single
the type
an object
code
sizes
221
types
the
a new
our
next
of
system:
to test
to ship
with
we need
underlying
1. object
but
provides
of detail,
of
implemented
Unix,
that
and object
This
version
only
an old
to check
linked
every
stubs
on to another
Modula-3
methods.
that
a surrogate
Assumptions.
safely.
a new
(empty)
to reimplement
require-
network
and
its getChar
with
in-
be finessed
and
case in which
suppose
in which
but
an
of type
type
interface.
can
. T, since
gets
in sufficient
is declared
address
neatly
easy
must
conflicting
It
safety;
problem
supports
type
of the same
clash.
it
space
File,
When
only
test
a network
that
In this
file.
a concrete
(this
for a single
type
common
example,
address
handle
a server
an open
FS. T to
module).
makes
server
least
In our FS example,
representing
type—opens
NewFS.
dealing
type
is
awk-
type
data
new
a surrogate
client
the
client—that
method.
get
has no stubs
think
it doesn’t
a client
must
on type
avoids
more
is both
all
File
type
to invoke
A new
ically
tion
to
space
is called
solution
address
don’t
(which
handle
even
space
NetObj
jects
it.
interface.
opaque
and
a context
the
close
be able
includes
a NewFS.
a new
of
it will
example,
type
is a trivial
to al-
they
for
its
do a runtime
have
that
notions.)
FS. T to a concrete
it difficult
a client
freely,
will
methods.
that
come
but
tend
a file,
a program
passed
context
It is an error
created
other
stub
of both
systems
becomes
a context
client
be aware
address
be-
example
the
opens
As a final
hesignature
(In this
from
version
a server
representing
the
METHODS
of its surrogate.
oft,he
inFS,
to be preserved;
to pass
of the same
the
binding
one that
same
for
Thust
handles:
detect)
the
and a server
the
those
calls.
signatures
must
conventional
problem
net-
of binding
signatures
be communicated
for
but
the
conventional
must
server
both
the
stubs
invoke
for
When
a surrogate
to
must
File
the stub
with
get
and
eof
server
handlef.
notions
be passed.
infer
the
although
ments
and
from
and remote
programmer
in the
network
context
two
differ
must
Moreover,
ward
of the
the
version,
forlocal
allowing
The
the
bindingb,
role
FSClient
the DCE
any
the
subsume
conventional
RPC
client
and
handle.
is different
the
we see that
of the
f plays
procedures
low
versions,
therole
objects
context
will
FS. File,
s plays
DCE
OBJECT
NewFS.
an FS. File.
linked
it
be able
old
END Client.
handle,
for
is, a client
WHILE
of type
of an FS. File,
also a stub
BEGIN
Network
an object
methods
“/usr/diet/words”
cause
= FS .Fi.le
END ;
b
In
as an extension
closeo
VAR
and
type
type:
NewFS. File
work
new
TYPE
MODULE
object
the
to
of the
object;
a code
for
supertype
determine
fields
and
the
at runtime,
its type,
given
at
abilto al-
to find
the
runtime
of an object,
code
the
given
2.
threads
(lightweight
processes);
pointer
protects
collector,
3.
some form
of inter-address
whether
by
reliable
space
streams
communication,
or unreliable
When
data-
4.
ing
the local
surrogate
garbage
collection
a cleanup
collected
together
routine
(or
with
when
explicitly
a hook
an object
for
call
call-
is garbage
5.
a method
from
of
one
communicating
address
space
6. object-oriented
We will
The
and
but
not
across
quired
ing
in
the
Compiler
bit
overwhelming
same
fingerprint
two
from
only
address
into
sending
address
the
dress
space.
for
lookup
will
method
type
filling
The
[22].
and
the
which
contains
dure
blocks
buffered
the
described
which
the
case
of
the
case
buffer
generic
efficiently,
are
coming
from
these
streams
were
of the
0S6
are called
in Chapter
the
the
input
and
and
system
The
Garbage
exported
of
collection.
reference
clients
Our
counting
network
object,
containing
dzrty
set).
As long
time
ret ains
system
garbage
the
surrogates
as this
a pointer
to
includes
there
client
runtime
for
set
a clean
the
the
retained
The
calls
run-
set is non-empty,
object.
Dirty
but
dirty
222
clean
call
but
calls,
it
since
is not
containing
on
danger
owner’s
call
together
long-running
IDs,
are
fails,
the
will
client
to
they
exit
or
clients
all
a network
between
we
owner
as a client
with
can
with
be
parti-
the
might
potential
in
be
for
this
error
of unreliato avoid
Because
detect
this
surrogate
we
error
if
creation,
background.
attempted
schedules
crash.
garbage
a desire
the
have
reasonable
servers.
performed
it
able
consequence
are synchronous
fails,
that
object
The
object
calls
for
sur-
are
that
but
be mis-interpreted
in
we
detecting
be an unavoidable
reuse
(the
objects,
when
communication
the
leaks
it occurs.
the
is some
communication
network
object
dirty
for
prematurely.
to
For
records
the
will
case
never
each
mechanism
prevents
this
bility
collection.
of clients
is transport-specific,
seems
6 of [14].
set
set
collected
wrzters,
the
the
and
its
count
acknowledgement
from
In
the
from
path.
clients
that
procewith
of such
remove
tion
in-
for the
is
message
message
network
the latency
count,
transports
solution
result
the
a simple
facilities
of the
rather
protected
increases
return
mes-
dispatcher
than
indepenfirst
the
on
return
Our
to any
rather
crash.
or going
that
maintaining
crashed
operating
readers
the
the
is real.
rogates
methods
case
object
as a result
on its stack,
increase
waiting
critical
storage
wide
calls
greatly
as an
in this
unmarshaling
object:
This
the
col-
is sent
to the
is sent
danger
its
dirty
A, to avoid
since
for
the
object
drops
the
for the acknowledgment,
collector.
By
of out-
in different
and filling
so that
bytes
they
in
of the
streams
designers
In Modula-3
type
call,
waiting
the
to an ob-
be prematurely
a reference
a network
method
cy-
if the object
precede
to the object
doesn’t
pro-
breaking
that
call from
method
if the
waiting
that
A then
ensure
at C will
an acknowledgment
that
for
table
we must
blocks
cannot
ref-
leak,
C, and
the clean
an argument,
garbage
contain
explicitly
a problem
it
local
cycles
storage
B a reference
retains
But
reference
ad-
second
while
owner’s
program
object
thread
stack
than
is
in
receiving
the
(in
the flushing
knowledge
by the
is not
set.
dis-
if no local
program
to a remote
to require
is converted
differently
to all subtypes,
with
our
are
(in
buffer
representation
of where
vented
buffer
the
invoking
common
To
the
flushing
for
dently
is an object
can be overridden
subtypes.
to.
typecode
does not
then
This
the thread
stream
or
deal
the
program
the
a typecode
in the
sent,
lected.
argument.
fingerprint
typecode
the
sage,
contains
and
B precedes
dirty
runtime
the
object
this
the
an RPC
spaces.
to the object,
that
its
identi-
for
when
the
the
garbage-collect
responsible
by a third
calling
the
avoid
address
from
allowing
not
remain.
is registered
makes
empty,
To
danger
the
the
will
it
to be called
itself
pointer,
garbage
to
procedure
to reclaim
A sends
owned
in an address-
and the fingerprint
being
have
typecodes
another,
span
argument
that
fail.
for
protocol
to
If the receiving
streams)
can
space
the
A buffered
streams)
its
cles that
space
communicate
corresponding
corresponding
a code
are
space
the
types
address
between
To
fingerprint
property
a type
Every
are
call from
appear-
are structurally
denotes
way.
A
the
two
if they
mapping
one
into
with
grammers
reference
is re-
collector
This
spaces.
If program
compiler
type
address
ject
space,
support
Modula-3
compiled.
scheme
compiler
address
object
being
fingerprint.
converted
every
checksum
a fingerprint
tables
The
for
probability)
independent
equivalent
put
problem.
program
Thus
by the
spaces.
(with
cal.
assigned
address
this
This
finally,
items.
a given
is a sixty-four
space
two
within
a jingerprmt
remain.
owner’s
a procedure
to remove
retained
the
references
set becomes
collector
erences
span
unique
to solve
computes
last
typecodes
are
and
streams.
on the
numerical
linker
typecodes
to another;
buffered
elaborate
object
garbage
dirty
the
garbage
from
local
is created,
owner
the
cards
object
no
is collected.
to the
When
freed);
if
a surrogate
with
grams;
the
even
the
again.
surrogate
If
If
a
to
be cleaned
client
(since
to
the
exception
the
dirty
dirty
set
CallFailed.
sequence
that
the owner
ignores
any
sequence.
This
number
for
sequence
failed.
The
successfully
clean
added
the
to a protocol
that
and
raises
the
free—see
That
and
dirty
in
for
the
each
call
client
sequence
numbers
themselves
Connect
any client:
standard
as well
which
for
is out
that
the
whatever
has
d. rd,
have
different
set
collection
paper
algorithm
[4] presents
and
a proof
the details
of its
address
of bytes
(most
Transports.
There
nicating
between
UDP,
and
ences
between
object
ent
subtypes
For
example,
from
these
a Transport.
T.
T is
an
connections
use
irksome
the
object
between
different
part
differences
ning
that
generates
communication
T is
Each
subtype
address
space
expected
ensure
subtype.
number.
tr,
a Location
generates
returns
connections
than
ep, then
for
of a program
( ep)
tr.
ates connections
a client
the
connection
that
generated
their
connections.
sive,
then
taining
limited
(It
nection
the
idle
close
case,
to a particular
has finished
the
to
the
it.
This
If
named
amount
is perfectly
method
allows
creating
connections
If both
transport
address
by
ep.
can
can
cache
is expensive,
are expensive,
cache
of the
If
idle
communicates
with
are
server
network
object
the
begin-
dzspatchzng,
to provide
the
a way
location
address
and
of gener-
c. 10C must
space
at the other
connection,
the
the
the
con-
opposite
connection,
direc-
the
same
address
that
is an
connec-
direction
as
representation
( sp,
i)
where
identifies
Obj ID
objects
the
(a number
with
the
sp
that
same
is
owner
of
dis-
owner):
=
space
all
which
i:
maintains
an ob~ect
table
and
its
its
any
(We
use the
notation
with
domain
type
notation
SpaceID;
for
object
a
a class of con-
network
according
object
223
The
object
->
the
table.
network
concrete
a state
holds
the
. T;
type
type
table,
of a table
B. We will
even
use
though
it
)
object
is present
otherwise
representation
field
obj tbl
network
a surrogate:
it is exported;
is a surrogate,
is exported:
B for
END;
all
NetObj
element
accessing
we say that
includes
space
A ->
as a hash
table,
unezported.
other
A and
If a non-surrogate
the
Obj ID
surrogates
WireRep
is implemented
transport
for
for
array
main-
as is often
connections
i
wire
is a pair
number
VAR objtbl:
is expenIf
The
object
WireRep
contains
pass
location
them.
datagrams
the
by c. 10C have
and
Each
object
to implement
cheni
to the
indicating
is called
to the
different
that
When
of time.
possible
object)
objects
to manage
the
This
is the
Transports
below.
RECORD sp:
gener-
space.
connections
as streams
of datagrams
a pair
into
arrives
by c. 10C have
(a
TYPE
(ep )
it should
transports
calls
representations.
that
new method
a connection,
free
transport
them.
that
using
a
rec-
f romEndpoi.nt
whose
into
are buffered,
listens
c is a server-side
a network
returns
NIL.
is an object
be in
a connec-
either
side.
that
is required
generated
the
are
paragraph)
space
call.
generated
tinguishes
next
in
server
connection”:
If
a SpaceID
a port
ep is an endpoint
the
to the
recognize
A Location
can
in
writers
or as streams
and
connections
Basic
of
“endpoint”
f romEndpoint
from
d will
c.
)
T and
tr.
d are
transport
instances
more
the
a writer
and
from
them
as c; if c is a client-side
tions
conventions
term
instances
(described
doesn’t
the
tion
an
are not
one
to other
endpoints.
then
by
little
us, different
is a Transport.
by
only
use
for
and
a thread
further
of c.
nections
of nam-
Endpoints
Naming
meaning
by different
ognized
a way
name
generated
(Some
sense,
For
identified
If tr
an endpoint.
be meaningful
a weaker
tr
is called
an endpoint
will
same
in
to provide
A transport-specific
to be human-sensible.
that
subtype
the
is required
spaces.
c
are marshaled
can treat
a message
a “back
side
address
Values
is the
of a remote
generate
that
uses TCP.
ing
when
ating
methods.
and
if
c and
connections
to provide
A connection
Differ-
a subtype
two
other
is described
and
spaces.
type
in
c. rd
pairs;
unmarshaled
convenient)
the
runtime
via
in
readers
side of a connection
of
the
to c. wr can be read
spaces.
code
of the
and
required
differ-
main
address
a TGPTransport.
side
TCP,
a reader
and
essentially
name,
)
Ordinarily
Since
(most
of its
efficient).
One
for commu-
example,
many
insulate
runtime
Transport.
manages
(for
and
We
called
protocols
spaces
memory),
them.
an abstraction
A
address
shared
the network
are many
word.
come
writer
reader.
connections
connection-oriented
is written
the marshaling
correctness.
be
vice-versa.
connection’s
of the
not
c contains
paired,
and
idle
is, in spite
sense of the
as a
dirty
makes
need
Connections
tion’s
companion
ion
A connection
be discarded.
The
[3].
c. r.m.
a call
clients
from
of
a sequence
set,
for
carry
that
to store
dirty
removed
calls
from
or dirty
the owner
entry
number
have
are increasing
requires
each
might
failing)
Clean
numbers
can
call
before
that
and,
records
if not,
in the
it is
of a network
whether
the
whether
the
TYPE
State
=
for
{Surrogate,
Exported,
Unexported);
example
into
the
raise
REVEAL
NetObj.T
State
wr:
:=
port
Unexported;
10C:
disp:
server
side,
the
stubs
had
The
actual
when
procedure
it
thread
been
linked
system
forked
c calls
it detects
calls
not
would
of crashing.
a connection
runtime
The
Location;
instead
to service
object
WireRep;
or owner).
an exception
On the
= OBJECT
state:
inappropriate
client
bythetrans-
into
the
network
anincoming
executes
code
RPC
call.
something
like
this:
Dispatcher
END ;
VAR
TYPE
Dispatcher
PROC(C:
(The
sentation
statements
of the
is given
If
obj.state
obj.wr
opaque
ates
connections
obj.disp
to
the
the
obj.disp(c,
and
is
obj)
arguments
ofobj,
and
owner’s
c, calls
marshals
and
a
the
sends
would
space,
The
something
SvrDisp(c:
and
the
like
Remote
invocation.
method
defined
above,
responding
looks
To
method
with
the
asingle
method
surrogate
:=
methID
IF
number
steps
n
in
open.
OVERRIDES
:=
UnmarshalText(c);
FS.File;
BEGIN
a
res
:=
o.open(n);
MarshalNetObj(res,
Thecordeclaration
END
:=
SrgOpen
SrgSvr;
n:
:=
END;
TEXT):
=
The
stubs
the
system:
FS.File;
they
to
register
global
c);
TYPE
sic types.
are
UnmarshalNetObj
(c);
identified
has
with
by
index
procedures
for
a narrow
The
fault
UnmarshalNetObj
for
marshaling
marshaling
next
wire
zero.
and
rest
release
surrogate
the
can
and
find
of
methods
connections,
types
runtime
the
free
of
and
dispatcher
them,
in the
stubs:
StubRec
=
TypeCode;
Dispatcher
END ;
Procedures
on the
to
interface
new
and
their
srgType:
res
in the
obtain
di.sp:
granted
described
the
RECORD
END ;
for
call
where
table
ob,loc.free(c);
take
>
c);
Flush(c.wr);
RETURN
a narrow
they
procedures
c);
MarshalText(n,
:=
have
Locations
BEGIN
MarshalInt(O,
method
END
FS.File
ob.loc.newo;
MarshalNetObj(ob,
non-existent
END
VAR
We
c);
Flush(c.wr)
OBJECT
open
SrgOpen(ob:
res
=
= O THEN
< error,
res:
FS.Server)
ELSE
= FS.Server
c
o:
UnmarshalInt(c);
methID
c.
this:
SrgSvr
by
FS.Server
VAR
method
FS .Server
type
written
for
BEGIN
call
over
usethetype
stub-generated
like
illustrate
invocationwe
typically
this:
Connection;
res:
remote
are
dispatcher
VAR
ob-
dispatcher
result
procedures
generator.
look
then
appropriate
the
stub
gener-
for
The
ob)
dispatcher
the
object.
procedure
unmarshals
from
then
= Exported,
unused.
(c);
END ;
state
obj.loc
address
UnmarshalNetObj
ob.disp(c,
repre-
The
of the
then
dispatcher
obj.loc
concrete
Surrogate,
representation
:=
BEGIN
The
or
Ifobj.state
is
and
the
NetObj.T.
= Surrogate
obj.dispisunused.
ject,
type
Exported
wire
NetObj.T)
value.)
is
obj.state
o:
specifies
a default
is the
If
ob
Connection;
REVEAL
field
=
network
subsection.
by its
code
if the
were
index;
The
the
presented
network
not
objects
method
open
of type
An
the
of stubs,
the
(as
owner
objects
224
Typecode
space
has
stubs
domain
of
then
stubs[tc]
for the surrogate
crash
returned
FS.File
stubs:
address
is in
is
method
would
object
VAR
ba-
type
dispatcher
of type
t c.
–>
StubRec;
forte
stubs.
if and
Iftc
is in
.srgType
forte,
procedure
and
only
the
is the
iftc
domain
typecode
stubs[tc].disp
for
handling
is
callsto
A stub
module
and
dispatcher
also
sets
work
type
(In
easy
for
[tc]
:=
as well
a program
to
The
registers
the
stubs
support
IF
Sp = -1
tc
RETURN
ELSIF
net-
NetObj
. T.
is indexed
by
code,
to
multiple
objtbl[wrep]
RETURN
NewSurrogate(sp,
network
tion
c the
wire
objects.
representation
MarshalNetObj
IF
The
j ( ob j , c ) writes
obj
of the
(obj
: NetObj
c:
Connection)
= NIL
to
call
is (sp,
procedure
the
NewSurrogate(sp,
i),
dress
space
obj:
space
spI
ifspi
contains
typecode
=
c);
MarshalInt(-1,
c)
the
sp2
owner,
and
NewSurrogate(sp:
= Unexported
:=
THEN
10C
NewObjID();
tc
. wr
:=
(SelfID(),
:=
i)]
:=
:=
:=
object
=
corm);
1);
Allocate;
:=
(sp,
:=
objtbl[(sp,
))
i);
Surrogate;
i)]
RETURN
:=
res;
res
END
MarshalInt(obj
.wr.sp,
MarshalInt(obj
.wr.i,
c);
The
c)
call
this
Dispatcher:
Dispatcher
NOT tc
:=
IN
Locate(sp,
generates
END
to
=
domai.n(stubs)
is impossible.
an address
calling
Supertype(tc)
IDisi
allocates
unused
object
ID,
of
caller,
and
that
NewObjID()
SelfID
() returns
that
Supertype(tc)
supertype
corresponding
of the
type
representation
from
corresponding
the
network
returns
whose
connection
object
an
code
cast,
the
its
is tc.
each
own
spaces
address
(c:
: NetObj.T
:=
and
it knows
type
The
type
call
code
The
call
for
the
code
for
the
space
object
to which
Allocate
tc.
resorting
maintains
the
sp.
the
to broad-
information
endpoints
of the
about
address
about:
(c)reads
c and
re-
VAR tr:
reference:
the
SEQITransport.T];
sequence
of transports
order
available
in
this
space,
in
of desirability.
Connection)
=
VAR names:
VAR
SP := UnmarshalInt(
i := UnmarshalInt(c);
returns
without
space
transports
c be a connection
is the address
with
that
CallFailedif
about
surrogate
Locate
decreasing
UnmarshalNetObj
that
connections.
an object
a Location
or raises
knows
i)
andowner
To implement
the SpaceID
returns
callUnmarshalNetObj
that
space’s
10C generates
that
returns
sp,
It requires
space
address
whose
stubs[tc].disp
we assume
c)
connectionsto
ChooseTypeCode(loc,
DO
END ;
wrep
Locate(sp,
res.wr
END
the
the
the
NetObj.T
ChooseTypeCode(loc,
res.state
END ;
the
itin
BEGIN
obj;
Exported;
Dispatcher(TYPECODE(obj
for
:=
:=
res
i);
sp,
obj.disp
the
or
sp2.)
VAR
obj.type
above
ifspi=sp2
by
SpaceID,
Connection):
RETURN
ad-
an address
determines
enters
IF
objtbl[(obj.wr.
a wire
locates
surrogate,
toan
owned
ObjID,
obj
turns
space
surrogate
c:
tc
a surro-
representation
say that
ELSE
i
The
(We
i:
WHILE
creates
wire
table:
THEN
MarshalInt(-1,
obj.state
c)
cisaconnection
sp.
an address
some
of the
BEGIN
code
knows
c)
whose
that
knows
NewSurrogate
. T,
VAR
In the
that
i,
object
assuming
connec-
reference
i,
END ;
protocol
The
MarshalNetOb
THEN
END
make
gate for the network
call
# NIL
objtbl[wrep]
ELSE
)
Marshaling
THEN
NIL
RETURN
a surro-
type
table
as type
srgTC
type
disp).
for
the
type
object
(srgTC,
dispatcher
system
version
for
a surrogate
a network
automatically
null
actual
protocol
versions.
declares
runtime
and
the
stub
it
stubs
object
gate
that
disp
c);
names[sp]
is the
recognized
by sp’s
(Wewrite
(sp,i);
BEGIN
elements
225
SpaceID
SEQ[T]
of type
->
SEQIEndpoint]
sequence
of endpoints
to denote
T.)
for
Sp
transports.
the
type
ofsequences
of
The
with
tr
sequence
one entry
gram,
each
is constant
fast
path
in names;
this
by
to the
tr
time
to
an object
sp
in
the
obtains
available
call
to
the
reference
that
use the notation
is nested
c. Here
is the
which
pro-
for
will
which
first
it
implementation
stub.
registered
This
client
requires
time,
the
a call
depends
client
to
owner
the
set for
of the
a regisat sur-
with
the
call
object
object’s
in
super-
have
we combine
on
and
narrowest
owner
collector:
dirty
supertypes
type
in the
and
which
garbage
sp to the
the
surrogate
determine
both
by the
the
call
Dirty
( i,
number
i and
type
which
for
are registered.
for
Dirty
(i:
Obj ID,
sp:
SpaceID)
: SEQ [Fingerprint]
=
VAR
the
tc
of an RPC
routine;
we
an
the
the
been
must
creation
stubs
) ) to indicate
over
it
which
adds
Locate
received
an unmarshaling
) performed
sp)
rule,
have
an RPC
example
P (args
for
returns
a reference
case,
owner:
type
required
if
be no entry
this
the
tered
transport.
sp by making
from
RPC (c,
found;
to this
stubs
rogate
if one is
been
receives
In
sp
sp recog-
space;
has
there
for
are presented
in this
is our
inside
to P ( args
names
table.
This
will
call
sp,
space
sp.
for
space
sequence
call
RPC
by
address
into
the
of names
is no common
name
name
into
an entry
transport
an address
owned
the
list
there
space’s
According
time,
finds
These
a common
first
linked
Locate
is the
is recognized,
The
at initialization
thereafter.
transports.
transports
in
transport
through
entry
sp’s
recognized,
none
for
and
The
nized
is filled
:=
TYPE(objtbl
res:
[( Self
ID(),
SEQ [Fingerprint]
:=
i)]);
empty;
BEGIN
connection
< Add
sp
WHILE
NOT t c IN
of Locate:
tc
:=
to
i’s
dirty
set
domain
(stubs
>;
) DO
Supertype(tc)
END ;
Locate
(sp:SpaceID,
c:
IF
LOOP
Connection)
NOT sp
IN
: Location
domain
(names
=
res.
) THEN
addhi(TCToFP(tc)
IF
tc
VAR
) ;
= TYPECODE(NetObj.
T)
THEN
EXIT
backc
:=
c.loc.
[sp]
:=
newo;
END ;
BEGIN
:=
tc
names
RPC(backc,
c.loc.
GetNames(sp)
free
Supertype(tc)
END ;
) ;
RETURN
(backc)
res
END
END
ChooseTypeCode
END ;
: = names
VAR nm
FOR
i
:=
VAR fp:
; BEGIN
O TO LAST(tr)
10C
VAR
DO
: = O TO LAST(nm)
FOR j
VAR
[spl
.fromEndpoint
(nm[j]
10C
# NIL
RETURN
10 C
the
CallFai.led
= RETURN
will
The
outside
transport
point
memory
happen
which
loop
preference.
only
shared
Self
ID()));
O TO LAST(fp)
DO
IN
domain
(stubs)
RETURN
(FPToTC(fp[j]
) ) . srgType
END
In the
client’s
:=
stubs
names
vert
[sp]
and
the
(i,
END
GetNames(sp)
transport
Dirty
END
END
to
BEGIN
FPToTC(fp[j])
THEN
END
i
RPC(C,
BEGIN
newo;
free(c)
IF
END ;
the
:=
FOR j
THEN
END
Placing
=
BEGIN
END
RAISE
i)
END
) ;
BEGIN
IF
loc.
loc.
:=
tr[i]
C :=
fp
DO
(loc,
SEQ[Fingerprint];
the
transport
only
remaining
must
implement
loop
preference
Thechoice
of transport
whichever
j
gives
over
the
isarbltrary:
preference
loop
the
that
element
This
and
a
program,
locks.
rule.
ample,
226
TCTOFP and
typecodes
extends
our
network
the
description
objects.
Forexample,
we have
must
Some
that
and
FPToTC
con-
fingerprints
sequence
s with
x.
concludes
ber of details.
this
program
surrogate
s. addhi(x)
new
marshaling
is Choos eTypeCode,
narrowest
equivalent
usually
is outside.
procedure
we assume
owner’s
is to obtain
if one is available,
the
priority
above
between
ignored
protect
the
care isrequired
it is not
attractive
of the algorithms
for
Wehaveomittedanumtoavoid
cluttering
synchronization;
various
toavoid
to hold
global
tables
deadlock;
a lock
up the
the
all
real
with
forexthe
way
through
a call
entry
in
to NewSurrogat
the
procedure,
surrogate
and
the end of the
been
fully
under
sequence>
have
for
relaying
thread
that
also
alerts
begins
lock
from
method
newt
con-
vsrg
to newt
call).
But
for
the
owner
claim
with
again
waiting
for
a
rogate
reader
it
to
code
a source
for
(just
a surrogate
like
a result,
an ordinary
giving
On the server
side,
by a transport-supplied
client
to the
the
voucher
thread,
incoming
call.
owner.
the server
side of the connection
Marshaling
patcher
and
streams.
writers
reader
is very
rd.
The
rd in hand.
gate
is to
and
receiver,
the sender
over
the
overhead
In
the
first
nection
ID,
which
sends
c as the wire
that
copies
process,
ing
data
from
an incoming
nection
in a table
marshaling
that
difficulty
calls
fail
The
design
with
have
network
To
chooses
the
ID
a
The
servic-
simple,
using
claim
table
them,
but
of
voucher
that
returns
are
and
otherwise
: = rd,
receiving
a data
and calls
process
finds
it
vsrg.
claim
the
field
ect
the
voucher
resulting
dis-
thread
rd
transport
and
to
thread,
the
the original
but
dirty
for
the
but
the
in the
allwire
perhaps
contrast
(to
the
voucher
to avoid
a bit
By
not
the
first
communicate
receiver),
be piggybacked
it costs
call
to launch
vouchers,
relies
machin-
with
simple,
for
pro-
and
marshaling
message
the
and
with
second
(2)
this
the
the
message
first
for
important
if experience
it is not
design,
given
are intended
how
buffer
leads
of
data
us to get
(1)
it
cross-address
extra
whether
the
since
that
bulk
the
obvious
and
pickle
transfer,
messages
rid
of the
to choose
it
are;
extra
the first
second.
often
marshaling.
package
this
arises
of an abstract
the
type
appropriate
way
a reader.
package
permits
clients
for
pickling
data
When
object
it
a
the
(and
types.
type
type’s
specify
weren’t
ward
copying.
yond
the
and
The
scope
Programmers
calls
rule,
reader.
and
flexibility
227
the
values
the
more
in the
details
of the
one
all
a mutex
with
for
or stream)
this,
custom
such
of this
value
pickle
particular
of an abstract
a custom
transferable
the
the
procedures
marshaling)
implementor
types.
represen-
to communicate
present
appreciate
than
(e.g.
behavior
for
concrete
to specify
would
sets
the
To deal
therefore
Typically
default
satisfactory
because
spaces.
dispatch-
The
isn’t
address
reader,
vsrg,
vsrg.
dedicating
to the
between
ordinary
(v).
from
voucher
change.
called
allocates
of type
a network
reader
returns
process
. rd
MarshalObj
unmarshals
is a surrogate
( ) and
sending
one
or to optimize
tation
data
rd,
v with
v.rd
(3)
Most
objects.
marshal
clear
Pickling
when
object
surrogates
by
to implement,
streams
isn’t
a network
only
the sender
is not
of the
times.
employs
The
forked
and
trip
the
implemented
design
details
because
in the
are
in the
the
example
rd.
of the
protocol
to identify
space
and
un-
rdsrg
but
dispatcher
and the voucher
be easy enough
call
to stomach
messages,
the con-
connection
is called
as for an ordinary
on the
message
It would
is trivial
receiving
thread
dispatcher
vsrg.
object
the
another
perhaps
We
over
a thread
thread
as
data.
(distinguishing
reader
connections
a method
for
could
and places
for
nonstandard
registered
ID
up the
seems
of freeing
con-
In the
as key.
complicated,
con-
forks
The
surrogate
at inopportune
a Voucher
ID
looks
the
This
second
Vouchers
ers
reader
rather
and
the
message)
the
a back
relies
(a round
dirty
uses
c is the
sends
newt.
reads
call
allocates
connection.
became
the
the
and
into
the
design
marshaled,
newt,
are involved.
with
) For
newt
buffers
connection
makes
representation
so easy
ID from
creates
of rd,
newt
it from
table
over
rd
threads
connection
stream.
where
is being
dispatcher).
but-useless
per-buffer
it reads
network
then
whenever
the
the surrogate
This
be avoided
the
sur-
newt.
design
messages
voucher;
them
designs.
sender
ID
and sends
role
ordinary
reader.
three
reader
required
ery to connect
in
and
the
connection
newt
plays
over
second
the
on the
so that
a thread
could
two
newo,
rd
the
sender
of rdsrg
space
representation
two
the
the
the
receiver
increase
we explored
: = c .loc.
over
unique
would
design,
newt
thread
that
strat-
fork
rd
buffer
cross-address
strategy
nection
from
the
this
the
and
(The
to fill
but
of the
detailed
in
buffers
such
general
between
rdsrg
reads
an RPC
is empty,
The
The
returns
to the
the original
design:
them
vide
method
arguments
just
arguments
procedure
sends
a surro-
The
containing
in the first
a
reader
create
process,
of rd.
connection,
connection.
by doing
it
the
that
receiving
a connection
allocate
from
of readers
consider
has a concrete
code must
contents
allocate
reads
process
in the
the
marshaling
to be definite,
marshaling
rdsrg
delivers
egy
it
sending
The
reader
rdsrg
The
similar;
surrogate
of data.
client,
vsrg
marshals
and
it the
vsrg
) and
of sending
it allocates
rdsrg,
voucher
10C. new(
instead
to the
the
of
: = vsrg.
then,
has
encounters
waits
omitted
in the
The
of the
the surrogate
simply
raised
an
is under
table
when
A thread
We
exceptions
beginning
the
construction
be constructed.
relaying
we make
a surrogate
reacquire
constructed.
surrogate
at the
that
do not
until
and
table
recording
struction,
e, Instead,
procedure
if
by straightfor-
mechanism
are be-
paper.
the
has
case of ordinary
narrowest
asked
for
objects.
surrogate
comparable
(If
an at-
tempt
is made
program
ject,
to unpiclde
that
does
an exception
ity
seems
A, and
how
the
ther
or
by
valid,
the
den
some
original
of the
to accommodate
resentation
rule
type
AB may
in the
meaning
The
narrowest
sound
only
when
objects
tions
can export
table
managed
clients
can get them
writer
overrid-
choose
his
in order
it into
of the
be
rep-
at
surrogate
ted
that
network
by reference
applies
situations
work
it
objects
by
their
stream
guished
then
copying;
above;
the
otherwise
In other
pickle
when
pickling
if the
stream
port
procedure
the
is of the
data
the
procedures
method
have
To
The
6
calls
on other
as yet
do
no
this
object:
type,
we adopt
gram
into
system
by the
described
4000
as for
ob]eci
network
the
special
dirty,
with
it under
ID
that
obtain
which
mentally,
ID
to forge
runtime.
The
At
every
linked
operations
special
a special
pro-
time
object
a Location
network
the only
transport’s
forge
valid
objects
way
an original
also
and
by
other
have
been
linked.
to obtain
fromEndpoint
a Location
method—that
on the
appeared
Export
node
for
nd,
use the
the
and
The
and
table
stub
object
Some
implemented
network
in
generator
3000
the pickle
package
agent
100 lines.
performance
in a year
object
runtime
lines,
the
750 lines,
All
the
numbers
code
is
TCP
and
is in
are:
Null
call
Ten
integer
3310
usecs/call
call
3435
usecs/call
Same
object
argument
3895
usecs/call
Same
object
return
4290
usecs/call
9148
usecs/call
10253
usecs/call
New
object
argument
Nev
object
return
Reader
test
2824
KBytes/sec
Writer
test
2830
KBytes/sec
numbers
equipped
marks)
were
with
running
taken
MIPS
Ultrix,
using
R3000
Digital
equipped
with
1600 usecs for a C program
to echo a TCP
user
The
network
for
exports
space
the
null
context
is
ing
program
the
is to call
and
the
228
to the
called.
The
incremental
this
space.
configuration,
is spent
in two
(which
together
null
unmarshaling
incremental
12 usecs.
is, the
call
switches
is being
Funda-
to user
On
call)
plus
the
object
it
packet
takes
from
remaining
1710
usecs
Modula-3
user
space
The
ten
cost
of an integer
first
“same
cost
(25 Spec-
a 100 megabit
has
[20].
worksta-
processors
AN 1 network
surrogate
some
special
a surrogate
and
of named
the
for
and
designed
1500 lines,
of latency
to
the
which
forges
agent
Import
network
tions
O.
remains
for
(rid),
simply
authors.
lines,
These
of the
clean
object
a table
a
provided
required
in
and
owns
methods
(reporting
initialization
ID
type,
implementing
allocates
object
are
The
the
runtime
methods
a surrogate
convention:
objects
implement
etc.).
the
We
a surrogate
and
O, of a known
object
runtime
ID,
of
surrogate.
of
wire
to listen
so far
objects.
original
ingredients
network
objects.
object
an
following
object
put
network
some
the
GetNames,
and
into
the
it possible
object
network
forge
surrogates
of the
was
four
transport
an
as a result
network
an object
which
spectal
to
need
make
by
All
to
a Location,
To
get
way
we
type.
the
surrogate
only
his program
Numbers
Our
distin-
described
objects
he can
port,
object.
interface,
fields,
mechanisms
network
well-known
Lo cat eHost
earlier,
object
Modula-3.
surrogate
and
If the appliagent,
of
the
Bootstrapping.
table.
in the
and their
need,
object.
produce
them
object,
on the
forge
applica-
port.
example
special
by putting
configure
to
script,
are needed:
special
a
it is running.
start-up
to rely
transport
and
its
the same
not
thus
can be forged
writing
of the type
transport
own
the
that
unpickling
algorithms
copy
net-
this
and
test
in the
marshaling
they
to
example,
a runtime
declared
use
only.
able
from
prefers
at that
The
transmit-
To accommodate
for
argument;
they
be
for
file.
perform
subtype
ordinary
to
registered
objects
are always
to marshaling
to a disk
procedures
network
objects
is important
a checkpoint
the
that
objects
are transmitted
objects
his application,
in our
rule
their
from
by the agent’s
appliobject
port;
object
ports
the
a network
on which
agent
well-known
ei-
by reference.
The
the
an address
step
TCP
special
of the node
runs
no other
know
this
We provide
agent’s
cation
have
a change
node
must
For
at a well-known
the
the 1P name
then
surrogate
is listening.
choices.
new
will
example
the
listens
for
If every
there
operations
of A; for
A fields.
the
that
given
by
state,
of A. But
these
methods
of the
seems
methods
that
has two
agent
or by somecase,
cation
surrogate
a program
of the
something
than
AB, either
In either
calling
to imagine
type
forging
where
from
(rather
AB into
A part
program
case liberal-
methods,
on the
is no reason
since
and
a
ob-
AB is derived
the
in reserve.
operate
directly
not
into
of the
a copy
of type
fields
them
may
type
A but
B data
holding
program
type
type
in this
to send
of an object
the
object
the
But
Suppose
we contrive
knows
ignoring
an ordinary
contain
is raised.)
unsound.
that
a reference)
that
not
integer
add
the
cost
whose
call
object”
of a network
some
of marshalnull
test
argument
test
object
235 usecs
method
shows
that
is about
shows
that
parameter
that
does
second
not
stead
of
usecs.
an
a network
which
higher.
The
dirty
calls
last
two
T(3P
stream
KBytes/see;
work
user
streams.
streams
100
built
that
tive
over
them
the
not
Modula-3
confident
the
fast
be applied
(at
nor
much
reasons
an attrac-
also
and
reflect
the fact
the
that
in alpha
that
costs
of
the native
test. ) We are
have
in research
our
made
laboratories)
Our
system
projects
nificant
the
working
are building
completed
for
a few
projects
are
the
checked
in and
a directory
tory
is replicated
for
9000
our
using
the local
miles
is checked
new
other
The
of files
previous
version
RPC.
is distinctly
First,
interfaces.
siphon
repository
versions
a new
repository,
in
a few
data
compression
the
wide
destination
to
remote
its
the
not
done
replica
so yet,
ability
di-
the
number
We
to
plug
to use
sent
do this
T that
decompresses
it can
like
of bytes
plan
by
automat-
data.
out
we ex-
to easily
We would
be moved
where
im-
partner,
source
of Transport.
and
were
object
was eliminated.
network.
code will
it on
interface
the
from
to reduce
a library
a push
of the
a subtype
into
of the
the system.
area
compresses
each
transfers
we have
into
to a part-
Thus
the
of the application
easily
be reused.
Conclusions
system
bindings,
there
many
use
and
is a clean
implement,
be-
of the
de-
allows
interface
proper,
of the
to
many
subtyping
the runtime
and
to
eliminated
evolution,
The
the
and
fussy
for
interface
between
and
restrictions
result
ious
of our
purposes.
the trans-
pickles
about
our
does not
have
what
is already
available
with
RPC
measurements
prevent
in the RPC
research
system
It is competitive
of commercially
we believe
design
are
performance
many
mance
file sys-
will
about
have
ports
for
are too
hours.
is simple
objects
elimcan
be
marshaled.
of a package
package
although
network
pull
source
cache
interface
transports
to
All
of interest
siphon
files
new
inated
reposi-
that
version
a single
as
visible
distributed
the
within
be
simultaneously.
repositories
the
push
advantage
cause
a new version
repositories
interface
of the
would
and
pull
one
which
to
siphon
the
over
it
an interwould
[21],
[17],
that,
of improvements
levels
perfor-
systems
indicate
the sort
performance
groups
adequate
the
reported
our
that
by var-
[23].
copy
Again,
9
become
Acknowledgements
simultaneously.
conventional
jects
two
When
at one
visible
by the same
the
apart).
in
it to the
visible
to link
to
area network.
become
is used
case,
When
uses a net-
siphon
area
site,
a pull
to take
Our
sigand
The
in, it is immediately
the
buffers
Sev-
implemented
system.
availability.
to be served
(in
file
large
eliminated
from
new
pect
compression
the most
packages
a repository
is checked
siphon
apart
tem
all
from
in the new version
The
pulls
Thus
ically
packagetool
soft,ware
a distributed
all programmers
far
allows
out
in
of a package
files
then
rectly.
tails
packagetool
both
which
RPC
siphon.
The
push
The
could
months.
a linked
Also,
siphon
of the
the wide
then
the
and
on the system;
new
transfers
other
plementing
8
has been
copying
the
version
it over
Thus
providing
system.
files;
obtains
in one call.
threads
at the
and
Third,
to find
Experience
eral
disk
paper.)
performance,
to our
our
siphon
of a package
push
required.
of the
for
version
replicas.
net-
large
previous
siphon
its
of the
for
connections
was
and
ner
new
elements
third-party
The
replicas,
3400
cost
in using
techniques
effectively
is about
to send
a new
of a
the
used multiple
Second,
of net-
calls;
stream.
face.
are much
thoughput
network,
is still
least
they
thoughput
of this
(They
checks
determine
the
the
contains
and results
required
optimize
compiler
that
systems
tests
switch
project
this.
runtime
work
the
succeed
scope
to
reflect,
Modula-3
the
TC,P
by
of our
numbers
7
raw
purpose
of data
message
is largely
thread
supplied
design,
code
difference
are outside
The
give
old siphon
is 880
acknowledgement
a C program
(Neither
megabits
cost
arguments
comparison,
space
of directory
to be made;
using
the
Modula-3
RPC
structure
object”
object
lines
For
repeated
in-
result
“new
have
the
value
the
the
of network
usecs;
incremental
reflects
object.
streams.
raw
cost
when
The
work
the
be sent
is 585
is a return
call
object
argument,
the overhead
for
a dirty
if the
extra
must
to
that
This
that
lead
shows
simpler,
pickles
For
of the siphon
The
and
for
network
example,
enumerated
new
the
version
was coded
with
several
elements
with
We
simplified
a package,
of the
the
directory
are grateful
ob-
Ellis,
Mark
Manasse,
the
sions;
and
old
ees for
reasons.
streams
to fetch
network
by
229
David
to
Bob
Evers,
and
to Paul
helpful
Ayers,
Rivka
Garret
Leach,
comments
Andrew
Ladin,
Swart
Black,
Butler
for
helpful
Sharon
Perl,
and
on the
paper.
John
Lampson,
discusthe
refer-
References
[1]
[17]
T.
[3]
Andrew
D. Birrell
Remote
puter
and Bruce
Procedure
Call.
2(l),
S~stems
Jay
Nelson.
ACM
February
pp.
on
[20]
Com-
Shapiro,
Andrew
icki,
for
[5]
Birrell,
and
Network
Andrew
Yeshayahu
Systems
Jeffrey
S. Chase,
Franz
Henry
hf.
and
parallel
cessors.
Proc.
atzng
1(1),
January
1990.
Amador,
oriented
operating
Michael
D.
Hal
on
1989,
D.
with
April
1990.
Nlichael
[22]
of
Amber
multipro-
Symposium
on
J.
E.
Graeme
D.
N.
Dixon,
Barrington.
system
for
reliable
Computing
Tyne,
[8]
Santosh
K.
NIanaging
distribed
and
[23]
Shrivastava
and
objects
computing.
Laboratory,
Graham
in
A.
of
ber
Arjuna:
Technical
University
a
report,
Newcastle
upon
Remote
Pipes
uudat.d.
David
K.
and
Gifford
Procedures
ACM
and
for
Nathan
Efficient
Transactions
Glasser.
Distributed
ojComputeT
Communication.
Systems
6(3),
1988,
pp.
258–283.
[9]
Graham
Hamilton,
Mitchell.
Subcontract:
gramming.
13
[10]
Eric
1988,
pp.
WI,
An-
Emerald
6(l),
to
an
programming
sys-
February
1988,
.d
Programming
300-12.
Curtis,
Symposium
1992.
in
Paul
of
on
multi-
CS-TR-93-26,
pp.
Dorothy
object-oriented
fine-grain
Report
Implementation
ACM
.4rgus.
Johnson,
Argus.
and
Proc.
Operating
of
System
the
Princz-
pp. 111–1’22.
1987,
Greg Nelson, ed.
Prentice
for
Distribut
March
Liskov,
Hall,
TR-93-
and
the
Systems
Extensions
Technical
Scheifler.
Eleventh
[1-l]
SMLI
in
ComputeT
Leino.
Liskov.
Barbara
p(es,
G.
pro-
Hutchinson,
mobility
on
Caltech
31(3),
Robert
Norman
language
Barbara
C.4G’JI
James
distributed
109-33.
Rustan
computers.
[13]
Levy,
Trans.
programming
[12]
and
for
Laboratories
Fine-grained
.4 CM
K.
Powell,
base
Microsystems
Henry
Black.
tem.
L.
A flexible
1993.
Jul,
drew
[11]
Sun
April,
Michael
Hall
Systems
Series
Englewood
in
Programming
Innovative
Cliffs,
New
With
Modula-2.
Technology.
Jersey,
1991.
Prentice
ISBN
0-13-
.59046-1
[15]
F.
Prusker
tant
searrh
[16]
and
replicated
E.
Wobber.
The
repositories.
Laboratory,
Object
k~anagement
Broker
Architecture
Number
91.12.1.
Digital
Equipment
Group.
and
Siphon:
Research
Commou
Specification.
SOS:
M.
D.
Birrell,
and
and
ACM
SRC
Michael
Trans.
Comp.
h~ichael
Thomas
P.
Research
Sgs.
Rode-
Thacker.
local
Burrows.
Bur-
L.
Charles
self-configuring
links.
object-
perspectives.
287-337.
Needham,
Satterthwaite,
Schroeder
pp.
Laurence
An
area
net-
report
59,
Performance
8.
1, Feb.
1990,
managing
report
Corp.,
~bject
OMG
7,
dis-
Pans
Nlay
and
system
filing
C.
for
system.
Strachey.
a small
The
0S6—an
computer.
Computer
experimental
Part
2:
.Journal,
oper-
input/Output
15(3),
1972.
Oper-
147–1.58.
persistent
Habert,
Valet.
and
on
1986.
Sabine
1989,
Andrew
Roger
May
assessment
Fall
high-speed,
RPC.
Stoy
ating
Tanenbaum
tributed
[7]
2(4)
point-to-point
D.
of Firefly
Lazowska,
The
a network
pp.
work
IEEE,
distributed
1–17
Littlefield.
ACM
[21]
Para[le/
system:
H.
in
Conference
Celine
Schroeder,
a
e
Center,
International
Gourhant,
Ruffin,
Murray,
Edwin
Remet
Cambridge
encapsulation
Systems,
Systems
Autonet:
Lo-
on
Eclward
J.
Twelfth
Principles,
Implementing
Trans.
G.
Ow-
Collection
publication.
Artsy.
Richard
the
Susan
IEEE
programming
of
System
for
Invocation.
Levy,
Nelson,
Garbage
Submitted
and
Dzstnbuted
system:
Greg
Distributed
Objects.
Independent
and
Evers,
Wobber,
P. Black
cation
[6]
David
Ted
and
principle.
Yvon
Michel
heffer,
[4]
proxy
Mosseri,
rows,
39–59.
11
Develop-
Threads,
0’2141.1991.
Computer
Computing
Implement-
Transactions
1984,
Marc
1.0.
Service.
Structure
the
Application
1, revision
Directory
MA
Distributed
[19]
DCE
volume
Shapiro.
systems:
Henri E. Bal, M. Frans Kaashoek, and Andrew S. Tanenbaum. Orca: a language for parallel programming
of disTrans.
o n Software
Eng~neemng
tributed systems. IEEE
18(3), h~arch 1992, pp. 190–205.
ing
Marc
Foundation.
Call,
Cambridge,
[18]
1985.
[2]
Software
Reference,
Procedure
Almes, Andrew P. Black, Edward D. Lazowska,
and Jerre D. Noe. The Eden system: a technical review.
IEEE
Tr’ans. on Sojtwa?e
Engzneerzng
11(1),
January
Guy.
Open
ment
Re1991.
Request
Document
230
1990.
operating
et al. Experiences
system.
Comm.
with
i4CJ~
the
Amoeba
33(12),
disDecem-
Download