Currently we are working on a project and we are in design and architecture phase of the project following are main points of projects.
- There are switches which are generating real time data
- We have two components in to be made in Java/Java EE, call it CompA and CompB
- CompA apply some process based on input record from switch without contacting to any databases, CompA does not have DB access.
- CompB takes process record of CompA and apply processing also, this involves business database
- CompA and CompB have multiple instances in system for scalability and fault tolerance.
- Record is text record having multiple fields
- Record is transactional , On record is considered processed if it is process from both CompA and CompB , other wise it will be roll backed and resend again
Now the problem is what is best way for communication between CompA adn Comp B
One way is
1. CompA--------> CompB 2. CompA-------->Messaging Server(JMS)------> CompB
Requirment: There will be more than one CompA and CompB is the system and if any component fails it load will be shared by other peers e.g if CompA fails its load will be shared by other CompA instances in the system. For that we are going for second option with JMS so that CompA is not tightly bound with CompB. But as new Component (Messaging Server)is introduced this may cause performance degradation as the record processing is transactional the system is real time.
Your suggestions and expert advices will be highly appriciated