This document describes the overall architecture of OCM Access Manager (OCMAM). For an overview of the scope and the features of the OCMAM, see the Getting Started Guide guide.
The OCMAM is a module that you can use to download, store, and access OCM data without the necessity to handle unbundling, caching, and decoding.
The module consists of the following parts:
DataStoreClient: consumes decoded OCM data of one or more catalogs. Multiple
DataStoreClientinstances are connected to one
DataStoreServer: downloads, decodes, and serves OCM tiles to multiple
DataStoreClientinstance. This class keeps decoded OCM tiles to be fed to the requests.
CatalogManager: managed by the
DataStoreServerinstance. This class keeps track of all added and used catalogs. Additionally, it handles all downloads.
BundleManager: managed by the
DataStoreServerinstance. This class handles tile requests and OCM decoding using the
CatalogManagerinstance, respectively the
Decoderinstance. It is also used to merge similar decoding requests.
Decoder: injected into the
DataStoreServerinstance. This class decodes individual layers from a bundle for a specific tile. It can also override an individual layer decoder to use more efficient algorithms or only decode what is needed from the layer.
CacheUpdateManager: handles all map region prefetches and updates for the on-disk protected cache.
The OCMAM handles all user requests asynchronously but provides a pure synchronous API (except for prefetching) that gets data using const references and shared pointers to avoid deep copies.
Requested decoded layers are passed through the
ClientMapTile structure that contains members for all possible layers. These members are passed as shared pointers to protobuf classes, which you can request from the client map catalog. The members contain real data only for the requested layers; other layers are set to
nullptr. If the requested tile is found in the in-memory tile cache, it is downloaded only if
OnlineOnly is specified as a fetch option.
The OCMAM can handle multiple catalogs and versions of the same catalog simultaneously. In addition to loading decoded OCM data, if you need to get only some attributes of the layer, OCMAM also provides the possibility to load raw undecoded layers.
The following diagram shows an overview of the OCMAM components.