13.3 A Brief History of Distributed Computing

 < Day Day Up > 



13.3 A Brief History of Distributed Computing

With the advent of large computer networks and the Internet, many of the resources that are to be used by a program no longer exist on a single computer. For example, a credit card might need to be validated on a bank's computer, with the program on the current computer being responsible only for sending the data to the bank's computer and then processing any return information. Another example would be a program that interfaces with a legacy system, such as a large employee database written using Common Business Oriented Language (COBOL) and possibly running on a mainframe. A final example would be any program running on the World Wide Web (WWW) that sends messages to a Web server on a remote computer to process requests and receives back a reply. It is improbable to think that a programmer starting a career today could work his entire career without ever writing a program that uses distributed programming in some manner. Programs that run on remote computers are by definition concurrent, so all of the current methodologies that have been studied to this point will apply to various parts of the concurrent programming model.

To better understand the current technology that is used to implement distributed computing, it is helpful to know a little about how distributed computing evolved over time. Original distributed systems were implemented using "sneaker net," which involved walking tapes containing files of data to the different computers running the programs processing this data. An improvement over sneaker net occurred when programmers built scripts using standard utilities, such as ftp or uucp, to copy these files between the various computers; however, these types of solutions were batch oriented, so one or more times a day files were transferred between the systems and executed.

Eventually, real-time access to remote systems was required. Early on this meant that programmers had to create their own protocols for accessing remote systems, building on low-level primitives such as sockets. While sockets provided an easy way to write data between the systems, it read and wrote simple streams of bytes, and it was up to the program to handle issues such as varying data types between computers (e.g., how to represent floating point numbers and questions of big-endian vs. little-endian) and reconstructing the byte streams into meaningful program data. This made any real-time interaction between programs expensive to implement because the programmer had to deal with low-level primitives and write and debug their own protocols for sending and receiving data.

As the need for more network services became apparent, high-level tools to implement network services became available. One of the first such tools was remote procedure calls (RPCs), which allowed a computer to effectively call (or invoke) a function on a remote computer. Built into RPC was the ability to ensure that the data sent between the systems was correct, so all the programmer needed to do to make a request of a remote system was to instantiate the RPC environment and then call the method as if it was running on the local computer. The RPC engine handled all the details of implementing the protocol to send and receive the data across the network.

One problem with RPC was that it did not work with objects, only with methods. Other methodologies, such as the Common Object Request Broker Architecture (CORBA) or the XML-based simple object access protocol (SOAP), were developed to allow objects to be accessed across networks. Java implemented its own method of transferring and accessing objects over a network, called remote method invocation (RMI), which builds on the strengths of the Java language to implement network-accessible objects.

The rest of this chapter shows how to implement a program using RMI and how objects can be accessed on the network using RMI. Section 10.4 gives a simple overview of RMI and how the different parts of RMI work to communicate across the network. Section 10.5 presents a simple HelloWorld program to introduce the basic capabilities of RMI. Section 10.6 shows how RMI can be used to send objects across the network (migrating objects) or to keep objects on a local computer that are to be accessed from a remote computer (non-migrating objects). An example program that illustrates the power of RMI is presented, and Section 12.7 implements a chat program that shows how the Java Event Model can be combined with RMI.



 < Day Day Up > 



Creating Components. Object Oriented, Concurrent, and Distributed Computing in Java
The .NET Developers Guide to Directory Services Programming
ISBN: 849314992
EAN: 2147483647
Year: 2003
Pages: 162

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net