Cross-cutting concerns for an Enterprise Application
In this article, I would like to explain what is a Cross-cutting concern and what are cross-cutting concerns that must be considered as part of the system design. In this article, I would like to provide the core concerns that should be considered while designing the application. Please do note that additional cross-cutting concerns need to be applied based on the domain of the application.
Before delving into details, let us first understand what is a ‘ cross-cutting concern ‘ and why we must consider while building the enterprise applications.
Concern means “it is a behavior/functionality that we would like to implement in an application/ module”.
What is Cross-cutting-concern?
The cross-cutting concern is a concern that is applicable throughout the application and it affects the entire application.
Cross-Cutting concerns help you to manage the application level functionalities in a centralized location.
Below are the Cross-cutting concerns those are applicable for all the enterprise applications
- Security
- Performance
- Request Tracing
- Exception handling and Logging
- Monitoring
- Transaction Management (Distributed)
- Audit Log (Does not require in every application)
- Communication with External Systems (Does not require in every app)
Microservice Applications requires to take care of a few more additional concerns in addition to above-mentioned ones
- Centralize Configuration Management
- Distributed Request Tracing
- Service Registration & Discovery
- Service-to-service communication
- Message Idempotency (When dealing with message queues)
- Shared data / logic / libraries
Security
As part of the security, below are the few concepts you should look at
- Authentication / Authorization
- Data transport protocols/message handling
- Identity and Access Management
- Secure Accessibility of resources
- Data Security (Encryption / Hashing considerations)
- Security at REST and Transit
Performance
Below are the few areas/concepts you should look at
- Server-side Cache
- Http cache
- Static resources cache / CDN
- Browser cache
Also, please make sure you have the cache invalidation techniques in place to avoid serving the stale data to users.
Request Tracing
It is always good to trace the request from where it is originated and how it responded to the user. It is very helpful when debugging the application in production.
Exception handling and Logging
Centralized exception handling is one strategy to make sure our system is always responding in a positive note. Any unhandled exception can lead to crashing the entire application.
By centralizing all the exceptions into a datastore helps to identify the common errors that development needs to improve on and stability of a new feature when released to production.
Monitoring
The monitoring system helps you to identify the system behavior and issues that are occurring in the production. It helps you to detect the failures proactively and early to avoid system failures.
Transaction Management
Transaction management makes sure your application is following the ACID properties. By defining and adopting the transaction management strategy you can avoid data inconsistency issues.
Distributed Transaction Management is critical when dealing with Microservice systems.
Please let me know if you would like to add additional concerns in addition to the above-mentioned ones.
Hope you enjoyed the article. Please share your thoughts in the comments box below. Thank you for reading the article.