Scoping. Information hiding is an
important property of a computer system. Programming languages should
support this very well. To illustrate,
object-oriented programming lets the
programmer define the visibility of information to be either private or public. When private, information is visible only to the object. If the variable
is declared as public, the information
is visible to the whole program. These
declarations are instructions to the
compiler to control information visibility. The runtime information visibility has to be done by the programmer during design and construction.
Having these kinds of information hiding in memory is fine for stand-alone
applications, but with network applications, the language also should support scoping across the network. How
is this accomplished?
In a network application, state
transitions are exposed as sync
points. In addition, information is
transferred through the sync points.
Clients can influence the application by interacting with these sync
points. In Figure 5, the server has two
sync points: pa1, which is hidden so
it cannot be observed by the clients,
and pa2, which is open and can be
observed by all clients. In this configuration, only client1 is aware of
pa1 and, hence, the server can be influenced only by client1. In terms
of object-oriented principles, pa1 is
private and pa2 is public. This principle is used to control information
visibility across the network. Scope is
controlled by hiding the action from
the public and then giving the sync
name selectively to different agents.
Each of these clients and servers
could exist across many address spac-
es, creating controlled information
security over the network.
Network applications bring new
challenges such as multisystem spaces,
latency, intermittent network availability,
and security. Thinking of applications
as communication rather than as
functions overcomes these challenges.
Mathematics of
Communication Systems
Network applications should be de-
veloped with toolsets and languages
that have communication as their
foundation. Software based on com-
putation has a good theoretical foun-
dation, such as λ-calculus, on which
the whole concept of programming
is built. An application based on
λ-calculus shuts out the world when
the program executes, whereas a net-
work application, by its very nature,
has many agents interacting with
each other on a network. This differ-
ence in the nature of the applications
calls for a new foundation for the tool-
sets and languages for building net-
work applications.
π-calculus, 6, 7 the theory of com-
municating and mobile systems, is
the algebraic representation of a Pe-
tri net. The focus in π-calculus is to
define the communication between
two agents that are operating on a
network. It also can define how con-
figurations of agents on the network
change as they interact. This property
of π-calculus—the ability to model
interactions between many agents op-
erating independently—makes it an
ideal mathematical foundation for
building toolsets and languages for
network applications.
π-calculus achieves this by: (a) rep-
resenting agent behavior as actions; (b)
configuring the different agents as the
initial starting configuration; (c) rep-
resenting shared transition between
these agents; and (d) changing the con-
figuration of the agent network as state
transitions happen. The π-calculus
agent actions can be observed. An ac-
tion represented by x is the potential
to receive information. The action rep-
resented by x– is the potential to be the
source of information. The reaction of
these complementary actions moves
the process and the data from source
to destination.
Figure 6 details initial configuration
P. This is taken from page 88 of Milner’s
Communicating and Mobile Systems: the
Pi-Calculus. 6 These terms run concurrently with each other. The parallel operation is identified by the operator “|”.
The sequence operation is represented
by “.”. The different actions are x and
u. The action x carries through u. The
action u transmits through v.
The π-calculus engine does interactions (that is, it looks at the action
with the same name and executes
the reaction). When the reaction
happens, the value is communicated from one term to the other. In the
case of the reaction between x and
x–, it will send z through x. With the
reaction, the second term becomes
inert, represented by ∅—a term
with no actions. Then, as shown in
Figure 7, it proceeds to substitute u
with z to raise the final configuration
process state P1. Notice how the different term nodes collapse to create
the final state.
It is possible to move programming from computation to communication—network-centric programming—by designing a language that
is founded on π-calculus (such as, on
interactions) and running it on a reaction engine that executes the language
as reactions.
Figure 5. Scoping as communication.
client1
client2
client3
pa1
private
shared
action
pa1
public action
pa2
server
Figure 6. Initial processing configuration.
P = x(u).u– < v > | x < z >
Figure 7. Final process configuration.
P1 = z– < v > | 0