I need to build a middle layer on Java environment to tran开发者_StackOverflowsform the data that is coming from 5-6 different systems to one model. This design should be extensible if we add new system. Any suggestions?
Plain old Adapter design pattern is what you're looking for.
I'm not a Java guy myself, but from an architectural point of view (and depending on how much of an investment you can make) an Enterprise Service Bus (ESB) might be helpful for you to integrate from those diverse sources.
You should be able to find platform specific examples of how to implement this kind of architecture. it's designed to help integrate from different technology stacks and provides a messaging implementation. It might be overkill, depending on how much data/how different the sources are/what the likelihood is that you'll need to expand etc etc.
You'd need to provide a bit more info but perhaps this points you in the right direction?
You would put a service -- such as a Web service -- on top of that model, and allow writing to the model only via the service. Ergo, there is only one place where data gets written to the model, and only one place to update when the internals of the model change.
You can build services or adapters which take data from the 6 sources (so that would be 6 adapters), which all talk to that central service for writing to the model. The logic for interpreting the data from the 6 sources is thus spread over the 6 adapters, and you have a nice separation of concerns.
精彩评论