Case: Lokad Salescast

by Rinat Abdullin, February 2012.

About

Lokad Salescast is a cloud integration engine capable of processing millions of product references, tailored for large retail networks.

Features of Lokad Salescast

  • Runs on Windows Azure
  • Multi-tenant.
  • Tenant-specific ad-hoc integration logic.
  • Full audit logs.
  • Auto detection of 3rd party business apps.

Story

Lokad Salescast is the first CQRS-based application that was developed at Lokad. Core principles and experience were extracted into Lokad.CQRS for further reuse in other Lokad projects.

case-sc-01.png

CQRS concepts provided reliable way to deliver cloud-based system that featured both rich feature logic and rather decent maintenance experience. The latter was later enhanced to reduce development overhead even further by introducing self-management and self-recovery features.

Domain logic was implemented as chain of command handlers that were performing various integration tasks in sequence: starting from download of data from customer's system, forecast production and delivery of the final report to the customer (or upload back to his system).

case-sc-02.png

Plugin model allowed to extend this functionality with isolated adapters that provided support for in-house solutions and new products.

Domain models were anemic with CRUD-style persistence in SQL Azure via NHibernate and events published outside; Domain-Driven Design was not used. A lot of lessons were learned since then about the inherent problems of such setup.

Persistent read models (views) were initially stored in SQL Azure, but soon were migrated to plain cloud blobs. This immensely reduced development friction. Actual binary data was persisted in Azure Blobs from the very start.

User Interface for customers was implemented as a stateless (almost) Web Application with ASP.NET MVC 2. Problems of user experience in eventually consistent world had to be addressed at case-by-case basis (we learned a lot here).

Leverage of Windows Azure Cloud allowed to support almost-infinite multi-tenancy and auto-scaling. It was extremely helpful to react quickly to market opportunities and customer requests. These concepts were later pushed further in other projects based on Lokad.CQRS concepts.

Concept of maintenance console (represented as Audit in open source Lokad.CQRS Sample Project) has proven to be extremely helpful in debugging, resolving unexpected integration problems and performing general maintenance. Event Sourcing (in form of audit log that is used for analysis and projection replays) was the biggest advantage in this project.

case-sc-03.png

Currently Salescast is among the oldest CQRS projects at Lokad (running Lokad.CQRS gen 2.0) and has largest development friction among them. On average, it requires almost 1 full-time developer to do maintenance and implementation of new features.

Testimonials for Salescast

Lokad improved the accuracy of our planning process significantly. The immediate impact was a stock reduction of almost 1 million EUR at a monthly cost of 150 EUR.

Thomas Bremont, Head of Supply Chain Bizline

Our business has been doubling every year. Great customer service is one of the keys to our success. But maintaining outstanding customer service while undergoing such growth is becoming a challenge and it requires the best demand forecasting that the market can offer. Classical solutions require too much manpower and don't scale well over hundreds of thousands of products. Lokad and Windows Azure were exactly the solution my business needed.

Pierre-Noël Luiggi, CEO of Oscaro

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License