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=0.6 required=5.0 tests=BAYES_00,TO_NO_BRKTS_FROM_MSSP autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,971aa11c293c3db1 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-07-24 09:59:50 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!feed.textport.net!newsranger.com!www.newsranger.com!not-for-mail Newsgroups: comp.lang.ada From: Ted Dennison References: <5be89e2f.0107170838.c71ad61@posting.google.com> <5be89e2f.0107180235.726d46a8@posting.google.com> <3B55B01A.DAC06D79@icn.siemens.de> <5be89e2f.0107181248.73298c57@posting.google.com> <9j949b$1ujp$1@norfair.nerim.net> <9cV57.54954$WS4.8386096@news6-win.server.ntlworld.com> <9j98pv$20vi$1@norfair.nerim.net> <3B586C51.53C17E25@home.com> Subject: Re: Ada The Best Language? Message-ID: X-Abuse-Info: When contacting newsranger.com regarding abuse please X-Abuse-Info: forward the entire news article including headers or X-Abuse-Info: else we will not be able to process your request X-Complaints-To: abuse@newsranger.com NNTP-Posting-Date: Tue, 24 Jul 2001 12:52:29 EDT Organization: http://www.newsranger.com Date: Tue, 24 Jul 2001 16:52:29 GMT Xref: archiver1.google.com comp.lang.ada:10525 Date: 2001-07-24T16:52:29+00:00 List-Id: In article <3B586C51.53C17E25@home.com>, Warren W. Gay VE3WWG says... > >Hee, hee, but what are you going to do when you want to do a select(2) call >on a dozen file descriptors? Java doesn't give you a clean way to do this, >short of creating a dozen threads to each block on one descriptor. Or.. >you can use non-blocking (gak) calls. Java still falls short in a number >of places. Ada of course, would not prevent you from calling select(2) or >poll(2). To do it in Java, requires the use of native methods, which would >be oh so ugly (creation of a shared library etc. etc.) That's funny. This very much resembles a conversation I had Friday with an anti-Ada C user. Although Ada's on the other side this time, I feel honor bound to make the same points here that I did there. 1) I don't see why it is such a bad thing to make a system call from Java, and not a bad thing to make the exact same system call from Ada. I realise that this may reduce Java's portability, but only down to the level at which your putative Ada example already exists. Your Ada (or Java) might be less portable for other reasons. But then those should be addressed, not this issue. 2) Even though either language can do it just fine, I don't think "select" support is that big of a deal anyway. Most serious network servers (according to the literature I read) don't use select. They instead keep a pool of threads (tasks), and assign IP connections as they come in to the next available thread. Using "select" would tie up your entire server into processing one request at a time, which might be OK for something that doesn't get hit a lot, but would be horrible for a server that may expect several simultanious requests from different parties. "select" probably has its uses, but it seems to mostly be a holdover from the pre-thread era. --- T.E.D. homepage - http://www.telepath.com/dennison/Ted/TED.html home email - mailto:dennison@telepath.com