Hi everyone,

Current and proposed abstract design exist in the link below

https://imgur.com/a/48VALqF

I have a design/architecture question about implementing a middle-ware that:

  1. (Current plan) Authorization: Means if a user has the required role then he can continue to execute the logic in t he business layer; Otherwise he won’t and can get unauthorized exception.
  2. (Might) Authentication: Means if a user is authenticated then can continue execution; otherwise will be asked to login. But this likely will be done in the UI/Client layer.

You can have if/else in your business layer instead of having a middle-ware but (Some reasons):

  1. I don’t think this is a clean solution.
  2. The computation in the business layer can be expensive.
  3. Will become a Monolithic application.

The issue am facing in the database layer, and having it connected to the middle ware layer. So, any idea/recommendation about this?

  • Note (1): Proposed design is coming from Chain of Responsibility Design Pattern.
  • Note (2): This application might expend and re-implemented as SOA but the scope for now is a small application & single deployment.

Many thanks for the help,

xWarix

submitted by /u/xWarix
[link] [comments]