I am working on a project which have the below requirements:
- Each module can have a communication medium with other world as an API.
- A router will be there to communicate with each of the module via their APIs using CURL or anything else.
- Each request lands on router first there are few business rules to check the request and router will send them to their corresponding module.
- Router's business rules can be added further to check the request.
- Router can be accessible from APIs so keep its URL security as well.
- Router will recieve response from different modules and send back to the request source.
I have coded all the modules and need to have some ideas about router. How I need to code it so that I can implement it into my project.
I am facing the below problems while thinking about the same:
- How to manage the business rules databse or xml
- What will be the parameters for business rules for example. If a rule is like the request code have 6 dizits and start with AB then it should be sent to module A.
- I do not want to communicate with database or load any file for each request lands on router could it possible to load the rules at once the router is initialize and can process all the request lands.
- Router will be on a different server so is CURL will be fine to call qny specific module url or there is anything better.
Friends please give me some ideas so that I can have a Perfact router for my project.
Thanks in advanced.