ObjectStore/Single is a form of the ObjectStore client tailored for single-user, nonnetworked use. The functional capability of an ObjectStore/Single application operating on file databases is virtually identical to that of a full ObjectStore client. Databases created with one kind of client are completely compatible with the other. However, full ObjectStore and ObjectStore/Single are not intended to run together.
ObjectStore/Single Features
Each invocation of an ObjectStore/Single application requires a Server log file. Applications for UNIX platforms also require a cache file. Users must be prepared to specify the cache and Server log files at each execution of an ObjectStore/Single application. ObjectStore/Single API
The following functions in the class objectstore can be used in creating ObjectStore/Single applications:
For ObjectStore/Single, specify the following:
Platform | Library Load Path |
UNIX | $OS_ROOTDIR/libsngl/:$OS_ROOTDIR/lib |
Windows | %OS_ROOTDIR%\binsngl |
OS/2 | %OS_ROOTDIR%\libsngl |
Application Development Sequence
You should first develop your applications and schema using distributed ObjectStore, and then run your applications with the ObjectStore/Single libraries for final testing and delivery.
The two environment variables are
The user must take responsibility for ensuring that the Server log information is propagated when moving a database from a full ObjectStore environment to ObjectStore/Single, or the reverse.
ObjectStore/Single provides transaction consistency for databases just as full ObjectStore does. Both ObjectStore/Single and full ObjectStore use a Server log as a tool to provide transaction consistency. See Description of the Server Transaction Log in ObjectStore Management for additional information about Server logs.
In this discussion, the term Server refers to both the separate osserver process of full ObjectStore and the functionally equivalent part of ObjectStore/Single that is contained in the client library. The term is meaningful for ObjectStore/Single because, while ObjectStore/Single does not have or need a separate-process Server, the requisite work is done in a part of the client library internals known as the embedded Server.
Server Log Functions
You must be aware of several important aspects of Server logs. Commit compared to propagation
A log might contain data that has been committed but not yet written to one or more databases. Logically, the log information is part of the databases, and so it must be propagated, that is, written into the actual databases, before those databases can be used for more work. Users of full ObjectStore might have encountered this issue when trying to copy file databases with an operating system command such as cp rather than oscp. Server log size
Server logs can grow large fairly quickly. As a rule of thumb, a log's size is proportional to the amount of data that has been modified in the largest transaction since that log was created. The Server cannot shrink its log. The log size is not generally a problem for full ObjectStore since there is only one log file per osserver process. However, in ObjectStore/Single, because each execution of an ObjectStore/Single process must have its own log, the log size can quickly become a disk space management problem. Thus you must be conscientious about finding and propagating (and thereby removing) old log files. Log File Guidelines
The following ObjectStore behaviors help you deal with logs:
Conversely, the presence of a log after the program ends is an indication that the databases should be considered to be in an inconsistent state. When this happens, run the osprop utility on that Server log immediately.
Also bear in mind that any time an ObjectStore/Single application or utility is initialized with an existing Server log, ObjectStore automatically conducts propagation. The osprop utility is the simplest possible ObjectStore/Single application - it starts, does propagation, and then shuts down.
Other than by shutting down the osserver process, it is not easy for users to know if log information has been completely propagated into a database.
The different pathname lookup behavior between ObjectStore/Single and full ObjectStore could be a concern for those who
Picking cache and log file names for an application should not be done statically. The names chosen must be in the context of whatever other ObjectStore/Single applications happen to be running at the same time on the host. Name collisions must be avoided. All of these concerns are the application's responsibility.
This issue is more complicated than the cache manager's job in managing the commseg and cache file pools for networked ObjectStore, since there are the additional factors of user permissions and Server log file persistence. To summarize, your application should address the following issues when selecting a cache and log file.
Server Log File Considerations
Be sure to communicate this to your customers prior to your application installation.
Contact Object Design if you have recommendations about how the current cache file and Server log API could be enhanced to ease this requirement.
Also include the ObjectStore utilities.
Updated: 03/26/98 20:02:08