VisiBroker for C++ Developer’s Guide : Reducing ORB runtime footprint

Reducing ORB runtime footprint
The ORB functionality is separated into various libraries instead of having all functionalities in one monolithic library. This gives VisiBroker applications the advantage of using only the specified ORB functionality required.
However, this does not mean that the VisiBroker application developed will be smaller in size. Rather, it helps you to link up the application with only the minimum required ORB libraries that a particular application needs, thus reducing the ORB memory footprint usage.
Note that the previous CORBA applications do not need to change their build process and link with the new ORB library names. Existing applications also do not have to modify their build process as they can still link up their application with ”orb_r” libraries on Windows or "liborb" libraries on UNIX or Linux platforms.
These libraries are now just the archives of all the dynamically linked ORB libraries. Most compilers can determine the dynamically linked ORB libraries in "orb_r" or "liborb" that the application depends on and thus determine which should be loaded during the runtime.
The "liborb" or "orb_r" library is not the only library required in VisiBroker deployment. As a minimum, the following libraries should also be included: liborbcore, libvport, libvdlog, libduser, and liblocsvc. Depending on what other features are used, additional libraries may need to be deployed as well.
Different ORB Libraries
The ORB is broken into several libraries pertaining to the ORB functionality or usage. The VisiBroker applications can now decide which libraries should be used during the runtime.
These ORB libraries are listed below:
“Core ORB library” (orbcore library)
“Dynamic Any library” (dynany library)
Core ORB library
The Core ORB library has all the basic ORB functionality but without the components required to use the Smart Agent (osagent), Location Service, Interface Repository, Dynamic Any, or Server Manager. All VisiBroker applications must at least link with the Core ORB library.
Based on our product examples, an example of link usage for UNIX and Windows platforms is shown below.
UNIX
Server: Bank_s.o Bank_c.o Server.o
$(CC) -o Server Server.o Bank_s.o Bank_c.o \
$(LIBPATH) $(LIBORBCORE) $(STDCC_LIBS)
Windows
Server.exe: Bank_s.obj Bank_c.obj Server.obj
$(LINK_EXE) /out:Server.exe Server.obj \
Bank_s.obj Bank_c.obj $(LIBORBCORE) $(STDCC_LIBS)
Smart Agent (osagent) usage library
Those VisiBroker applications that need to use VisiBroker's Smart Agent (osagent) do not need to link explicitly with the "dsuser" library as the Core ORB library will automatically load the "dsuser" library during the ORB initialization.
However, an application that sets the property "vbroker.agent.enableLocator" to "false" will not load the "dsuser" library during the runtime.
See “Using the Smart Agent” for the usage of VisiBroker's Smart Agent.
Location Service library
Those VisiBroker applications that need to use the Location Service must link with the "locsvc" library explicitly as well as with the Core ORB library.
See “Using the Location Service” for the usage of the Location Service.
Based on our product examples, an example of link usage for the UNIX and the Windows platforms is shown below.
UNIX
Server: Bank_s.o Bank_c.o Server.o
$(CC) -o Server Server.o Bank_s.o Bank_c.o \
$(LIBPATH) $(LIBORBCORE) $(LIBLOCSVC) $(STDCC_LIBS)
Windows
Server.exe: Bank_s.obj Bank_c.obj Server.obj
$(LINK_EXE) /out:Server.exe Server.obj \
Bank_s.obj Bank_c.obj $(LIBORBCORE) $(LIBLOCSVC) $(STDCC_LIBS
Server Manager usage library
Those VisiBroker applications that need to use VisiBroker's Server Manager do not need to link explicitly with the "srvmgr" library as the Core ORB library will automatically load the "srvmgr" library during the ORB initialization, if an application sets the property "vbroker.orb.enableServerManager" to "true".
See “Using the VisiBroker Server Manager” for usage of VisiBroker's Server Manager.
Interface Repository library
Those VisiBroker applications that need to use an Interface Repositorywill need to link explicitly with the "ir" library as well as with the Core ORB library.
See “Using Interface Repositories” for usage of Interface Repositories.
Based on our product examples, an example of link usage for UNIX and Windows platforms is shown below.
UNIX
Server: Bank_s.o Bank_c.o Server.o
$(CC) -o Server Server.o Bank_s.o Bank_c.o \
$(LIBPATH) $(LIBORBCORE) $(LIBIR) $(STDCC_LIBS)
Windows
Server.exe: Bank_s.obj Bank_c.obj Server.obj
$(LINK_EXE) /out:Server.exe Server.obj \
Bank_s.obj Bank_c.obj $(LIBORBCORE) $(LIBIR) $(STDCC_LIBS
Dynamic Any library
VisiBroker applications that need to use CORBA Dynamic Anys will need to link with the "dynany" library explicitly as well as the Core ORB library. See “Using dynamically managed types” for usage of dynamically managed types.
Based on our product examples, an example link usage for UNIX and Windows platforms is shown below.
UNIX
Server: Bank_s.o Bank_c.o Server.o
$(CC) -o Server Server.o Bank_s.o Bank_c.o \
$(LIBPATH) $(LIBORBCORE) $(LIBDYNANY) $(STDCC_LIBS)
Windows
Server.exe: Bank_s.obj Bank_c.obj Server.obj
$(LINK_EXE) /out:Server.exe Server.obj \
Bank_s.obj Bank_c.obj $(LIBORBCORE) $(LIBDYNANY) $(STDCC_LIBS)
Gatekeeper firewall library
Those VisiBroker applications that need to use VisiBroker's Gatekeeper firewall will not need to link explicitly with the "fw" library as the Core ORB library will automatically load the "fw" library during ORB initialization, if an application sets the property "vbroker.orb.enableFirewall" to "true".
See the VisiBroker Gatekeeper Guide for usage details of the Gatekeeper library.