SAP Commerce Cloud : Build your own Quick Delivery and Serviceability system on Azure cloud

SAP Commerce

SAP commerce is a leading e-commerce technology platform.Big names in business use SAP Commerce, including internationally renowned and recognised brands and businesses.SAP Commerce is ideal because it does not limit businesses to only a single channel. In this article I am going to cover how we can build our own micro services based Delivery and Serviceability system on azure cloud and integrate that with SAP commerce cloud. This delivery and serviceability system is ideal for the business those wants quick delivery of products ( like grocery, vegetables and cooked food from restaurants).

1. System can support more than million delivery requests in a days and x10 search requests.
2. Search results should come along with serviceability and SLA for search should be <500 ms along with expected delivery time.
3. No data loss for transactional data.

Azure Container Instances: Run serviceability workloads in Azure Container Instances (ACI).

Azure Kubernetes Service: Delivery engine, warehouse locator, tracking service etc will be built as container applications. And they will run on AKS. Here one can use its own kubernetes instance.

Kafka Streams : Used to achieve high throughput in streaming events between read and write repositories of order management, sending real time or batch events to recommendation engine and publishing approved catalog and products(menu and foods) to elastic index.

Apache Spark/Beam : For running map-reduce jobs to select delivery agent for efficient delivery and generate recommendations based on continuous streams of user activity, order activity, pricing and promo changes, etc.

Aero Spike DB : To support high throughput in read and write in real time.

Redis Cache : To store the location and segments information of all the warehouses. As this is very frequently read and non-changing data, we had chose to setup this in Redis to avoid multiple DB calls.

Azure SQL Server : To Store all transactional data.

MongoDB : To store serviceability data.

IOT hub: Get the realtime delivery agent status. It will fetch the real time data and propagate to delivery tracking service.

Graph: The graph is an immutable structure, and it is built in a central place periodically and propagated to all the app machines. SAP Commerce load this structure in memory and serve the user path queries using it. Here we opted for pull-based clients deployed in each node serving the data instead of a push-based notification mechanism as it might be lossy and would require reconciliation.

  1. All the Serviceability data ingestions are persisted to the Serviceability Document store.
  2. The serviceability change processor builds the graph. It periodically

Fetches all data from the source of truth and creates a graph (or) fetches the ingestions that have been done since the last graph build to the present and creates a new version of the graph by applying these ingestions to the previous graph.

  • Serializes the new graph and writes to disk.
  • Compresses the graph files written to the disk using the lzma algorithm and uploads the compressed file to the Object store with a new version number.

3. The apps periodically poll the Object store to check if there is a new version of the graph, and whenever they detect a new version, they download the compressed file, decompress it, load it into memory, and keep it as a passive graph object.

4. All the apps would do an atomic swap of an old graph with a new graph version at a specific time based on their clocks to avoid serviceability inconsistencies being displayed to the customer.

  1. SAP OMS ( or any other OMS system) will trigger the delivery engine.
  2. It will identified nearest warehouse location and push an event in Kafka stream along with warehouse coordinates and shipment address coordinates.
  3. Spark data pipe line pull this data and combine this with delivery agent current location and send notifications to possible delivery agents.
  4. Once delivery agents confirms the delivery it will fetch the best possible routes based on MAP api.
  5. Once delivery is done, it will update the same shipment database and delivery tracking system.




I am a passionate data scientist who has broad and in-depth programming, statistics, mathematics, engineering and physics skills .

Love podcasts or audiobooks? Learn on the go with our new app.

How to Pass Spring Professional Certification v5.0 (VMware EDU-1202) Exam

Snowball Weekly Newsletter — 14/04/2022

Docker — The Easy Way

[Flutter] How to get app-packages for external install for ios (.app, .ipa) and android (.apk)

How to setup OpenGL on MinGW-w64 in Windows 10 (64 bits)

A few tips on dealing with impediments

Value Error: unsupported pickle protocol 5

Helm Chart for Ansible

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store


I am a passionate data scientist who has broad and in-depth programming, statistics, mathematics, engineering and physics skills .

More from Medium

Build Cloud agnostic Infra. Setup network connectivity between multi cloud — Azure and AWS

The Google One VPN for Android just got a little safer

Amazon Virtual Private Cloud (VPC)

Guiding principles for end-to-end hybrid cloud security and compliance to mitigate risk