|
||
The data for the items in the messaging system — attachments, folders, and message services as well as messages — can be stored in three places:
Index: the index records state and generic message header information for every item. Each index entry (and so each item) is uniquely identified by an ID field.
Message Store: each entry can have an associated direct file stream store that holds message body text, and protocol-specific data.
Binary files: files of any type can also be associated with an entry. Typically, these are message attachment files.
Some entry types do not usually have associated message stores or binary files: for example, folders, being simple, can be wholly described by an index entry.
As the Message Server is expected to run continuously, it maintains the index in memory. A copy of the index is persisted in the file system, so that it can be restored in the event of a system reset or Message Server failure.
Some fields only apply to particular types of entry (such as messages or services); other fields can be interpreted differently for different entry types.
A message store contains message data in a variable number of streams, each of which is referenced by a unique identifier. This concept is known as a dictionary file store.
MTMs can create additional streams in a message store to hold MTM-specific message data. Usually, at least one stream is devoted to non-generic header information, such as recipient information.
The Message Server allows multiple read-only and a single read/write access to a message store at any one time.
Any entry can have binary files associated with it. These are
stored in a directory, created by the Message Server, that is unique to the
entry. Before v9.0, clients read and wrote files directly into that directory.
From v9.0, clients use the messaging API classes
MMsvAttachmentManager
and
CMsvAttachment
to manage attachments.
The abstractions through which applications access the various types of storage are key to Messaging. Briefly:
CMsvEntry
is the highest level abstraction. It
encapsulates actions to access, manipulate, create, delete, and move
entries.
CMsvServerEntry
is similar to
CMsvEntry
, but used only by Server-side MTMs
TMsvEntry
encapsulates an index entry
CMsvStore
encapsulates an entry’s message
store