File Gateway (Roy)
How can service logic interact with legacy systems that can only share information by exchanging files?
Data records contained in flat files produced by a legacy system need to be processed individually by service logic, but legacy systems are not capable of directly invoking services. Conversely, service logic may need to produce information for the legacy system, but building file creation and transfer functionality into the service can result in an inflexible design.
Intermediary two-way file processing logic is positioned between the legacy system and the service.
For inbound data the file gateway processing logic can detect file drops and leverage available broker features to perform Data Model Transformation and Data Format Transformation. On the outbound side, this logic intercepts information produced by services and packages them (with possible transformation) into new or existing files for consumption by the legacy system.
The type of logic provided by this pattern is unsuitable when immediate replies are required by either service or legacy system. Deployment and governance of two-way file processing logic can further add to operational complexity and may require specialized administration skills.
PrinciplesService Loose Coupling
File gateway logic acts as a mediator between a service and a flat-file-based legacy system.