Results 1 to 2 of 2

Thread: Is the "thread per connection" model the only choice in ICE?

  1. #1
    OrNot is offline Registered User
    Name: Bin.Li
    Organization: GE Healthcare
    Project: Enterprise solution
    Join Date
    Jun 2005
    Location
    Shanghai
    Posts
    181

    Is the "thread per connection" model the only choice in ICE?

    In the network circumstances, a server often has to deal with vast number of clients simultaneously. D.Schmidt discussed this situation in his <<Pattern-Oriented Software Architecture, Patterns for Concurrent and
    Networked Objects, Volume 2>>:

    One way to implement a logging server is to use some type of multi-threading model. For example, the server could use a 'thread-per-connection' model that allocates a dedicated thread of control for each connection and processes logging records as they arrive from clients. Using multi-threading can incur the following liabilities, however:
    § Threading may be inefficient and non-scalable due to context switching,
    synchronization, and data movement among CPUs.
    § Threading may require the use of complex concurrency control schemes throughout
    server code.
    § Threading is not available on all operating systems, nor do all operating systems provide portable threading semantics.
    § A concurrent server may be better optimized by aligning its threading strategy to available resources, such as the number of CPUs, rather than to the number of clients is services concurrently.
    These drawbacks can make multi-threading an inefficient and overly-complex solution for developing a logging server. To ensure adequate quality of service for all connected clients,however, a logging server must handle requests efficiently and fairly. In particular, it should
    not service just one client and starve the others.


    He then proposed serveral design patterns to give the alternative choices such as reactor,proactor ect. In Ice,
    if can I applie these design patterns ,say, reactor, to demultiplx the imcoming netwrok connections? I mean, if is the "thread per connection" model the only choice in ICE? If so, How dose the ICE solve the problems decribled by D.Schmidt?

    In our current work, we have to construct a server to cope with at least 500 clients. Except the problem of "the thread per connection" ,which still confueses me, I think ICE is a very good choice to us.

    Hope getting some helps.
    Thank you for your time,

    OrNot

  2. #2
    matthew's Avatar
    matthew is offline ZeroC Staff
    Name: Matthew Newhook
    Organization: ZeroC, Inc.
    Project: Internet Communications Engine
    Join Date
    Feb 2003
    Location
    NL, Canada
    Posts
    1,458
    No, thread per connection is not the only choice. In fact, for the vast majority of applications using thread per connection this would be a very poor choice! Most applications should use the thread pool concurrency model, which is the default. You should read the manual which explains this in detail.

    Regards, Matthew

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Exception in thread "Ice.ThreadPool.Server-0"
    By zhengxing in forum Help Center
    Replies: 1
    Last Post: 09-29-2010, 02:35 AM
  2. Replies: 1
    Last Post: 04-13-2010, 11:04 PM
  3. Replies: 1
    Last Post: 06-09-2009, 10:53 PM
  4. Replies: 1
    Last Post: 01-28-2009, 06:15 AM
  5. Replies: 4
    Last Post: 10-26-2006, 11:23 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
  •