Considerations

The following considerations should be taken into account while implementing this pattern:

  • Cyclomatic complexity: Cyclomatic complexity is a measure of complexity of a program. This metric measures independent paths through a program source code. An independent path is a path that has not been traversed before in a code execution flow. It is important to ensure that the cyclomatic complexity of the Service Façade is low. This will guarantee maintainability and readability of the code.
  • Transactions: While integrating Microservices, it's important to ensure transactional integrity. If a business use case terminates before completion, compensatory transactions need to be executed by the Service Façade.
  • Another layer of abstraction: Adding layers to a system architecture results in some side effects such as increase in latency. The maintainability and testability of the code will also be impacted with introduction of additional components.
  • Exception handling: As the consuming application interacts with the façade instead of the service directly, it must cater for scenarios where the backend Microservice is unavailable. The Service Façade will need to capture any service exceptions and relay it to the client.
  • Logging: All exceptions and traces should be logged in the same central location as the application by the Service Façade to ensure better trouble shooting capabilities.
  • Abstraction: Implementation or deployment details of the Microservice should be abstracted from the client.
  • Configurable: The deployment location of the Microservice should be configurable and should have the ability to be updated without code re-compilation.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset