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

russulerussule Member Lei ChunOrganization: www.channelsoft.com.cnProject: Conf ✭✭
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

  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    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.
  • matthewmatthew NL, CanadaMember Matthew NewhookOrganization: ZeroC, Inc.Project: Internet Communications Engine ✭✭✭
  • russulerussule Member Lei ChunOrganization: www.channelsoft.com.cnProject: Conf ✭✭
    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!
  • russulerussule Member Lei ChunOrganization: www.channelsoft.com.cnProject: Conf ✭✭
    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.
  • russulerussule Member Lei ChunOrganization: www.channelsoft.com.cnProject: Conf ✭✭
    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!
  • russulerussule Member Lei ChunOrganization: www.channelsoft.com.cnProject: Conf ✭✭
    I settled the problem by invocating the
    void load(string file) interface.

    Thank you very much!
Sign In or Register to comment.