next up previous
Next: Basic Services in NetStream Up: NetStream: a Flexible and Previous: NetStream: a Flexible and


Introduction

This work is devoted to describe a C++ class containing basic and advanced services for message passing through a communication network. From now on, we will call this class NetStream since the design goals will lead us to define a "stream-like" interface for accessing the network.

Message passing is a well-known communication paradigm very useful in a set of assorted application domains, both for LAN and WAN services. PVM [3] and MPI [2] are two popular libraries that fit rather well this category. However, we envision some other goals that make this "raw" libraries appear working at too "low-level" for our target users. In fact, our start objectives for the communication library are listed below and own a close relationship to the necessities of the Spanish national funded project MALLBA (TIC1999-0754-C03-03):

In order to cope with these goals the resulting system must show a great deal of concrete features. Since we need both basic and advanced services we need to define methods in the final C++ class devoted to these two types of users. In any case, we plan to offer methods having a very clear interface so that the learning time will be minimized. In addition, because we want to access both LAN and WAN characteristics an effort must be made to make a uniform interface for they two in terms of resulting methods of the class.

Besides that, efficiency is an important goal, given that we want to use the library both for sparse and intense message passing programs. And finally, we directly embrace the object oriented technology; the reason is that we really want to separate implementation from conceptual services. Of course, abstraction, re-utilization, and extension must be taken into account because nowadays libraries continuously undergo revision steps in order to fix or add new services to the existing ones.

As a result, we adopt MPI [2] as the base communication library in order to implement NetStream because it is a standard in message passing and becauseof its efficiency and future connectivity with emerging technologies such as Globus [1]. However, this not prevent a future change in the implementation of the NetStream library services on a different underlying system. Also, we will use directly C++ as the base language since it is object oriented, very popular, and (at present) more efficient than Java implementations for the so many different kind of applications we are devising NetStream.

We will develop the whole library in a "stream-like" fashion. This means that we will only need to declare a NetStream object and then go on with it by invoking the appropriate methods. We will use the standard inserter <<" and \emph{extractor} \verb">> operators in order to express reception and transmission of information on a net stream. This will bring uniformity to our new streams with respect to standard input/output streams and also it will allow the programmer input/output a sequence of objects in a single statement (as well as it helps in reducing the verbosity that would from using a named method instead of these operators).

    NetStream netstream;
    ...
    netstream << 9 << 'a' << "hello world";
    ...

Next section will deal with the definition of the basic services for novice users in version 1.0. Then, we will move on to more advanced services in Section 3 aimed at satisfying the needs of parallel programmers. Section 4 details the differences among the sucessive versions of NetStream. In Section 5 we will show and explain some basic examples of use, just to arrive to Section 6 in which we include an example of how groups are dealt with. A performance analysis of times with parallel exchange of data with NetStream is shown in Section 7. Finally, we will finish by summarizing the contents of this paper and by discussing some open lines in Section 8.


next up previous
Next: Basic Services in NetStream Up: NetStream: a Flexible and Previous: NetStream: a Flexible and
Enrique Alba 2001-11-15