Do you literally mean remotely? How to work in a different environment with different accessibility characteristics? With network overhead?
Assuming yes, my first step would be to take the service approach, to postpone the call technology for a moment. Just consider the design and meaning of your services. You know that they are compared to expensive calls, so small busy interfaces are usually bad. You know that a service system can fail between calls, so you can use stateless services. You may need to repeat requests after a failure, so you can approve idempotent service projects.
Then consider accessibility relationships. Can your client work without a remote system. In some cases, you simply cannot progress if the remote system is unavailable (for example, you cannot turn on an employee if you cannot get into the personnel management system), in other cases you can adopt the “fire and story” -me-later philosophy; process request and response queues later.
If there is availability, then simply exposing the synchronous interface seems appropriate. You can do this with SLSB EJB if all this is Java EE, it works. I tend to generalize, expecting that if my services are useful, non-Java EE clients might also want them. Therefore, SOAP (or REST) tends to be useful. Adding a web service interface to your SLSB these days is pretty trivial.
But my pet theory is that any large enough IT system needs aynch connections: you need to separate accessibility restrictions. So I would like to look for a JMS-style relationship. The appearance of the MDB in front of your services, or SOAP / JMS, is not so difficult to do. This approach tends to emphasize failure design problems that are likely to be hidden anyway; JMS tends to make you think, “Suppose I don't get an answer? Suppose my answer is delayed?”
djna
source share