Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ecf-dev] Remote Service Tooling: Endpoint discovery and import

On 4/1/2015 2:05 PM, Wim Jongman wrote:
Nice Scott. Is there way to mock the remote services?

Not sure what exactly you mean by mocking a remote service but since both the client and the host distribution provider can be easily be created/customized, the answer is 'yes'.

From a RS consumer's point of view, what they already get when a remote service is imported is an ECF-dynamically-constructed proxy to the remote service...which typically then uses the distribution provider to marshal and send the method call to a remote host. It's technically trivial to use a alternative distribution provider (or to customize an existing provider) that simply turns around and uses a 'mock object' to implement the proxy, rather than distributes the call to a remote host (using some transport/protocol).

On the host side, it's also quite easy to provide a 'mock object' to export the remote service...meaning that the client distribution would still occur (i.e. the marshalling, etc), but when the call reached the host it would actually be implemented by the mock object.

So in both senses...i.e. a 'mock object' for the consumer/proxy, or a 'mock object' for the host implementation, the answer is 'yes', there is a way to mock remote services.

Scott




Back to the top