|Remote service calls handled by one thread when using ecf generic? [message #558830]
||Tue, 14 September 2010 14:54
| Franky Bridelance
Registered: September 2010
While using ecf generic with ECF remote services (OSGi 4.2 spec) I've encountered some limitation on how remote service calls are handled. Maybe the limitation is known or maybe I'm just not using the remote services the right way...
First some context:
- I have a server on which a number of remote services are registered within one ecf generic container (they all have the same containerFactoryArgs property value, e.g. ecftcp://localhost:8500/server)
- I have two clients connecting to the server container and making calls to the remote services
- zoodiscovery is used for service discovery (but I don't think it's relevant info here)
What I see is that the call to a remote service on one client will block the call to another remote service on the other client.
After some stepping into the ECF generic code I found out following behaviour of ecf generic:
- On the server, there's one thread for each client connected to the server to handle incoming requests. So here incoming calls are in parallel
- If the incoming request is a method call on a remote service the incoming request is forwarded (passing some other classes first) to the shared object wrapper being the ecf container containing the remote services (SOWrapper.deliverSharedObjectMessage). Till here calls from the two clients are still concurrent.
- the shared object message is then put in a queue and is handled by the one and only thread attached to the SOWrapper instance. From here all clients calls from any client to any remote service (within the same ecf container) are serialized.
Is this a known limitation of the ecf generic protocol or do I need to remote the services in a different way?
I was thinking to put each remote service in its own container (but using the same IP address and port, e.g. serviceA in container ecftcp://localhost:8500/serviceA, serviceB in ecftcp://localhost:8500/serviceB,...) but this solves the problem only partially: calls to the same remote service would still be serialized in the SOWrapper.
Powered by FUDForum
. Page generated in 0.05549 seconds