From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_05,FREEMAIL_FROM, MAILING_LIST_MULTI autolearn=unavailable autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,fed2e7871ca258cd X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-12-14 18:07:04 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!dispose.news.demon.net!demon!grolier!freenix!enst!enst.fr!not-for-mail From: Eric Merritt Newsgroups: comp.lang.ada Subject: Server - tasking and long lived connections Date: Fri, 14 Dec 2001 18:06:20 -0800 (PST) Organization: ENST, France Sender: comp.lang.ada-admin@ada.eu.org Message-ID: Reply-To: comp.lang.ada@ada.eu.org NNTP-Posting-Host: marvin.enst.fr Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: avanie.enst.fr 1008382022 28710 137.194.161.2 (15 Dec 2001 02:07:02 GMT) X-Complaints-To: usenet@enst.fr NNTP-Posting-Date: Sat, 15 Dec 2001 02:07:02 +0000 (UTC) To: comp.lang.ada@ada.eu.org Return-Path: In-Reply-To: <3C1A9063.2000402@telepath.com> Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org X-Mailman-Version: 2.0.6 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: comp.lang.ada mail<->news gateway List-Unsubscribe: , Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org Xref: archiver1.google.com comp.lang.ada:17939 Date: 2001-12-14T18:06:20-08:00 Hello All, I am in the process of designing a server that will need to accept long lived (up to several hours) client connections. The processes themselves will be fairly I/O bound (database accesses), and at most the number of processors will be in the range of 2 - 4. The obvious choice (in my mind) for this is to use a single task per connection. In this senario, context switching will not be a major issues due to the length of the connections. There will be little or no performance gains by using tasking, but it handles the long connection times well. I do, however, have a few reservations about scalablity due to OS limitations on the number of threads per machine and the number of open file descriptors. Although at first the number of connections will not be high, it is possible that it could rapidly need to scale up to a fairly high number, several hundred or more. This may mean that I will just have to distribute the app across several boxs and do some type of mirroring on the databases, but I want to put that off as long as possible. I have quit a bit of experience in code this type of application but usually with short lived connections or a low number of total connections. Anyway, I am just looking for some one to either point me in a different direction or confirm my current approach (one thread per connection). Thank you for your input. __________________________________________________ Do You Yahoo!? Check out Yahoo! Shopping and Yahoo! Auctions for all of your unique holiday gifts! Buy at http://shopping.yahoo.com or bid at http://auctions.yahoo.com