top of page

Decomposing A Restaurant Chain

  • Sam Martindale
  • Feb 25
  • 3 min read

Updated: Mar 20

OVERVIEW

The Client is a major fast food chain having thousands of corporately owned and franchised locations. The Client engaged with the Afterman Software team to redesign their legacy system of in-house and third-party software components, which were all integrated directly with one another. The initial business need was limited to the redesign of the client’s HR system, in order to allow for further integration with new SAAS products and suites. In the process of discovery and event storming, the team identified several distinct domains and opportunities for improvement within the client’s broader systems.



The HR domain was designed with a hub-and-spoke architectural

pattern, integrating data across all of the client's employee management platforms. The goal was to develop a system that was modern, cloud-

based, performant, easily maintainable, and extendable. Utilizing a message-based architecture that encompassed a half-dozen other high-level domains, the team accomplished dozens of other legacy and third-party software integrations.


CHALLENGES

The Client's legacy system was comprised of several disparate subsystems that linked directly into one another. The legacy HR solution was a customized off-the-shelf software suite (Lawson), which fed data directly to a dated and monolithic back office system written in SmallTalk, as well as Forefront Identity Manage (FIM)/Active Directory (AD), and TalentReef (recruiting solution). This design led to complex inter-system dependencies, cascading failures, frequent data loss, long recovery times, and late job completions. Many operations were achieved through daisy-chained batch jobs, which created many single points of failure and difficulty troubleshooting. The monolithic tendencies within the solution made changes tedious, and due to a lack of source control, automated deployments and documentation, upgrades were difficult. With a brittle system and a growing business, overnight jobs were starting to encroach upon business hours. Additionally, the business had decided to move from Lawson to UltiPro, but needed to keep Lawson live (in conjunction with UltiPro) for an additional two years. To further complicate matters, franchise owners had a request to use a third HR solution, Altametrics.


SOLUTION

The team applied Domain-Driven Design principles and techniques in order to decompose the legacy integrations into various business domains. With separate domains addressing the needs of various business owners, including human resources, payroll, corporate operations, franchise operations, marketing, product management, and inventory, the team was able to successfully decompose the monolithic legacy system into a suite of subsystems which could be much more easily managed, upgraded, and supported by the client on a day to day basis. Each domain was designed to be completely self-encapsulated, with full control over its own infrastructure and database. Keeping entirely self-contained domains and utilizing a robust message- based architecture, successfully achieves the promises of DDD: clear areas of responsibility, fast automated builds, and the ability to deploy individual domains rather than the entire system.

OUTCOME

A system that was once a complex, slow-moving monolith of interwoven operations and complex dependencies was decomposed into separate domains, bounded contexts, and autonomous components with clear separation of concerns. The client was left with a code base that was easy to follow, easily extendable, easily deployable, and easily upgraded.


After the new solution was in place, file import times decreased from days to minutes (in one case, from 5 days to 15 minutes). The implemented solution guaranteed lossless data importing, entire job/file failures were reduced to single record failures, daily maintenance and troubleshooting efforts decreased by over 12x, and improved monitoring and resiliency was introduced and implemented.


TECHNOLOGIES USED

✤C#

✤.NET Core 3.1

✤NServiceBus

✤ Microsoft Sql Server

✤Web Api

✤ MSMQ

✤Amazon SQS

✤ASP.NET MVC

✤NHibernate

✤StructureMap

✤UltiPro HR Software

✤Lawson HR Software

✤Altametrics HR Software

bottom of page