Archived

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

Does Ice support one client multithreadlly invocate the interfaces of the server?

Hi,
I did a test.
A client synchronously invocated the interface of the server.
In the client I started 3 threads to invocate the interfaces of the server,if one invocation result didn't come back,other invocations couldn't be executed.
I did synchronous invocation in the client.

I wonder if Ice support one client multithreadlly invocate the interfaces of the server?

Comments

  • benoit
    benoit Rennes, France
    Hi,

    Yes, it does. However, you have to make sure that the server thread pool has multiple threads if you want these requests to be executed concurrently by the server. By default the server thread pool has only one thread, try increasing the size of the pool with Ice.Server.ThreadPool.Size set to 5 for example (in the server configurtion file).

    Cheers,
    Benoit.
  • Hi,
    yes,I have set
    Ice.ThreadPool.Server.Size =10
    Ice.ThreadPool.Server.SizeMax =20
    Ice.ThreadPool.Server.SizeWarn =18

    I used one client,not many clients. This client started 3 threads to invocate the different interfaces of the server.But the server executed these invocations in order,that is,if one invocation didn't complete,other invocations can't be excute.

    I alse set
    VGProxy.ThreadPool.Size=10
    VGProxy.ThreadPool.SizeWarn=18
    VGProxy.ThreadPool.SizeMax=20

    Unfortunately,the server still executed these invocations in order。

    where did I make a mistake?

    thank you!
  • Hi,
    This problem was settled down by setting the property Ice.ThreadPool.Server.Size in my codes,but when I set the property in a config file, the property can't play the role.
  • Hi,
    This problem was settled down by setting the property Ice.ThreadPool.Server.Size in my codes,but when I set the property in a config file, the property can't play the role.

    I used the config file like the following:

    class MyServer : public Ice::Application
    {
    ...
    }

    int
    main(int argc, char* argv[])
    {
    MyServer app;
    return app.main(argc, argv, "config.server");
    }

    where did I make a mistake?

    thank you!
  • I settled the problem by invocating the
    void load(string file) interface.

    Thank you very much!