Page 2 of 2 FirstFirst 1 2
Results 16 to 17 of 17

Thread: How to improve performance of thread-per-connection?

  1. #16
    marc's Avatar
    marc is offline ZeroC Staff
    Name: Marc Laukien
    Organization: ZeroC, Inc.
    Project: The Internet Communications Engine
    Join Date
    Feb 2003
    Location
    Florida
    Posts
    1,860
    Quote Originally Posted by bartley
    That fixes it. That is, the video never appears delayed anymore in the client. But, if you bang away on the keys in the client (sending lots of drive commands in a short amount of time), enough commands fill up (presumably since Ice is transparently delaying commands, as it does in the thread pool model when no more threads are available in the pool?) that the relay starts throwing timeout exceptions back to the client (though the commands do eventually get executed on the robot).
    I'm not sure what you mean with "transparently delaying commands". Do you mean that the only dispatch thread is busy? If so, then this is expected for the thread-per-connection model, since your server can only dispatch one request at a time (since there is only one thread with one connection).

    You can also configure Glacier2 to delay requests, but this is purely a configuration choice to avoid having rogue clients flood your server (and to allow for oneway batching--see the Ice manual for details).

    Quote Originally Posted by bartley
    So, that's definitely an improvement, thanks. However, it's not really an ideal, long-term solution for our architecture since it's conceivable that the robot might need to make repeating, two-way calls on the client at regular intervals (i.e. where it really does needs a return value).

    Is there no other way to make a thread-per-connection client talk to Glacier2 in a duplex kinda way? Would Joe's suggestion of two communicators work? Maybe one for incoming traffic (calls from the GUI client and responses from it) and one for outgoing traffic (calls to the GUI client and responses to it)? Any other possibilities?
    No, Glacier2 requires bi-directional connections, otherwise it wouldn't be any good for firewall traversal.

    Multiple communicators with multiple sessions (one per communicator) would work. You could also establish multiple sessions with a single communicator, but the setup for this is probably more complex than just using multiple communicators.

  2. #17
    bartley is offline Registered User
    Name: Chris Bartley
    Organization: Carnegie Mellon University Robotics Institute
    Project: The Telepresence Robot Kit (TeRK)
    Join Date
    Dec 2005
    Posts
    52
    I'm not sure what you mean with "transparently delaying commands". Do you mean that the only dispatch thread is busy? If so, then this is expected for the thread-per-connection model, since your server can only dispatch one request at a time (since there is only one thread with one connection).
    Yeah, sorry, that's what I meant. By questioning it, I was just trying to show that it's likely I don't know what the heck I'm talking about and wasn't entirely sure that that's where the buffering is occurring. I stole the "transparently delaying commands" phrase from the Ice manual's discussion of the thread pool model (p. 776):

    "If a thread pool is exhausted because all threads are currently dispatching a request, additional incoming requests are transparently delayed until a request completes and relinquishes its thread"
    I was just wondering if the buffering is happening for the same reason. Sounds like it is, thanks.

    Multiple communicators with multiple sessions (one per communicator) would work. You could also establish multiple sessions with a single communicator, but the setup for this is probably more complex than just using multiple communicators.
    Ok, thanks. Both sound more complicated than what we need for now. But good to know that it's an option.

    Thanks again for all your help. And sorry if I didn't sound appropriately appreciative in my last post. Your one-way proxy solution for the video really is a huge improvement over what we had! Many thanks!

    best,

    chris

Page 2 of 2 FirstFirst 1 2

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. thread pool performance (500+ clients)
    By Andrew S in forum Help Center
    Replies: 6
    Last Post: 05-11-2008, 11:01 AM
  2. about performance
    By fengxb in forum Help Center
    Replies: 7
    Last Post: 01-12-2007, 05:55 AM
  3. Replies: 1
    Last Post: 06-06-2005, 10:00 PM
  4. have any improve in distribute deployment?
    By soloman817 in forum Comments
    Replies: 2
    Last Post: 01-05-2005, 11:07 PM
  5. Number of connection in current thread
    By Dmitriy in forum Help Center
    Replies: 1
    Last Post: 06-29-2004, 09:17 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •