Home
 

The Server Objects

The Server Objects

There are a few CORBA objects for the tests. They are outlined below.

The Object Factory

The Object Factory is the start point of the server. All other objects are created by this factory. Some are singleton, which means they are created at startup and the reference to the very same object is returned every time. It is a well known pattern and a very easy way to create multiple objects in the server.

To communicate references between clients (necessary for the mesh) we allow registration, deregistration and lookup of references.

Most tests use the main RTT (Round Trip Time) object (see below for description), but for the number of methods in an object test (see Number of Methods) we need separate objects. They can be created with the createMxxx() methods, where xxx is the number of methods.

module Perf {
  interface ObjFactory {
    Barrier getBarrier();  // Singleton
    RTT getRTT();  // Singleton
    RTT createRTT();

    void registerRTT(in long id, in RTT obj);
    void deregisterRTT(in long id);
    RTT lookupRTT(in long id);

    RTTMethods1 createM1();
    ...
}

Figure 3-3. IDL for the Object Factory

The Barrier

The Barrier is used to synchronize the clients at the beginning of the tests. At the synchronization point, each client calls the barrier() with the total number of clients that will call it. The call returns as soon as the given number of clients reach this call.

module Perf {
  interface Barrier {
    void barrier(in long howMany);
  };
}

Figure 3-4. IDL for the Barrier

RTT Object

The RTT object is used for round trip time measurements of various data types. This includes the basic data types (void, long, float, boolean) and the compound data types (array, struct). For each test we have a synchronous and an asynchronous version. The object is implemented with empty function bodies, since we are only measuring round trip times.

module Perf {
  interface RTT {
    void sync_VV();
    oneway void async_V();

    void sync_LL(in long din, out long dout);
    oneway void async_L(in long din);
    ...
    void sync_aLaL1(in RTTArrays::longArray1 din, 
                    out RTTArrays::longArray1 dout);
    oneway void async_aL1(in RTTArrays::longArray1 din);
    ...
    void sync_sLsL1(in RTTStructs::longStruct1 din, 
                    out RTTStructs::longStruct1 dout);
    ...}}

Figure 3-5. IDL for the RTT Object