Chapter 1: VisiBroker Basics

This chapter introduces VisiBroker for C++, a complete implementation of the CORBA 2.0 specification for developing distributed object-based applications. It includes the following major sections:

What is CORBA?

What is VisiBroker?

Developing Applications with VisiBroker

VisiBroker Features

What is CORBA?

The Common Object Request Broker Architecture (CORBA) specification was developed by the Object Management Group to address the complexity and high cost of developing software applications. CORBA specifies an object oriented approach to creating software components that can be reused and shared between applications. Each object encapsulates the details of its inner workings and presents a well defined interface, which reduces application complexity. The cost of developing applications is also reduced because once an object is implemented and tested, it may be used over and over again.

The Object Request Broker (ORB) connects a client application with the objects it wishes to use. The client application does not need to know whether the object resides on the same computer or is located on a remote computer somewhere on the network. The client application only needs to know the object's name and understand how to use the object's interface. The ORB takes care of the details of locating the object, routing the request and returning the result.

Accessing Distributed Objects

To use an object, your application must first bind itself to the object, specifying the object's interface name. The ORB locates the host that offers an object with the requested interface name. If the server that implements the requested object is not currently executing, the ORB can ensure that the appropriate server is started. After the bind is completed, the client application can invoke operations on the object. The client's method invocations are translated into requests that are sent to the object server.

What is VisiBroker?

VisiBroker is an ORB that offers a complete implementation of the CORBA specification. VisiBroker makes it easy for you to develop distributed, object-based client applications and servers. VisiBroker offers these important features.

Developing Applications with VisiBroker

The first step to creating an application with VisiBroker is to specify all of your objects interfaces using CORBA's Interface Definition language (IDL). The IDL mappings for the C++ language are covered in Chapter 11.

The interface specification you create is used by the VisiBroker IDL compiler to generates stub routines for the client application and skeleton code for the object implementation. The stub routines are used by the client application for all method invocations. You use the skeleton code, along with code you write, to create the server that implements the objects.

The code for the client and object, once completed, is used as input to your C++ compiler and linker to produce the executable client application and object server. These steps are shown in the following figure and are covered in detail in Chapter 2.

VisiBroker Features

In addition to providing the features defined in the CORBA specification, VisiBroker offers enhancements that increase application performance and reliability.

Fault Tolerance

VisiBroker can determine if the connection between your client application and an object server has been lost, due to a server crash or network failure. When a failure is detected, an attempt is made to restart the server or to connect your client to a suitable server on a different host. The details of fault tolerance are covered in Chapter 5.

Optimized Binding

When your application binds to an object, VisiBroker selects and establishes the most efficient communication mechanism. Depending on the platform and the location of the requested object, the bind may be established through a pointer reference, shared memory or a TCP/IP socket. Chapter 3 describes optimized binding in detail.

Dynamic Invocation Interface

VisiBroker maintains an interface repository that contains the IDL specifications for all of the object that have been activated. This repository can be used by client applications to discover a recently added object, obtain the object's interface and dynamically construct requests to act on the object.The Dynamic Invocation Interface (DII) is covered in
Chapter 9.

Support for Threads

On those platforms that support threads, VisiBroker is thread-safe and reentrant for both the client application and the server. For each thread within your client application, each bind is allocated its own thread within the server. When your client disconnects, the server thread allocated for your client will exit. Thread support is discussed in Chapter 8.

Event Handling Facilities

VisiBroker allows you to monitor the following events:

You can use these events to provide debugging, logging, accounting, performance monitoring or security information for your applications. Chapter 7 describes event handling.

Event Loop Integration - For Single Threaded Applications Only

You may find that the objects you implement require interaction with an event-driven environments.Object implementations are also event driven because they must wait for client requests. VisiBroker gives you the ability to incorporate your object's event polling into the network or windowing component's event loop. This frees you from the complexity of managing nested event loops in your code. Chapter 8 explains the details of event loop integration.


[Preface] [Chapter 1] [Chapter 2] [Chapter 3] [Chapter 4] [Chapter 5] [Chapter 6]
[Chapter 7] [Chapter 8] [Chapter 9] [Chapter 10] [Chapter 11] [Chapter 12] [Appendix A]