OID(SHORE )

Shore Programmer's Manual - 2 August 96

NAME

lrid_t \- Shore Object Identifiers

SYNOPSIS

class lrid_t;

#include <lid_t.h>

DESCRIPTION

Every Shore object has an identity, which is a value that is guaranteed to uniquely identify the object from all other objects that have ever existed in Shore. The Shore Storage Manager (SSM) gives each object a physical record identifier , and, if a value-added server so chooses, a logical record identifier . If logical record identifiers are used, the SSM maintains the mapping between logical record identifiers and physical record identifiers.

The Shore Value-Added Server uses logical record identifiers, which we call an object identifier (OID) .

An OID comprises a logical volume identifier and a serial number . A logical volume identifier contains the (Internet) network address of the SSM server that manages the volume, and a physical volume identifier , which identifies the volume to that server. A server cannot manage two volumes with the same physical volume identifier, but two different servers can manage volumes with the same physical volume identifier.

A serial number is a set of bits (identity) that the SSM assigns to entities on a volume. Serial numbers are used for SSM files, indexes, and records (objects), and other things internal to the SSM. Serial numbers, once associated with an entity, are never reused for another entity. The serial number in an object's OID is the serial number that the SSM associates with the record in which the object is stored.

A complete reference to an object consists of its full logical object identifier, which is rather large. Many references, however consist only of the serial number, because context is present: the volume on which the object resides is known. When Shore objects are committed to the disk, all references are stored in the form of a serial number. References to objects on another volume, called off-volume references or indirect references are managed as follows. (Keep in mind that this discussion pertains only to value-added servers that use logical identifiers.)

Remember that the SSM maintains a mapping of logical object identifiers to their physical object identifiers. In fact, it maintains a mapping on each volume, whose domain is the serial numbers, and whose range is all logical record identifiers, the physical record identifiers on the volume, combined. In other words, a serial number can be mapped to any logical object identifier, including one that refers to an object on another volume. This scheme allows chains of references to be built. It also permits indirect (and inefficient) references to local objects. The Shore Value-Added Server and the Shore Object Cache reduce these chains by snapping (reducing to a direct reference) references when appropriate. Nevertheless, it is beneficial to avoid inter-volume references in a database altogether.

A serial number is specified by the C++ class serial_t, found in

#include <serial_t.h>
The class has methods to tell if the serial number is null, remote, or local. The data portion of the class is a C structure, found in
#include <serial_t_data.h>
The data portion of a serial number has the same form as an in-memory address, and contains 32 or 64 bits, depending on a compile-time configuration option. In either case the following bits of an address have special meanings:
least significant bit
if 1, the reference is a serial number, if 0, it is an in-memory pointer.
most significant bit
in serial numbers, the most significant bit is interpreted as follows: if 1, the serial number is a remote reference, if 0, it is a reference to something on this volume.

BUGS

There is no mechanism to remove unused indirection chains from the volume's OID index, since reference counts are not kept.

VERSION

This manual page applies to Version 1.0 of theShore software.

SPONSORSHIP

The Shore project is sponsored by the Advanced Research Project Agency, ARPA order number 018 (formerly 8230), monitored by the U.S. Army Research Laboratory under contract DAAB07-92-C-Q508.

COPYRIGHT

Copyright (c) 1994, 1995, 1996 Computer Sciences Department, University of Wisconsin -- Madison. All Rights Reserved.

SEE ALSO

lid(ssm) , serial_t(common) , and lid_t(common) .