Hi all,
I am in the process of refactoring 4 disparate software components that pretty much do the same thing into a single service (not a web service - necessarily or even likely). 3 are written in C++ while the last and most important is written in Java. The rest of the system is written in Java and therefore I will not be refactoring the C++ code and using JNI especially as the components currently written in C++ are scheduled to be replaced with Java components in a foreseeable future.
The component which is currently implemented in Java is actually a subcomponent of a larger component. Therefore when the larger/wrapping component wishes to use the subcomponent (being refactored into a service) it simply calls intra-process Java methods. If I refactor that subcomponent into a separate service the original wrapping component will lose the benefit it currently has of in process method invocation.
Should I then add a thread to the original/wrapping component to act as the service gateway or should I completely refactor out the code into a standalone service.
I hope that I have been sufficiently clear...