This site contains older material on Eiffel. For the main Eiffel page, see http://www.eiffel.com.

EiffelNet: The object-oriented library for client-server communication

Eiffel Power (TM) from ISE

NEW: You can now browse the EiffelNet manual on-line. See the end of this page.

Following the Persistence Completeness principle described in "Eiffel: The Language", EiffelNet ensures that whenever an object is sent over the network all the objects to which it has direct or indirect references are also included. This guarantees the consistency of transmitted object structures.

Sockets classes

The classes of EiffelNet fit in the overall hierarchy of EiffelBase, the fundamental library of data structures and algorithms of ISE Eiffel. More precisely, the EiffelNet socket classes appear at the same level as the EiffelBase class FILE, as heirs to IO_MEDIUM; the object storage and retrieval mechanisms provided by class STORABLE will now work not just to store an object structure into a FILE (as before), but also into any IO_MEDIUM, including a socket. So the mechanisms are exactly the same for storing objects into a file and sending them over a network.

STORABLE provides three forms of object storage or transmission: "basic", where the two communicating applications must be instances of the same system; "general", where the two systems may be different but the hardware architectures must be compatible; "independent", where the architectures are arbitrary. The last form is particularly useful for client-server applications running on heterogeneous networks, since the clients and servers can exchange objects even if they are of completely different architectures, e.g. a DEC Alpha (64-bit words) and a Sparc or other 32-bit machine.

Modes

Class variants are provided for the following choices:

    Single-machine communication versus network communication.

    Stream communication (guaranteeing reliability, non-duplication and sequencing) versus datagram communication (requiring the application to perform more checks, but ensuring a higher degree of asynchronicity).

Event-driven computation

It is possible, through class POLL_COMMAND, to ensure that a certain action will automatically be triggered upon emission or reception of data on a socket.

This supports a flexible, event-driven mode of client-server processing, where each application simply associates a command with each expected event and then waits for things to happen by themselves.

High-level classes and object-oriented model

Particularly interesting - especially, but not exclusively, for beginning users - is the presence of the "Predefined" level of EiffelNet, which provides a few "client" and "server" classes covering the most common cases and taking care of all the details in these cases. An application can then include a client class and a server class that inherit from the corresponding predefined classes; all the new classes need to do is to build the specific objects to be exchanged and specify the required processing. All communication and synchronization aspects are handled automatically by the predefined classes.

This scheme applies the full benefits of the Eiffel method and O-O principles to client-server applications.

For applications that need a finer degree of control on the actual underlying mechanisms, more specific classes are also available.

Here EiffelNet follows the lead of other ISE Eiffel libraries in offering several levels: both an easy-to use framework that covers the common cases, and more detailed classes providing full access to the underlying facilities. (For another use of this multi-layer scheme see for example the description of EiffelLex, the lexical analysis library, in the book Reusable Software: The Base Object-Oriented Component Libraries, Prentice Hall, 1994.)

Platforms

EiffelNet is available on the major platforms supported by ISE Eiffel, including Unix and Windows 95/98/Me/XP/NT/2000.

Documentation and examples

The EiffelNet documentation includes a set of examples and a user manual, which is also available for on-line Web browsing.