Legacy Mimic

Date:


When incrementally replacing legacy systems with new ones, it will not be
possible to cleanly isolate the new world from the old.
A Transitional Architecture requires that the new world provides data (or
some other interaction) in order to “keep the lights on”.

When this is the case the new system must meet some existing (often
implicit) contract, and so the new system must become a Legacy Mimic.

How It Works

Through exploring the legacy system’s technical architecture and target
architecture vision, and understanding the existing and to-be
business processes, seams can be discovered and exploited allowing the
problem to be broken up into parts.

The Legacy Mimic pattern is an enabler for these seams, and creates options
for, and is an implication of, different sequencing approaches.

A Legacy Mimic often realises the Anti-Corruption Layer pattern from Eric
Evans’s Domain Driven Design book.
There are similar forces at play as the Anti-Corruption Layer‘s intent is to:

Create an
isolating layer to provide clients with functionality in terms of their own
domain model. The layer talks to the other system through its existing
interface, requiring little or no modification to the other system.
Internally the layer translates in both directions as necessary between the
two models.

Similar to an Anti-Corruption Layer a Legacy Mimic’s implementation will typically use
Services, Adapters, Translators and Facades.

There are at least 2 types of mimics that we commonly see, and are most
easily explained in terms of providing or consuming services.

A Service Providing Mimic will encapsulate a new implementation behind a
legacy interface. Legacy components will be able to interact with it
using the legacy interface and not know that they are collaborating with
that new implementation.

A Service Consuming Mimic will collaborate with the legacy systems that
have not yet been replaced using their existing legacy interfaces. Again
this interaction will be transparent to the old system.

When to Use It

To further illustrate these different types of mimics this figure shows
a monolythic legacy system that supports 3 business processes – Sales,
Logistics and Business Performance.

Legacy Mimic - Before example

An option being considered is to use the Extract Value Streams for
the Logistics capability. Doing so could result in a transitional
architecture like:

Legacy Mimic - Example with mimic, acl and event interception

In order for the new logistics system to process the fulfillment of
sales, Event Interception is proposed. In this example the Event Interceptor
is an example of a Service Providing Mimic – it is conforming to the
legacy interface (consumption of legacy events).

In order for the Business Performance process to continue to function, again
the use of the Legacy Mimic pattern is proposed, but this time as a Service
Consuming Mimic. It will replicate the required logistics metrics into the
legacy reporting database (conforming to the legacy database’s schema and
semantics).

Both of these components will not endure in within the target architecture
of the system – they are transitional.

The existing Logistics Partner System must still be integrated with, so
an Anti-Corruption Layer is used by the new Logistics system. As this will
endure it is not considered a mimic (or transitional), but the creation
of the Anti-Corruption Layer is used in order that the domain model of the new
Logistics System is not compromised by the model used by that external
system.

Legacy Mimic - Sequence diagram with mimics and ACL

This page is part of:

Patterns of Legacy Displacement

Main Narrative Article

Patterns



Source link

Share post:

[tds_leads title_text="Subscribe" input_placeholder="Email address" btn_horiz_align="content-horiz-center" pp_checkbox="yes" pp_msg="SSd2ZSUyMHJlYWQlMjBhbmQlMjBhY2NlcHQlMjB0aGUlMjAlM0NhJTIwaHJlZiUzRCUyMiUyMyUyMiUzRVByaXZhY3klMjBQb2xpY3klM0MlMkZhJTNFLg==" f_title_font_family="653" f_title_font_size="eyJhbGwiOiIyNCIsInBvcnRyYWl0IjoiMjAiLCJsYW5kc2NhcGUiOiIyMiJ9" f_title_font_line_height="1" f_title_font_weight="700" f_title_font_spacing="-1" msg_composer="success" display="column" gap="10" input_padd="eyJhbGwiOiIxNXB4IDEwcHgiLCJsYW5kc2NhcGUiOiIxMnB4IDhweCIsInBvcnRyYWl0IjoiMTBweCA2cHgifQ==" input_border="1" btn_text="I want in" btn_tdicon="tdc-font-tdmp tdc-font-tdmp-arrow-right" btn_icon_size="eyJhbGwiOiIxOSIsImxhbmRzY2FwZSI6IjE3IiwicG9ydHJhaXQiOiIxNSJ9" btn_icon_space="eyJhbGwiOiI1IiwicG9ydHJhaXQiOiIzIn0=" btn_radius="3" input_radius="3" f_msg_font_family="653" f_msg_font_size="eyJhbGwiOiIxMyIsInBvcnRyYWl0IjoiMTIifQ==" f_msg_font_weight="600" f_msg_font_line_height="1.4" f_input_font_family="653" f_input_font_size="eyJhbGwiOiIxNCIsImxhbmRzY2FwZSI6IjEzIiwicG9ydHJhaXQiOiIxMiJ9" f_input_font_line_height="1.2" f_btn_font_family="653" f_input_font_weight="500" f_btn_font_size="eyJhbGwiOiIxMyIsImxhbmRzY2FwZSI6IjEyIiwicG9ydHJhaXQiOiIxMSJ9" f_btn_font_line_height="1.2" f_btn_font_weight="700" f_pp_font_family="653" f_pp_font_size="eyJhbGwiOiIxMyIsImxhbmRzY2FwZSI6IjEyIiwicG9ydHJhaXQiOiIxMSJ9" f_pp_font_line_height="1.2" pp_check_color="#000000" pp_check_color_a="#ec3535" pp_check_color_a_h="#c11f1f" f_btn_font_transform="uppercase" tdc_css="eyJhbGwiOnsibWFyZ2luLWJvdHRvbSI6IjQwIiwiZGlzcGxheSI6IiJ9LCJsYW5kc2NhcGUiOnsibWFyZ2luLWJvdHRvbSI6IjM1IiwiZGlzcGxheSI6IiJ9LCJsYW5kc2NhcGVfbWF4X3dpZHRoIjoxMTQwLCJsYW5kc2NhcGVfbWluX3dpZHRoIjoxMDE5LCJwb3J0cmFpdCI6eyJtYXJnaW4tYm90dG9tIjoiMzAiLCJkaXNwbGF5IjoiIn0sInBvcnRyYWl0X21heF93aWR0aCI6MTAxOCwicG9ydHJhaXRfbWluX3dpZHRoIjo3Njh9" msg_succ_radius="2" btn_bg="#ec3535" btn_bg_h="#c11f1f" title_space="eyJwb3J0cmFpdCI6IjEyIiwibGFuZHNjYXBlIjoiMTQiLCJhbGwiOiIxOCJ9" msg_space="eyJsYW5kc2NhcGUiOiIwIDAgMTJweCJ9" btn_padd="eyJsYW5kc2NhcGUiOiIxMiIsInBvcnRyYWl0IjoiMTBweCJ9" msg_padd="eyJwb3J0cmFpdCI6IjZweCAxMHB4In0="]
spot_imgspot_img

Popular

More like this
Related