3 Distributed objects technology
3.1 Distributed objects technology
This technology virtually hides the network from the designer and programmer. A distributed object is an object which is resident on one computer and for which methods can be invoked associated with code resident on other computers. A good distributed objects technology should totally hide the underlying communication details from the programmer, for example when a programmer wants to invoke the method to an object called on a server, then the programmer should produce the code
in the same form as if the object was contained in the computer in which the code is resident. There should be no references to ports, sockets and server sockets.
The vast majority of distributed objects schemes involve the generation of 'under the bonnet’ code which carries out the actual processes of sending messages to objects and transmitting the data associated with such messages.
Two distributed objects technologies are CORBA, which is a multi-language technology, and RMI, which is a Java-based technology.
Distributed objects technology works by intercepting calls to distributed objects and executing system code which carries out the process of locating objects and sending data and execution instructions. All this is carried out ‘under the bonnet’ with the programmer not being forced to include communication code. The architecture of a distributed objects system is shown in Figure 2. Here, a number of objects spread around a collection of computers communicate by invoking methods, all data transfer being carried out by means of arguments to the method calls which correspond to the messages.
The main advantage of using a distributed objects scheme lies in the fact that it has a 100 per cent fit with object-oriented technology: that classes identified during the analysis and design phases can be immediately implemented in terms of classes in some programming language, deposited on some remote computer which forms a component of a distributed system and reused without any modification.
The main disadvantage with distributed objects currently being experienced by developers is that their performance, certainly compared with message passing technologies, is inferior.
The mechanisms for developing distributed objects are straightforward and involve either processing source code or an intermediate language.