comp.lang.ada
 help / color / mirror / Atom feed
From: "Yannick Duchêne (Hibou57)" <yannick_duchene@yahoo.fr>
Subject: Re: Why no socket package in the standard ?
Date: Tue, 24 May 2011 21:38:03 +0200
Date: 2011-05-24T21:38:03+02:00	[thread overview]
Message-ID: <op.vvz3hpb7ule2fv@douda-yannick> (raw)
In-Reply-To: 4ddb81b8$0$7628$9b4e6d93@newsspool1.arcor-online.net

Le Tue, 24 May 2011 12:00:24 +0200, Georg Bauhaus  
<rm.dash-bauhaus@futureapps.de> a écrit:
> 1. The reason simply is that each and every of them has started
> by offering some glue code for the BSD/POSIX socket functions.
BSD is the standard C API for sockets, even the POSIX one, intially based  
on the BSD specification, was kept close enough. The POSIX specification  
seems to only differs in the way to get host by name / address.

> .NET languages will likely just use a .NET class.
Which is probably a tick binding to the socket API (if I'm wrong with  
this, tell me).

> But there have been and will be difficulties when porting
> the languages' alleged "standard" libraries to non-POSIX
> (or non-.NET) operating systems.  Perhaps the difficulties
> are even conceptual ones whenever POSIX sockets don't really
> meet the networking requirements.
What networking requirement ? This thread is not about OSI layers packages  
for Ada, it's only about sockets, which is either OSI layer 4 or 5  
(depending on the point of view).

> Define
>
>   Commercially_Important_Platforms := {
>     ∃ target | POSIX(target) IN { False, True }
>   }
>
> How large is the subset defined by POSIX(target) = False?
> Is POSIX/Sockets the best Ada solution when this is the case?
Be pragmatic : the standard socket API is the BSD socket API, then as said  
above, there are only little differences between the POSIX and BSD socket  
specification, and then after, sockets does not implies POSIX. POSIX is  
one thing, sockets is another.


> 2. In the light of Ada's history regarding standardization,
> there is, I believe, networking knowledge that warrants more
> than canonization of a practical workaround---which might fail
> if requirements are actually different.
What workaround ?

> Opposing a get-that-duct-tape-solution-out–the-door style for
> standardization, I'd imagine starting from questions like the
> following and then weigh POSIX sockets as the possible answer:
Why not, POSIX would be OK, indeed, as it provides the same. But there  
should be good reason to introduce POSIX here. This would be OK if there  
was support for POSIX in the Ada standard, and this is actually not.

> - What should programs be able to do when communicating data
>   along some network connection?
Answered by the socket specification : there are raw, datagram, stream,  
blocking and none-blocking sockets, with IPv4 or IPv6 addresses.

> - Should there be a layered approach?  How much detail?
Sockets already belong to its layer, but Ada is not concerned about it.  
This is not about creating a network package hierarchy, this is about a  
socket package only (may be a hierarchy, if it appears to be cleaner this  
way).

> - Where in the language will this integrate nicely?
>   (E.g. package structure? What types if any?  Or anything
>   that has already been mentioned.)
Streams in some part, but not always, has some usage of sockets does not  
have stream behavior (like UDP). This would probably requires two sockets  
type : streams and none-stream.

> - Is sockets the right approach?  Consider Erlang!
Seems Erlang actually provides sockets.

> - Is sockets the right approach?  Consider a CAN!
A can 8-) ?

> I doubt that the best answer to these questions can
> be summed up by saying, "Mirror Posix sockets!".
Why ? Thousands of applications are working nice with either POSIX or BSD  
sockets, and this was not cause of any big troubles I could hear about,  
unlike stack or buffer overflow, lack of typing and the like. Sockets are  
a mostly secure things. And Ada has tasking defined in the language, which  
can be useful for sockets (think about the "select" operation, while not  
formally required, is often used in conjunction with sockets).


> [*]  
> http://pike.ida.liu.se/generated/manual/modref/ex/predef_3A_3A/Stdio/Port.html
>
> [**] http://www.snobol4.org/csnobol4/curr/doc/snobol4.html
>
> [***] "Haskell's networking functions almost always correspond
> directly to familiar C function calls."
> http://book.realworldhaskell.org/read/sockets-and-syslog.html
OK, will get some time to read these.


-- 
Si les chats miaulent et font autant de vocalises bizarres, c’est pas pour  
les chiens.
“ c++; /* this makes c bigger but returns the old value */ ” [Anonymous]



  parent reply	other threads:[~2011-05-24 19:38 UTC|newest]

Thread overview: 121+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-24  1:22 Why no socket package in the standard ? Yannick Duchêne (Hibou57)
2011-05-24  1:39 ` Yannick Duchêne (Hibou57)
2011-05-24  6:11   ` tmoran
2011-05-24 17:23     ` Pascal Obry
2011-05-24 19:10     ` Yannick Duchêne (Hibou57)
2011-05-25 15:12     ` Tero Koskinen
2011-05-25 18:43       ` Tero Koskinen
2011-05-25 19:08         ` Yannick Duchêne (Hibou57)
2011-05-24  6:24 ` georg bauhaus
2011-05-24  7:07   ` Maciej Sobczak
2011-05-24  7:19     ` Thomas Løcke
2011-05-24  7:35       ` Ludovic Brenta
2011-05-24 10:00       ` Georg Bauhaus
2011-05-24 12:53         ` Dmitry A. Kazakov
2011-05-24 14:28           ` Georg Bauhaus
2011-05-24 14:59             ` Dmitry A. Kazakov
2011-05-24 16:07               ` Adam Beneschan
2011-05-24 19:21                 ` Dmitry A. Kazakov
2011-05-25  0:53                   ` Yannick Duchêne (Hibou57)
2011-05-25  0:21                 ` Yannick Duchêne (Hibou57)
2011-05-25 11:25                   ` Peter C. Chapin
2011-05-24 16:10               ` Georg Bauhaus
2011-05-24 19:36                 ` Dmitry A. Kazakov
2011-05-25  0:57               ` Yannick Duchêne (Hibou57)
2011-05-24 23:20             ` Yannick Duchêne (Hibou57)
2011-05-25  0:32               ` Georg Bauhaus
2011-05-25  0:49                 ` Yannick Duchêne (Hibou57)
2011-05-25  7:55                 ` Pascal Obry
2011-05-25  8:38                   ` Georg Bauhaus
2011-05-25  8:05                 ` Dmitry A. Kazakov
2011-05-25  7:52               ` Dmitry A. Kazakov
2011-05-24 19:38         ` Yannick Duchêne (Hibou57) [this message]
2011-05-24 19:54           ` Ludovic Brenta
2011-05-24 20:10             ` Yannick Duchêne (Hibou57)
2011-05-24 21:57               ` Ludovic Brenta
2011-05-24 22:35                 ` Yannick Duchêne (Hibou57)
2011-05-24 23:34                   ` Adam Beneschan
2011-05-24 23:40                     ` Ludovic Brenta
2011-05-24 23:50                       ` Yannick Duchêne (Hibou57)
2011-05-24 23:35                   ` Ludovic Brenta
2011-05-25  3:07                     ` Shark8
2011-05-25  4:01                       ` Yannick Duchêne (Hibou57)
2011-05-25  7:39                         ` Georg Bauhaus
2011-05-25  7:42                         ` Ludovic Brenta
2011-05-25 10:46                           ` Manuel Collado
2011-05-25 10:44                         ` Peter C. Chapin
2011-05-25 15:28                           ` Yannick Duchêne (Hibou57)
2011-05-25 16:36                             ` Ludovic Brenta
2011-05-25 16:46                               ` Yannick Duchêne (Hibou57)
2011-05-26 12:10                               ` Maciej Sobczak
2011-05-26 12:42                                 ` Ludovic Brenta
2011-05-26 14:36                                   ` Georg Bauhaus
2011-05-26 15:56                                     ` Ludovic Brenta
2011-05-26 18:20                                   ` Maciej Sobczak
2011-05-26 18:29                                     ` Yannick Duchêne (Hibou57)
2011-05-26 20:46                                       ` Georg Bauhaus
2011-05-26 21:02                                         ` Yannick Duchêne (Hibou57)
2011-05-26 21:44                                           ` Georg Bauhaus
2011-05-26 21:59                                         ` Ludovic Brenta
2011-05-27  7:54                                           ` Georg Bauhaus
2011-05-27 13:12                                           ` Simon Wright
2011-05-27 15:43                                             ` Ludovic Brenta
2011-05-26 18:31                                     ` Vinzent Hoefler
2011-05-26 19:05                                       ` Ludovic Brenta
2011-05-26 19:14                                       ` Yannick Duchêne (Hibou57)
2011-05-26 19:44                                         ` Ludovic Brenta
2011-05-27  2:02                                       ` anon
2011-05-27 11:44                                     ` Stephen Leake
2011-05-26 14:50                               ` Adam Beneschan
2011-05-26 15:57                                 ` Ludovic Brenta
2011-05-27 11:46                                   ` Stephen Leake
2011-05-27 12:21                                     ` Dmitry A. Kazakov
2011-05-27 12:49                                       ` Make, Automake, Configure, Autocong, GPRbuild etc (was: Why no socket package in the standard ?) Ludovic Brenta
2011-05-27 13:10                                         ` Make, Automake, Configure, Autocong, GPRbuild etc Dmitry A. Kazakov
2011-05-27 15:45                                           ` Ludovic Brenta
2011-05-25  7:40                       ` Why no socket package in the standard ? Georg Bauhaus
2011-05-25 10:48                         ` Pascal Obry
2011-05-25  7:49                       ` Ludovic Brenta
2011-05-25  2:47             ` Shark8
2011-05-25  9:12             ` Thomas Løcke
2011-05-24 21:42           ` Yannick Duchêne (Hibou57)
2011-05-24 23:09           ` Georg Bauhaus
2011-05-24 23:25             ` Yannick Duchêne (Hibou57)
2011-05-25  9:06             ` Dmitry A. Kazakov
2011-05-24 23:11           ` Georg Bauhaus
2011-05-24 23:28             ` Yannick Duchêne (Hibou57)
2011-05-24 23:57               ` Georg Bauhaus
2011-05-25  0:36                 ` Yannick Duchêne (Hibou57)
2011-05-24  7:25     ` Dmitry A. Kazakov
2011-05-24 21:22       ` Maciej Sobczak
2011-05-25  9:14         ` Dmitry A. Kazakov
2011-05-25 11:54           ` Maciej Sobczak
2011-05-25 12:26             ` Dmitry A. Kazakov
2011-05-24 22:04       ` Yannick Duchêne (Hibou57)
2011-05-25  9:19         ` Dmitry A. Kazakov
2011-05-24 19:17   ` Yannick Duchêne (Hibou57)
2011-05-24 19:30     ` J-P. Rosen
2011-05-24 19:49       ` Yannick Duchêne (Hibou57)
2011-05-24 22:39     ` Georg Bauhaus
2011-05-24 22:54       ` Yannick Duchêne (Hibou57)
2011-05-24 23:54         ` Georg Bauhaus
2011-05-25  0:34           ` Yannick Duchêne (Hibou57)
2011-05-25  1:20             ` Yannick Duchêne (Hibou57)
2011-05-24 12:38 ` AdaMagica
2011-05-24 15:00   ` Yannick Duchêne (Hibou57)
2011-05-24 18:29 ` anon
2011-05-24 19:08   ` Yannick Duchêne (Hibou57)
2011-06-02  2:41 ` Randy Brukardt
2011-06-02 13:55   ` Florian Weimer
2011-06-02 20:38     ` anon
2011-06-02 20:44       ` Florian Weimer
2011-06-02 21:18       ` J-P. Rosen
2011-06-04 21:35         ` anon
2011-06-05  8:39           ` J-P. Rosen
2011-06-07  1:50             ` anon
2011-06-02 21:34     ` Randy Brukardt
2011-06-05 11:06       ` Florian Weimer
2011-06-05 13:45         ` Dmitry A. Kazakov
2011-06-05 14:51           ` Florian Weimer
2011-06-05 15:30             ` Dmitry A. Kazakov
2011-06-07  2:49             ` Randy Brukardt
replies disabled

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