This is a continuation of Growing Order Data – Is this really an issue?

Transactional databases grow with order data exponentially over time. “Data is valuable!” It cannot be purged to trim down a database. The next challenge for solution designers is to implement an approach so that their application can provide a better user experience while business continues to grow with transactions. This blog presents an implementation strategy in IBM Cloud that uses the integration between IBM Order Management (OM) and IBM Universal Behavior Exchange (UBX), a data exchange platform.

Data in OM belongs to three major categories: transactional, configuration and master. A process can be established to push transactional data into an external datastore and to meet the rapidly growing business needs around data retrieval. This data can be pushed in real time using an asynchronous event-based mechanism. The configuration and master data can be pushed through scheduled cron-based processes that can be run at regular intervals. Some common examples are as follows:

Data / Event
Type
Data Integration Style
Order Create
Transactional
Near Real-Time
Order Update
Transactional
Near Real-Time
Order Shipped
Transactional
Near Real-Time
Item
Master
Scheduled Cron
Categories
Master
Scheduled Cron
Enterprise
Configuration
Scheduled Cron

 


Figure 1: Data Publishing using IBM Order Management Event Framework

 

A scheduled cron based process can also be used to migrate existing or historical transactional data from a “backup database” into the “read” datastore. Once the historical data is migrated successfully, another process can be established to trim down the active transactional database periodically.

REST based microservices can be created to access data from the “read” datastore. Some common use cases can be implemented as shown in the following table:

REST Url Pattern
Notes
/salesorders/<ordernumber>
Returns sales order information
/salesorders/<ordernumber>?info=complete
Returns complete sales order information
/salesorders/<ordernumber>/status
Returns sales order status
/salesorders?customerid=<customerid>
Returns purchase history of a customer
/salesorders?customerid=<customerid>&startdate=<startdate>&enddate=<enddate>
Returns purchase history of a customer within a date range

 


Figure 2: Consumers for “Read” Microservices (REST)

 

This pattern can also be used for “Restore Order” use case if the source needs to restore the data after it is purged.


Figure 3: Consumer for “Restore” Microservice (REST)

 

Up next: Order Search Service – Taking it beyond IBM Cloud

Join The Discussion

Your email address will not be published. Required fields are marked *