Results 1 to 4 of 4

Thread: Ice concurrency load handling...

  1. #1
    raulgd's Avatar
    raulgd is offline Registered User
    Name: Raul Guerrero
    Organization: Jimi
    Project: RI of mexican standard of Electronic Health Record
    Join Date
    Mar 2011
    Location
    Queretaro, Mexico
    Posts
    15

    Ice concurrency load handling...

    Hi all,

    I'm sorry if this post sounds basic, but I'm a newbie so bear with me please.

    I've currently done some C++ server and client side tests with ICE and it works great, also I'm currently building an ICE java server and I'll start some tests as well. The thing is that, I've developed some servers before, and for large load handling we've had to use some connection concurrency patterns like one-thread-per-connection, async I/O, reactor pattern, proactor pattern, etc. But, how do I handle large concurrent calls from Ice?

    My app only serves atomic operations, that means, it doesn't need any special thread sync, shared thread resources or complex stuff like that.

    I've searched the forum and I've read that Ice uses thread pools, but I haven't found any details on these two points:

    1 .- What could be the actual request capacity of an Ice Server? I know this is relative to hardware, OS, etc, but when programming a server, do I need to handle my own thread pool, async i/o, etc?

    2 .- There is so much documentation about Ice that now my head hurts, I haven't found actual practical ways of handling large user loads.

    Do I need to build my own load handling strategy? does Ice automatically handles a thread pool so I don't have to worry about load handling?

    How do I actually build, let's say, an Ice java server that could handle lots of user requests? For putting a more concrete example, on Java you have containers that handle the loads, requests, threads, etc. for you, like glassfish for EJBs. Is there a way on Ice that I only develop actual business logic and let Ice handle all the low level thread pooling, connection handling, etc. for me?

    I'm starting to check out IceBox and IceGrid, but there is so much stuff on the documentation that I'm confused on what to actually use.

    Thanks!
    Raul Guerrero
    Software developer
    Jimi.mx

  2. #2
    xdm's Avatar
    xdm
    xdm is offline ZeroC Staff
    Name: Jose Gutierrez de la Concha
    Organization: ZeroC, Inc.
    Project: Ice Developer
    Join Date
    Sep 2003
    Location
    La Coruņa, Spain
    Posts
    588
    Hi Raul,

    1 .- What could be the actual request capacity of an Ice Server? I know this is relative to hardware, OS, etc, but when programming a server, do I need to handle my own thread pool, async i/o, etc?
    See our performance white paper

    2 .- There is so much documentation about Ice that now my head hurts, I haven't found actual practical ways of handling large user loads.

    Do I need to build my own load handling strategy? does Ice automatically handles a thread pool so I don't have to worry about load handling?
    A simple Ice server will be able to handle large user loads, Ice handles the thread pool for you, but you can configure it for better suite your needs, see 32.10 The Ice Threading Model

    If you need to scale beyond a single server, you can use IceGrid.

  3. #3
    raulgd's Avatar
    raulgd is offline Registered User
    Name: Raul Guerrero
    Organization: Jimi
    Project: RI of mexican standard of Electronic Health Record
    Join Date
    Mar 2011
    Location
    Queretaro, Mexico
    Posts
    15
    A simple Ice server will be able to handle large user loads, Ice handles the thread pool for you
    So by just coding my slice and generating the code, and implementing the servants and adding them to an adapter, that's it? And in case the load gets too big I just configure the thread pool size so that it fits my needs? Cool!

    That's exactly what I wanted to read, because I've read white papers, the Ice book and a lot of posts, but it's just a lot of information and a lot of ways of implementing the same thing that I just didn't know how to practically work with Ice.

    I guess I can use IceBox and IceGrid for distributing the services, let's say in java for ease of crossplatform compiling and deploying and without worrying about handling the connections myself, and I can build clients in C++ to consume those services.

    Thanks a lot, that clears things up a bit better.
    Raul Guerrero
    Software developer
    Jimi.mx

  4. #4
    benoit's Avatar
    benoit is offline ZeroC Staff
    Name: Benoit Foucher
    Organization: ZeroC, Inc.
    Project: Ice
    Join Date
    Feb 2003
    Location
    Rennes, France
    Posts
    2,196
    Hi,

    Yes, you don't have much to do beside eventually configuring the thread pool size.

    To figure out the right thread pool size you need to see if the implementation of your servants don't block and are always "runnable" (they mostly do computation) or if on the contrary they often block (waiting for resources, waiting to acquire mutexes, performing blocking disk IO, making blocking Ice requests, etc.).

    In the case your servants don't perform any blocking operations, it's in general best to configure a number of thread equal to the number of CPU cores on your machine (more threads won't help much). In the case your servants perform blocking operations, you will need more threads if you want operations to be dispatched while some dispatched operations are blocking (and therefore using Ice server thread pool threads).

    Cheers,
    Benoit.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. ThreadPools and Concurrency
    By surajrai in forum Help Center
    Replies: 5
    Last Post: 01-01-2008, 03:49 AM
  2. Ice.Application exception handling
    By henrik in forum Help Center
    Replies: 1
    Last Post: 02-11-2007, 09:56 AM
  3. is IcePy conCurrency enabled.
    By alexm in forum Help Center
    Replies: 1
    Last Post: 10-10-2006, 07:48 PM
  4. signal handling and ice::Application
    By fitzharrys in forum Help Center
    Replies: 11
    Last Post: 10-18-2005, 05:51 PM

Posting Permissions

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