1 Introduction


Welcome to the HORB flyers guide. In this guide you will learn how to fly with HORB, the magic carpet for network computing.

Network computing is also called distributed computing. It has long history. People have used a "socket" so far to communicate between two or more separate machines. Socket provides programs a read/write interface of network protocols such as TCP/IP. Even if you don't know what they are, you could imagine that we had to pass data one by one via a socket in our programs. Since such programming style is too painfull, many distributed programing languages have been studied.
When we write a widely usable network program, we have to consider two important factors, portability and interoperability. Portability means that our program can run many different kinds of machines. Binary level portability is much better than source code level portability, because a program can run on the machines without recompilation. And if our program is interoperable, the machines can talk together. It's important!

HORB is one of the first distributed language systems that attained both portability and interoperability for wide range of machines. We can write a program in HORB that runs on most of operating systems in the market. To be honest, it's an inherited virtue from Java which HORB is based on. Programs written in Java runs greatly on many machines without recompilation. However, it lacked distributed computing capability. Java runs on only one machine as C++ does. If we use HORB, we can run a HORB program spreading over many, different kinds machines.

HORB looks like Java for you. If you write a Java program with some magic words, HORB will run your program on separate machines. For example, consider a Java client applet containing this fragment of code:

        String empName = database1.get(employeeID);

where in fact the object database1 exists on a remote server machine. You can create an object on a remote server, call methods of it from a client machine, and pass and back objects "from a distance."

HORB supports development of applets, clients and servers with existing Java development environment. HORB provides other powerful features such as persistent objects, remote object storage, security, WWW programming, and so on. You can start development of your network applications in true distributed object oriented programing style from now.

Enjoy flying with HORB!


1.2 HORB Architecture

Before you start programming, you should know a bit about the architecture of HORB and how it works. HORB consists of the HORBC compiler, the HORB server (a kind of ORB, Object Request Broker), and the HORB class library. Java objects compiled by the HORBC compiler are ready to be used in distributed environments. HORB works with the Javac compiler, Java interpreter and Java system classes distributed by Sun. For example, the HORBC compiler utilizes the Javac compiler. None of Sun's programs or source code has been modified for the HORB toolkit, which keeps HORB portable and free from Sun's source code license. This also means HORB does not use platform-specific "native methods"; hence, it's independent of underlying machine architecture. (HORB does support "native methods" you may wish to build into your HORB applications. See the HORB and Native Calls section for more details.)

Again, let take another look at how HORB works. Let's assume there are two machines, a server system and a client system. We will write two classes, a server class and a client class. A client object can be used either in a Java-enabled Web browser or in a standalone program. When the program begins, the client object creates an instance of the server object in the server system, and then calls the methods belonging to the server object. In order to make seamless, transparent method calls between the two objects, a proxy object, a skeleton object, and an ORB are used as behind-the-scenes facilitators.

Proxy Object
This object acts as a proxy for the server object. Thus the proxy behaves just like the server object for the client object. Stub routines are included in this object. The object reference of a proxy object is called a remote object reference.
Skeleton Object
This is the counterpart of the proxy object and includes stub routines.
ORB, Object Request Broker
ORB is the common mechanism for communication among objects. The ORB is the highway created for the communicating objects.

Since the proxy object and the skeleton object are generated by the HORBC compiler, you only need to write the client and the server object, start up the ORB, and run your client-side program.

We'll look into programming in the next section. You will fly with HORB!