Anti corruption layer

When a legacy system is rearchitected to a a modern system it typcaily may need to interact with legacy systems . To interact with the legacy system, the new application may need to support outdated communication protocols , apis. or other features .

This problem can be solved by anit corruption layer which allows the modern system to communicate with the legacy system through the anti corruption layer. The legacy system reamins unchanged and the modern system can avoid corrupting its design (eg supporting legacy communication protocol)

Side car/side kick pattern

 A service is split into two containers /process. One container may will handle the primary business logic where as the second container can handle common/cross cutting/supporting functions which is indepedent of business logic. This pattern is named Sidecar because it resembles a sidecar attached to a motorcycle.The sidecar also shares the same lifecycle as the parent application (created/dies along with the parent process). In otherwords Sidecars are supporting processes or services that are deployed with the primary application . Typically the side car would be deployed on the same host.

Common /supporting functions which can be handled using this pattern.

Advantages of side car pattern , rather than implement some thing as a library and run in the primary process space

Ambassador pattern

The ambassador pattern is a speical case of side car pattern where a sidecar process acts as a out of process, colocated proxy server which makes network requests for the main process (which may be a legacy process hence hard to modify) . The ambassador may be a single proxy for multiple cleints or proxy per client . (This choice for example would depend on load and fault isolation)  .The ambassador can be used for

note that legacy process can be hard to modify as