196 Selling and Fulfillment Solutions Using WebSphere Commerce and IBM Sterling Order
8.1 WebSphere Commerce DOM inventory cache
management
Certain backend inventory management systems, for example, legacy in-store
systems, might have performance, scalability, and availability limitations. The
inventory component and its services are designed with caching support to
address these limitations. That is, the inventory availability of an item at a
location can be cached by the component, either in memory or in the database.
This results in the Distributed Order Management (DOM) inventory configuration
and availability not being controlled by WebSphere Commerce Accelerator.
Instead, WebSphere Commerce records the inventory information in the local
database cache or memory cache, and the master data is contained in an
external inventory system.
For a memory cache option, Distributed Object Cache is a feature of the
WebSphere Application Server dynamic cache service. Distributed Object Cache
holds Java objects for use in a distributed environment. For example, objects can
be stored by one application server and then retrieved by other application
servers in the same Data Replication Service (DRS) cluster. These cache
instances are retrieved by a JNDI name that is configured on the Cache Instance
resource. This cache can be configured so that objects are persistent, flushed to
disk when the server is stopped, and loaded again upon restart.
The WebSphere Commerce DOM inventory cache is a custom caching solution,
so that is can also cache inventory in the database, as well as in a WebSphere
Application Server distributed object cache. For database caching, inventory
availability is maintained in INVAVL, and for memory caching in the inventory
distributed object cache. Note that a separate object cache instance is
instantiated for caching inventory availability in memory, not to be confused with
the cache instance used for JSP/command caching.
8.1.1 Inventory availability cache
This section contains details about DOM inventory availability caching support:
WebSphere Commerce can cache, at most, one inventory availability record for
each combination of item and location. Each cached record contains the
following information:
򐂰 Inventory status (for example, available, back-ordered, unavailable)
򐂰 Available quantity
򐂰 Availability date
Chapter 8. Integration implementation 197
򐂰 Availability offset
This is useful for delivery and buy-online-ship-to-store scenarios where the
availability date is based on a lead time (offset) instead of an absolute date.
򐂰 Last update date
Commerce can cache an inventory availability record in memory or in the
database, or both, depending on the inventory configuration of the item and
location. A WebSphere distributed object cache is used to cache inventory
availability records in memory.
Advantages of using a WebSphere distributed object cache include:
򐂰 It works in a clustered environment.
򐂰 It can be configured and managed using the WebSphere Cache Monitor.
Caching inventory availability records in memory is useful when it is either
impossible or undesirable to batch-load the records into the database. For
example, exporting all inventory availability records from a legacy in-store
system could block inventory access for an unacceptably long period of time.
Another example is if a large retailer has a large product assortment in
combination with a sizable number of physical stores, it could be cost prohibitive
to import all inventory availability records into the Commerce database.
DOM inventory caching configuration has the capability to capture global rules
at the store/location level, or configure global rules for all stores. In addition,
multiple rules can be applied to a single item, location, or store, and which
takes precedence is done via a prioritization flag. This design allows for a retailer
to apply default caching rules, as well as ones that might apply at the physical
store level. Because catalog items can be grouped, caching rules can correlate
to promotions.
Each inventory configuration contains the following options:
򐂰 Precedence
򐂰 Threshold quantity
򐂰 Expiry time of a cached record when available quantity >= threshold quantity
򐂰 Expiry time of a cached record when available quantity < threshold quantity
򐂰 Priority of a cached record
򐂰 Used by the distributed object cache to determine which cached records to
purge in case of cache overflow
򐂰 Fallback values, used when the backend system is offline
򐂰 Additional options that control where the records should be cached (in
memory or in the database, or both), whether real-time service requests

Get Selling and Fulfillment Solutions Using WebSphere Commerce and IBM Sterling Order Management now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.