Saturday, October 08, 2005

Client-server abstraction

It is said that a good man gets a large number of beautiful women as his reward, in paradise. Khayyam poetically asks, why then having them on earth stops one from going to heaven? In particular, this seems to apply only to those who have to work their entire life without a wife so the prince can have a few dozen beautiful ones.

Ironically, when one entity satisfies the needs of multiple entities we use the terminology of client/server. Perhaps the one guy is merely a server for the beautiful clients who somehow managed to make it to paradise.

Turning our attention to the topic of this article, we note that some designers consider the term platform-free as an equivalent of abstract. An abstract language is platform-independent, but the converse is not necessarily true. One has to differentiate between patterns of abstraction at system and at application levels.

The notion of socket and the pattern induced by the socket library is a system-level abstraction. A platform-independent socket library for a particular language, such as C++, does not provide a higher level of abstraction. However, such a library is of great help in system programming.

The goal of designing an abstract language is to approximate our intuitive understanding of well-established notions. The purpose of approximation is to make the implementation of such notions appear as close to their intuitive perception, as possible. A platform-independent language that presents system libraries with a different syntax is effectively redundant. One can simply use the more expressive and established standard of C++ along with a platform-free library.

When speaking about client/server model we use an intuitive pattern influenced by the socket library. Indeed, the pattern can be taught in pseudo-code. The abstract language Z++ presents an object-oriented abstraction of the intuitive model, which hides a great deal of confusing complexity. Among other things, the communication between a server and its clients is identical to IO streams, transmitted in binary without the XML hassle.

Z++ is freely available from ZHMicro.

Labels: , , ,