Nepi²: A Two-Level Calculus for Network Programming Based on the pi-Calculus
暂无分享,去创建一个
We propose a two-level calculus, Nepi 2, for network programming that is based on the ~r-calculus [4, 5]; one level treats local (or intra-proeess) concurrency and the other treats global (or inter-process) concurrency. We give the operational semantics and a distributed implementation of this calculus. Nepi 2 evolved from Nepi [1], a network programming language based on the re-calculus that does not distinguish between local and global concurrency. In Nepi, any two agents (or threads) can communicate with each other only via a single global communication manager (GCM). This method of inter-agent communication has two problems related to performance and scalability: (i) For two agents residing within a local system, this method entails unnecessary global interactions. (ii) A substantial part of the load of managing inter-agent communication is concentrated on the GCM, which can be a bottleneck when the overall system is scaled up. A major reason for introducing two levels in Nepi 2 is our desire to alleviate these problems. There are, however, other reasons for differentiating the two levels: (i) There are no problems in introducing locally defined datatypes that are used only within a local system, even when it consists of multiple threads, but datatypes used across different local systems need to have their specifications advertised globally. (ii) Mutable data objects and pointers can be used within a local system, but it is very hard to use them across different local systems with their original semantics preserved. Apart from these inherent differences, we have kept the differences between the treatments of local concurrency and global concurrency as small as possible from the viewpoints of programming and semantics. The language of Nepi 2 consists of the following two levels. The first-level language is a programming language defining the syntactic category of process expressions. It is used for representing local systems as processes (each possibly consisting of multiple agents) of the form (P1 [I "'" [[ Pn), with Pi representing an agent (i = 1 , . . . , n) and It being the parallel operator in the first level. We have two kinds of communication primitives for sending and receiving data. One kind is for local (or intra-process) communication and the other for global (or inter-process) communication. The second-level language is defined on top of the first-level and defines the syntactic category of system expressions of the form (P1,1 [ ["" [[ Pt,~(1)) l-I "'" 1-I (Pk,1 I t " " [[ Pk,n(k)), with rI being the parallel operator in the second level. This level is used for analyzing global systems consisting of the processes described in the first-level language.
[1] Ken Mano,et al. Nepi: A Network Programming Language Based on the pi-Calculus , 1996, COORDINATION.
[2] Robin Milner,et al. The Polyadic π-Calculus: a Tutorial , 1993 .
[3] Benjamin C. Pierce,et al. Concurrent Objects in a Process Calculus , 1994, Theory and Practice of Parallel Programming.
[4] Robin Milner,et al. A Calculus of Mobile Processes, II , 1992, Inf. Comput..