Archived

This forum has been archived. Please start a new discussion on GitHub.

fast response of a twoway after a huge batch

I have a lot of oneway invocation and some twoway invocation.
If I invoke 1000 oneways in one batch (each operation takes 100ms) and immediately after the batch flushing I invoke a twoway operation. The response for the twoway takes several seconds instead of few ms, because the batch is processed first.

I tryed to run 2 endpoints, one on port 10000 for the oneway invocations and one on port 1005 for the twoway operation. Even with 2 endpoints the behavier is the same like with one endpoint.

Any ideas how to solve my problem?

Thanks

Comments

  • matthew
    matthew NL, Canada
    How many threads are in the thread pool on the server side when you used multiple endpoints? By default this size is one, and the thread pool is shared by the two endpoints. Therefore only one request can be dispatched at one time by the pool. I recommend reading the Ice manual for more information.
  • marc
    marc Florida
    As Matthew says, you need at least two threads in the server side thread pool. All requests from a batch are serialized, which means that if you have only one thread, your server will first process the 1000 batch requests before it can process the twoway request. The number of endpoints doesn't matter as they share the thread pool (except if you use different endpoints for different object adapters, and configure each of these adapters to have their own thread pools).