Network Computing - An Overview

Introduction to Network Programming

Network programming is being described by some as a low-level programming. That is, writing code for reading and writing network sockets, translating network protocols, and for  encryption/decryption of data etc. Some even go to the level of portraying network programming as developing distributed applications using middleware technologies such as Java RMI, CORBA and Microsoft DCOM/DNA. Sometimes network programming is being interpreted as Internet/Intranet/Extranet programming. But one point in network programming is absolutely sure, that is, network programs have to use a network (private or public) in one or other way to do their assigned work. Thus network programming encompass all of the following:

1.      Sending and receiving data over any network   (or)

2.      Providing and Invoking services over any network

Primary Components in network programming

1.   Client

        A client is a typical computer application that relies on another computer program for some of its data or services. Normally a client will run on a local computer and access a server application across a network. A Web browser is a network client and it is being used to approach Web servers to get and display text/image files and other types of files on the local PC.

2.  Server

    A server is a computer or some other device on a network that manages a network resource. A file server manages some sort of storage device to share files over a network. A print server manages access to a network printer. A database server is used to store, query, and retrieve large amounts of data efficiently.

Another meaning for the term server is a computer program that provides data and services to another computer program.

3.  Protocol

Protocol is another bit of network programming jargon. A protocol is an agreed-upon way of exchanging information and service requests between clients and servers. File Transfer Protocol (FTP) is the protocol for transferring files over the Internet.  We can download as well as upload files between a FTP client and a FTP server. Other operations such as creating a directory, listing files and deleting files can be also done using FTP.

Thus a client, a server and a standard protocol for communication purpose are the three main ingredients for network computing.

In the recent past, the peer to peer (P2P) model networking concept came into existence. Here the protocol called as Gnutella is being used to transfer files on the Internet. The interesting point here is that this protocol uses just one program  called servant to transfer files. This servant can act both as a client and a server. Sometimes a servant does the job of a client such as searching for files and retrieving them from other computers and sometimes a servant can act as a server and does the job of sending files and responding for queries from other computers.

Why networking?

Networking can extend the power of a single computer. Networks allows one computer to talk with thousands of other computers located locally or remotely. Networking facilitates a server to share its content to many client machines and thus a server can be a central repository. Many a time networking seems to be a cost-effective mechanism.

How Java supports Network Programming?

Having realized the importance of networking, Java designers have come out with a library of standard classes and interfaces so that many low-level programming tasks can be easily avoided. The Java developers could concentrate on designing high-end, sophisticated Internet applications and thus the productivity level can shoot up dramatically and network applications can be written quicker with very less code.

Java APIs bring robustness to network applications development as usually low-level network programming is error-prone. Also the new APIs in the latest version of Java software development kit provide high-level object models and function libraries. A single method call can replace dozens of lines of low-level network programming making source code more readable.

The foundation for Java networking is located in the java.net and java.io packages. In addition, Java SDK has the various java.rmi packages.

Why Java for network programming?

It is very common nowadays to equate network programming with Internet programming. Web browsers, though being pervasive everywhere, are not a universal network programming solution. A Web browser can connect to a Web server and gets back the required information as they both use the same protocol (HTTP) for communication. But a Web browser can not connect to any other server that uses a different protocol and communicate with it. Web browsers typically work with text files and a few binary files. Browsers can incorporate a lot of functionality beyond the HTTP protocol but these involve extensions that are far from universal in their acceptance.

Java network programming can add a suite of new functionalities that are not currently available with browser-based network computing. Java network programs brings flexibility and offers greater power. Browsers make excellent user interfaces, but as different browsers support different feature sets, we are not able to get a universal and consistent look and feel user interface.

Browser any way need a human to initiate the process of contacting Web servers and get the things done, but Java, being so good for designing applications with automated processes, facilitates to develop applications that can connect automatically to its assigned server and gets the updated and latest information. Even a Java applet can connect to its server host and display the results in a small browser window.

Browsers retrieve information on demand. Web browsers are better in retrieving data than they are at collecting information and submitting it. When a Web browser can submit  any data through an HTML form. Validating data on an HTML form involves important design trade-offs. That is, client-side solutions risk browser incompatibilities and server side solutions are bound to have network roundtrips. Web browsers are optimized for displaying data, but Java network programs do not have this type of restrictions. Java programs can send, validate and receive information quite comfortably.

Home