Modernising a Legacy Dispatch System Without Stopping Operations

Architecture in Practice: ExampleCo Logistics

7–11 minutes
1,748 words

About ExampleCo Logistics

ExampleCo is a fictional company used throughout the Architecture in Practice series. Each case study stands alone and focuses on a different business unit.

ExampleCo Logistics, or just ExampleCo from here on, is a regional distribution business with around 120 staff, 45 vehicles and two depots in the South East of England. It delivers pallets and parcels for retailers and manufacturers, six days a week. Order intake, planning, dispatch and proof of delivery all run through an in-house system built on .NET and SQL Server about fifteen years ago.

Why it matters for this case study: the dispatch system is the heart of the operation. It can’t be switched off for a weekend while something new goes in, so any change has to happen while the vehicles keep moving.

New to TOGAF or ArchiMate? See TOGAF ADM in Brief and the ArchiMate Notation Key.

In brief

  • The problem: the dispatch system runs on unsupported platforms, depends on one developer, and can’t provide the live tracking and booking integration that ExampleCo’s largest customers now expect.
  • The approach: a tailored use of the TOGAF Architecture Development Method (ADM). A short vision and a light baseline, with most of the effort on options, transition architectures and migration planning.
  • The outcome: an 18-month roadmap in three stages. Wrap the existing system, move capabilities out one at a time, and retire the old core only when nothing depends on it. No big-bang switchover.

The rest of this article walks through how that plan was reached, with the architecture views behind it.

The problem

The system is known internally as DMS (Dispatch Management System). Planners at both depots use a Windows desktop application, backed by a SQL Server database on a single server in the main depot. Drivers carry paper delivery notes, which are scanned in at the end of each day. Customers who want to know where their delivery is phone or email customer service, who look it up in DMS.

Several pressures arrived at once:

  • Unsupported platforms. The server runs Windows Server 2012 R2 and the database runs SQL Server 2012. Both are past the end of extended support, so they no longer receive security updates.
  • Key-person dependency. One long-standing contractor understands most of the code, and much of the business logic sits in stored procedures that nobody else has documented.
  • Customer demands. ExampleCo’s two largest customers want to book deliveries through an API and see live delivery status, including electronic proof of delivery. Both have made it a condition of renewing their contracts next year.
  • Slow change. Small changes take weeks, so planners have built spreadsheets alongside DMS to work around its limits.

A few years earlier, ExampleCo evaluated an off-the-shelf transport management system and abandoned it part-way through. It couldn’t handle ExampleCo’s customer-specific pricing and multi-drop rules, which turned out to be far more complex than anyone had written down. That earlier attempt shaped much of what followed.

Shaping the approach

The TOGAF ADM is designed to be tailored, and applying every phase in full to a 120-person business would be ceremony for its own sake. The skill is in deciding where the effort should go.

Here, the main risks were in how to change, not what the end state should be. So the effort went into Phases E and F, with the other phases kept proportionate:

PhaseDepthHow it was used here
PreliminaryLightAgree principles and who makes decisions (managing director, operations director, IT lead)
A – Architecture VisionShortDrivers, goals, scope and a one-paragraph vision
B, C, D – Business, Information Systems, TechnologyLightBaseline mapped only to the depth needed; target described at the level of capabilities and components
E – Opportunities and SolutionsMain focusOptions compared, with buy and build decided per capability
F – Migration PlanningMain focusTransition architectures and work packages
G – Implementation GovernanceLightDecision records and a monthly review
H – Architecture Change ManagementLaterRevisit the plan after each transition
Requirements ManagementOngoingCustomer integration requirements and non-functional requirements

Architecture vision (Phase A)

The vision starts with why change is needed at all. Figure 1 maps the drivers to the goals they create, and the architecture principles that guide every later decision.

Figure 1 – Motivation view: drivers, goals and principles. ArchiMate diagrams on this site are explained in the ArchiMate Notation Key.

The principles matter most in this case. “Keep operations running” rules out a big-bang switchover before any option is even considered. “Understand before replacing” is a direct lesson from the earlier attempt.

The agreed vision statement:

Within 18 months, ExampleCo’s dispatch operation runs on supported platforms, offers customers live status and booking through an API, and no longer depends on one person to change it, without losing a day of operations.

Where things stand (Phases B to D)

The baseline was mapped only as deeply as the decisions needed. The most useful finding was how much DMS does beyond dispatch. It holds customer-specific pricing, sequences multi-drop routes, applies dozens of customer rules, and produces a nightly CSV export for the accounts package. That export is the only integration it has.

Figures 2a and 2b show the baseline and the target, across the business, application and technology layers.

Figure 2a – Baseline architecture across the business, application and technology layers
Figure 2b – Target architecture across the business, application and technology layers

A gap analysis then compares the two, capability by capability:

CapabilityBaselineTargetGap
Order intakeEmail and phone, keyed in by customer serviceBooking API and customer portalNew
Delivery trackingPhone calls to customer serviceLive status through the API and portalNew
Proof of deliveryPaper notes, scanned at end of dayDriver app with electronic proof of deliveryNew
Pricing and customer rulesStored procedures and desktop code in DMSDocumented rules in a dispatch serviceExtract and refactor
Route planningDMS plus planner spreadsheetsDispatch service with a web interface for plannersRefactor
Finance integrationNightly CSV exportEvents sent to the accounts package as they happenImprove
PlatformWindows Server 2012 R2 and SQL Server 2012, on premisesSupported versions, cloud hostedMigrate

Options (Phase E)

Four options were compared:

OptionStrengthsWeaknesses
Leave and secureLowest cost and disruptionDoesn’t meet the customer requirements, and still depends on one person
Replace with an off-the-shelf systemProven product, supplier supportAlready failed once on pricing and rules; high cut-over risk
Rebuild from scratchFully tailoredLongest and riskiest; nothing delivered before the contract renewals
Incremental modernisationDelivers customer features early; risk spread over timeNeeds discipline to finish, or the old and new run side by side indefinitely

Incremental modernisation was chosen, with a buy-or-build decision made for each capability rather than for the system as a whole:

  • Buy the driver app and electronic proof of delivery. This is a commodity capability, and good products exist.
  • Build the integration API and the dispatch service. Pricing and customer rules are where ExampleCo differs from its competitors.
  • Keep the existing DMS logic running until each part is understood and replaced.

This choice doesn’t rule out an off-the-shelf system in future. Once the rules are documented and sit behind a clean API, replacing the dispatch service becomes a much smaller and safer decision. The incremental route keeps that option open.

Planning the move (Phase F)

This is where the Strangler Fig pattern becomes an architecture plan, not just a coding technique. Each stage is a transition architecture: a stable state the business could stop at if it needed to, with value delivered at every step.

Figure 3 – Migration roadmap: transition architectures (plateaus) and the work packages that realise them

Transition 1 – Stabilise and wrap (months 0–6). Move the database and application to supported versions in the cloud, without changing how DMS works. Put an API layer in front of the existing database, using the existing stored procedures so the business rules stay exactly as they are. Start documenting those rules, with a second developer pairing with the contractor. Result: supported platforms, customers can see live delivery status, and less reliance on one person.

Transition 2 – Extend at the edges (months 6–12). Introduce the driver app and electronic proof of delivery, connected through the API. Open booking to customers through the API and a simple portal. Replace the nightly CSV with events sent to the accounts package as they happen. Result: the customer requirements are met ahead of the contract renewals.

Transition 3 – Move the core (months 12–18). Move pricing, customer rules and route planning out of DMS into a new dispatch service behind the same API. Move planners to a web interface. Retire the desktop application and the old database schema. Result: DMS is fully retired, and nothing that depends on the API notices the switch.

Because every new system talks to the API rather than the database, each piece can move behind it without the others noticing. Running old and new pricing logic side by side, and comparing their results before switching over (a parallel run), provides a safety check where errors would be most costly.

Keeping it on track (Phases G and H)

Governance was kept in proportion to the size of the business:

  • Architecture Decision Records capture each significant choice and the reasoning behind it, for example “new systems access dispatch data only through the API”.
  • A monthly review with the managing director, operations director and IT lead checks progress against the principles and the transition plan.
  • A review at each transition decides whether to continue as planned, adjust the next stage, or stop at a stable point.

What this case study shows

  • Tailor the method to the risk. The effort went into options and migration planning, because that’s where this problem was hard.
  • Understand before replacing. The earlier failed attempt showed how much hidden logic a legacy system holds. Documenting it became part of the plan, not an afterthought.
  • Buy and build are per-capability decisions. Commodity capabilities were bought, and differentiating ones were built.
  • Transition architectures make change stoppable. Each stage leaves the business in a stable, supported state, with value delivered along the way.

Related reading

Reference

Articles

  • Legacy Systems: Replace, Rebuild or Leave Well Alone?
  • The Key-Person Risk Nobody Wants to Talk About
  • Integration Hell

Adrian Ashdown

Solutions Architect working with .NET, SQL Server and cloud platforms. I write about architecture decisions and the trade-offs behind them.

More articles