Search code examples
c#domain-driven-designcqrslegacylegacy-database

CQRS for Legacy Systems


I am a beginner at CQRS and have some questions.

The background is that we having an legacy system from the 1980s. We want to implement a thin framework to be used by new applications that communicate with it.

Our idea is to use CQRS to implement this framework, but my question is how we should do it. The database and the underlying structures will not change.

The problem is that the system and the communication with it is quite slow. The protocols that is used is Telnet, FTP and some custom protocols.

  1. How should we think when we implement this?
  2. (Perhaps there is other technology than CQRS better suited for this?)

Solution

  • CQRS is used when designing an application model. It's not an afterthought that you can throw in. If you have a bicycle, adding some armour on it doesn't make it a tank. It needs to be designed as a tank.

    1. You don't.
    2. CQRS is a design principle, NOT a technology, library or framework. The best you can do is to create a facade (a new api) using the CQS (not CQRS) principle which will hide the legacy system that hopefully, some day will be rewritten. The new apps will know only about the facade.