comp.lang.ada
 help / color / mirror / Atom feed
From: "Warren W. Gay VE3WWG" <ve3wwg@home.com>
Subject: Re: Ada The Best Language?
Date: Tue, 24 Jul 2001 20:14:40 GMT
Date: 2001-07-24T20:14:40+00:00	[thread overview]
Message-ID: <3B5DD72F.ED434E9A@home.com> (raw)
In-Reply-To: hJh77.5332$ar1.14495@www.newsranger.com

Ted Dennison wrote:
> 
> 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.

My point was primarily these two points:

  1. to do native calls in Java requires you to create a shared library, install
     that library, establish environment if necessary (SHLIB_PATH/LD_LIBRARY_PATH)
     etc. Conversely, with Ada, you simply insert pragma import, then link-- no
     muss, no fuss.

  2. The other point was that creating extra threads might be considered a heavy
     handed solution to the problem (depending upon application). I know someone
     who has had to deal with this very problem, and bemoans the lack of select/poll
     support.
     
And of course, there is the whole DOS scenario, which someone else covered.

> 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.

Failing native calls to select/poll, Java forces you to use one thread for
each socket/fd that you are waiting for events on. What may be a better approach
for some server designs, is a pool of threads (yes), but not as many as you have
fd/sockets for. Once an event has been registered for any of many many file
descriptors (from select say), you can then pass the "job" onto one of your
waiting server threads. This allows you to tune the resource requirements of
your server.

-- 
Warren W. Gay VE3WWG
http://members.home.net/ve3wwg



  parent reply	other threads:[~2001-07-24 20:14 UTC|newest]

Thread overview: 243+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-07-17 16:38 Ada The Best Language? codesavvy
2001-07-17 17:16 ` chris.danx
2001-07-17 21:35   ` JP
2001-07-18 12:04     ` Marc A. Criley
2001-07-18 13:13       ` Colin Paul Gloster
2001-07-18 15:03         ` OO Zealotry horror stories (was Re: Ada the Best Language) Marc A. Criley
2001-07-17 17:53 ` Ada The Best Language? Larry Kilgallen
2001-07-17 18:01 ` Marin David Condic
2001-07-18  2:10   ` codesavvy
2001-07-18 10:43     ` Larry Kilgallen
2001-07-18 14:27     ` Marin David Condic
2001-07-18 20:37       ` codesavvy
2001-07-18 21:11         ` Marin David Condic
2001-07-19 21:45           ` codesavvy
2001-07-18 22:02         ` Ed Falis
2001-07-19 21:50           ` codesavvy
2001-07-18 23:00         ` Larry Kilgallen
2001-07-19 21:55           ` codesavvy
2001-07-21  8:39             ` Martin Dowie
2001-07-22 14:18             ` John R. Strohm
2001-07-23  6:13               ` 
2001-07-23 11:16                 ` Lutz Donnerhacke
2001-07-23 12:27                 ` Marc A. Criley
2001-07-24  2:07                 ` Warren W. Gay VE3WWG
2001-07-20  4:12         ` Adrian Hoe
2001-07-18 17:26     ` Darren New
2001-07-18 18:03       ` Pascal Obry
2001-07-18 20:51       ` codesavvy
2001-07-18 21:03         ` David C. Hoos
2001-07-20  4:00           ` Adrian Hoe
2001-07-18 21:22         ` Darren New
2001-07-19  4:12         ` James Rogers
2001-07-19  8:59           ` Michal Nowak
2001-07-19 10:40           ` Larry Kilgallen
2001-07-19 12:20           ` codesavvy
2001-07-21 18:20         ` Lao Xiao Hai
2001-07-22  3:55           ` Robert C. Leif, Ph.D.
2001-07-18 21:08     ` Tucker Taft
2001-07-17 20:12 ` Jeffrey Carter
2001-07-17 21:15   ` Gerhard Häring
2001-07-17 21:38   ` Paul Storm
2001-07-18  2:03 ` Tomasz Wegrzanowski
2001-07-18  9:28   ` Gary Lisyansky
2001-07-18 10:42   ` Larry Kilgallen
2001-07-18  2:40 ` Beau
2001-07-18 10:35   ` codesavvy
2001-07-18 11:27     ` Jean-Pierre Rosen
2001-07-18 18:28       ` Brian Rogoff
2001-07-18 21:00         ` codesavvy
2001-07-19 17:31           ` Warren W. Gay VE3WWG
2001-07-19 21:36             ` codesavvy
2001-07-24  3:22               ` Warren W. Gay VE3WWG
2001-07-25  0:11                 ` David Bolen
2001-07-25  3:09                   ` Recent Ada Information (was: zhttp://www.aceshardware.com/Spades/r Larry Kilgallen
2001-07-25  3:32                     ` David Bolen
2001-07-25  4:53                     ` Larry Kilgallen
2001-07-25 10:50                   ` Ada The Best Language? codesavvy
2001-07-25 16:04                     ` Warren W. Gay VE3WWG
2001-07-25 21:49                       ` codesavvy
2001-07-26 17:24                         ` Warren W. Gay VE3WWG
2001-07-26 18:48                           ` Marin David Condic
2001-07-26 20:21                             ` Warren W. Gay VE3WWG
2001-07-26 20:52                               ` Marin David Condic
2001-07-26 17:26                         ` Pascal Obry
2001-07-25 19:39                     ` tmoran
2001-07-27  0:35                       ` David Bolen
2001-07-27  1:50                         ` Gary Scott
2001-07-27 14:05                         ` Marin David Condic
2001-07-28  6:42                         ` tmoran
2001-07-28 12:53                           ` When correct software meets illegal data (was: Ada The Best...) Larry Kilgallen
2001-07-28 18:42                             ` tmoran
2001-07-28 20:52                               ` Al Christians
2001-07-28 21:42                                 ` tmoran
2001-07-30  1:53                                 ` Warren W. Gay VE3WWG
2001-07-28  5:32                       ` Ada The Best Language? JM
2001-07-28  6:49                         ` Gerhard Häring
2001-07-28 12:04                           ` Matthew Woodcraft
2001-07-28 19:46                           ` tmoran
2001-07-29  1:01                             ` Gerhard Häring
2001-07-31  2:59                           ` Tom Moran
2001-07-31  9:40                             ` Larry Kilgallen
2001-07-31 10:10                               ` Preben Randhol
2001-07-26 13:22                   ` Marin David Condic
2001-07-20 11:20             ` Bertrand Augereau
2001-07-20 12:56               ` Marin David Condic
2001-07-20 13:18               ` Dmitry Kazakov
2001-07-20 17:27               ` Warren W. Gay VE3WWG
2001-07-20 18:14                 ` Bertrand Augereau
2001-07-20 19:10                   ` Marin David Condic
2001-07-20 20:12                     ` Bertrand Augereau
2001-07-20 20:48                       ` Marin David Condic
2001-07-23 11:09                       ` Lutz Donnerhacke
2001-07-20 19:38                   ` David C. Hoos
2001-07-22 13:13                     ` Bertrand Augereau
2001-07-22 20:35                       ` David C. Hoos, Sr.
2001-07-22 21:12                         ` Bertrand Augereau
2001-07-22 22:34                           ` David C. Hoos, Sr.
2001-07-23  7:41                           ` Dmitry Kazakov
2001-07-23  8:27                             ` Bertrand Augereau
2001-07-23 11:51                               ` Dmitry Kazakov
2001-07-23 12:06                                 ` Bertrand Augereau
2001-07-24  1:57                                   ` Warren W. Gay VE3WWG
2001-07-26 22:31                                   ` Larry Elmore
2001-07-24 14:08                           ` Pat Rogers
2001-07-24 14:29                             ` Bertrand Augereau
2001-07-24 14:49                               ` Pat Rogers
2001-07-24  1:51                   ` Warren W. Gay VE3WWG
2001-07-18 18:29       ` codesavvy
2001-07-18 21:48         ` Hambut
2001-07-18 22:00           ` Marin David Condic
2001-07-19 21:43           ` codesavvy
2001-07-19  7:45         ` Jean-Pierre Rosen
2001-07-18 11:55     ` Larry Kilgallen
2001-07-18 15:49     ` Alfred Hilscher
2001-07-18 20:48       ` codesavvy
2001-07-18 22:12         ` Pascal Obry
2001-07-18 23:22         ` chris.danx
2001-07-20 11:26           ` Bertrand Augereau
2001-07-20 12:11             ` chris.danx
2001-07-20 12:43               ` Bertrand Augereau
2001-07-20 17:37                 ` Warren W. Gay VE3WWG
2001-07-24 16:52                   ` Ted Dennison
2001-07-24 16:59                     ` Lutz Donnerhacke
2001-07-24 18:25                       ` Ted Dennison
2001-07-25 10:19                         ` Lutz Donnerhacke
2001-07-25 18:53                           ` Teergrubing (was: Ada The Best Language?) Ted Dennison
2001-07-24 20:14                     ` Warren W. Gay VE3WWG [this message]
2001-07-24 21:11                     ` Ada The Best Language? Florian Weimer
2001-07-24 22:52                       ` tmoran
2001-07-25  7:08                         ` Florian Weimer
2001-07-25  7:45                           ` tmoran
2001-07-25 15:44                       ` Warren W. Gay VE3WWG
2001-07-25 20:39                         ` Florian Weimer
2001-07-26 17:13                           ` Warren W. Gay VE3WWG
2001-07-26 21:08                             ` Florian Weimer
2001-07-25  4:03                     ` Tomasz Wegrzanowski
2001-07-24 17:23                 ` Ted Dennison
2001-07-20 12:14             ` Lutz Donnerhacke
2001-07-20 12:32               ` Bertrand Augereau
2001-07-20 12:39                 ` Lutz Donnerhacke
2001-07-20 13:28                   ` Bertrand Augereau
2001-07-20 14:19                     ` Lutz Donnerhacke
2001-07-20 15:39                       ` Bertrand Augereau
2001-07-20 15:47                         ` Lutz Donnerhacke
2001-07-20 16:55                           ` Bertrand Augereau
2001-07-23 11:05                             ` Lutz Donnerhacke
2001-07-23 19:42             ` Lao Xiao Hai
2001-07-19 10:43         ` Alfred Hilscher
2001-07-19 12:47         ` Marc A. Criley
2001-07-19 17:01           ` codesavvy
2001-07-21 12:53             ` Marc A. Criley
2001-07-23 19:26         ` Lao Xiao Hai
2001-07-18 15:05 ` McDoobie
2001-07-18 20:42   ` codesavvy
2001-07-21 15:38   ` Device drivers in Ada (was Re: Ada The Best Language?) Mark Lundquist
2001-07-21 19:09     ` Larry Kilgallen
2001-07-21 15:31 ` Ada The Best Language? Mark Lundquist
2001-07-23  4:15   ` codesavvy
2001-07-23  7:26     ` Martin Dowie
2001-07-23 14:18   ` Marin David Condic
2001-07-24  2:13   ` Warren W. Gay VE3WWG
  -- strict thread matches above, loose matches on Subject: below --
2001-07-18  8:32 Vinzent Hoefler
2001-07-18 12:25 ` Marc A. Criley
2001-07-19  1:03   ` Mike Silva
2001-07-20 11:30   ` Bertrand Augereau
2001-07-20 12:58     ` Marc A. Criley
2001-07-20 13:48       ` Bertrand Augereau
2001-07-20 14:56         ` Marin David Condic
2001-07-20 16:41           ` Bertrand Augereau
2001-07-20 17:47           ` Warren W. Gay VE3WWG
2001-07-20 19:33             ` David C. Hoos
2001-07-20 17:19         ` Marc A. Criley
2001-07-20 18:18           ` Bertrand Augereau
2001-08-06  8:13   ` stoog
2001-07-19 17:10 ` Tomasz Wegrzanowski
2001-07-20 13:31   ` Lutz Donnerhacke
2001-07-20 16:46     ` Tomasz Wegrzanowski
2001-07-20 17:00       ` David C. Hoos
2001-08-04  6:04         ` David Thompson
2001-08-05  2:22           ` Warren W. Gay VE3WWG
2001-07-23 10:12       ` Lutz Donnerhacke
2001-07-18  8:43 Vinzent Hoefler
2001-07-18  9:22 ` Gerhard Häring
2001-07-18  8:58   ` Lutz Donnerhacke
2001-07-18 14:06 ` codesavvy
2001-07-18 15:27   ` Marc A. Criley
2001-07-18 20:31     ` codesavvy
2001-07-18 21:29       ` Darren New
2001-07-18 21:56         ` Marin David Condic
2001-07-19  3:37           ` Larry Hazel
2001-07-19 18:19             ` Marin David Condic
2001-07-21 15:33             ` Mark Lundquist
2001-07-23 13:50               ` Marin David Condic
2001-07-24  4:52                 ` Robert C. Leif, Ph.D.
2001-07-24  6:47                   ` tmoran
2001-07-24 11:47                   ` Larry Kilgallen
2001-07-24 14:10                   ` Ted Dennison
2001-07-27 11:29                     ` Jacob Sparre Andersen
2001-07-19 21:47         ` codesavvy
2001-07-21  2:51           ` DuckE
2001-07-21  3:46           ` Darren New
2001-07-26  1:39           ` Lao Xiao Hai
2001-07-19 13:12       ` Marc A. Criley
2001-07-19 17:11         ` codesavvy
2001-07-21 14:10           ` Marc A. Criley
2001-07-19 14:12       ` Leif Roar Moldskred
2001-07-19 16:58         ` codesavvy
2001-07-19 18:29         ` Marin David Condic
2001-07-19 17:11 ` Tomasz Wegrzanowski
2001-07-19 18:33   ` Marin David Condic
2001-07-19 20:49     ` Tomasz Wegrzanowski
2001-07-19 21:01       ` Darren New
2001-07-19 21:20       ` Marin David Condic
2001-07-19 22:31         ` Tomasz Wegrzanowski
2001-07-19 23:04           ` Darren New
2001-07-19 23:36             ` Tomasz Wegrzanowski
2001-07-20 16:14             ` Ted Dennison
2001-07-20 17:51               ` Darren New
2001-07-20 17:54               ` Marin David Condic
2001-07-20 20:16                 ` Ted Dennison
2001-07-25  9:01           ` Colin Paul Gloster
2001-07-19 22:31       ` Larry Kilgallen
2001-07-18 14:40 Re[2]: " ANH_VO
2001-07-26  1:53 ` Lao Xiao Hai
2001-07-19  0:15 Beard, Frank
2001-07-19 12:24 ` codesavvy
2001-07-19  5:42 Vinzent Hoefler
2001-07-19  6:32 Vinzent Hoefler
2001-07-19  6:35 Vinzent Hoefler
2001-07-19 11:34 Vinzent Hoefler
2001-07-19 15:24 ` Alfred Hilscher
2001-07-19 15:38   ` nicolas
2001-07-19 17:28 ` Ted Dennison
2001-07-24 13:53   ` Colin Paul Gloster
2001-07-19 16:10 Vinzent Hoefler
2001-07-20  6:05 Vinzent Hoefler
2001-07-20  6:08 Vinzent Hoefler
2001-07-20 17:31 ` Warren W. Gay VE3WWG
2001-07-21 16:27   ` Jacob Sparre Andersen
2001-07-24  2:02     ` Warren W. Gay VE3WWG
2001-07-20  6:23 Vinzent Hoefler
2001-07-20  6:56 Vinzent Hoefler
2001-07-27 20:22 Beard, Frank
2001-07-27 21:28 ` Marin David Condic
2001-07-30  2:23 ` Warren W. Gay VE3WWG
2001-07-27 22:46 Beard, Frank
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox