Choose between shared and static library versions

Beginning with HCL OneDB™ Client Software Development Kit version 3.0, static versions of HCL OneDB general libraries are available on Windows™ and UNIX™ operating systems.

products before version 7.2 use static versions of the libraries for the HCL OneDB general libraries. While static libraries are effective in an environment that does not require multitasking, they become inefficient when more than one application calls the same functions. Version 7.2 and later of also supports shared versions of the HCL OneDB general libraries.

Shared libraries are most useful in multiuser environments where only one copy of the library is required for all applications. Shared libraries bring the following benefits to your application:
  • Shared libraries reduce the sizes of executable files because these library functions are linked dynamically, on an as-needed basis.
  • At run time, a single copy of a shared library can be linked to several programs, which results in less memory use.
  • The effects of shared libraries in the executable are transparent to the user.
Although shared libraries save both disk and memory space, when the application uses them it must perform the following overhead tasks:
  • Dynamically load the shared library into memory for the first time
  • Perform link-editing operations
  • Execute library position-independent code
These overhead tasks can incur runtime penalties and are not necessary when you use static libraries. However, these costs can be offset by the savings in input/output (I/O) access time once the operating system has already loaded and mapped the HCL OneDB shared library.
Important: You might experience a one-time negative effect on the performance of the client side of the application when you load the shared libraries the first time the application is executed. For more information, consult your operating system documentation.

Because the real I/O time that the operating system needs to load a program and its libraries usually does not exceed the I/O time saved, the apparent performance of a program that uses shared libraries is as good as or better than one that uses static libraries. However, if applications do not share, or if your processor is saturated when your applications call shared-library routines, you might not realize these savings.

You can also link thread-safe versions of the static and shared HCL OneDB general libraries with the application.