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.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,80ae596d36288e8a X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,UTF8 Path: g2news2.google.com!news4.google.com!feeder.news-service.com!94.75.214.39.MISMATCH!aioe.org!.POSTED!not-for-mail From: =?utf-8?Q?Yannick_Duch=C3=AAne_=28Hibou57?= =?utf-8?Q?=29?= Newsgroups: comp.lang.ada Subject: Re: Why no socket package in the standard ? Date: Wed, 25 May 2011 02:21:26 +0200 Organization: Ada @ Home Message-ID: References: <872169864327910446.796089rmhost.bauhaus-maps.arcor.de@news.arcor.de> <9cb23235-8824-43f4-92aa-d2e8d10e7d8c@ct4g2000vbb.googlegroups.com> <4ddb5bd7$0$302$14726298@news.sunsite.dk> <4ddb81b8$0$7628$9b4e6d93@newsspool1.arcor-online.net> <4ddbc090$0$6582$9b4e6d93@newsspool3.arcor-online.net> <80ebd58c-9a93-49a5-9a8b-167b25f47e5b@e17g2000prj.googlegroups.com> NNTP-Posting-Host: eKwzOZEoYNmUIKtjz8NWow.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes Content-Transfer-Encoding: Quoted-Printable X-Complaints-To: abuse@aioe.org User-Agent: Opera Mail/11.01 (Linux) X-Notice: Filtered by postfilter v. 0.8.2 Xref: g2news2.google.com comp.lang.ada:20412 Date: 2011-05-25T02:21:26+02:00 List-Id: Le Tue, 24 May 2011 18:07:42 +0200, Adam Beneschan a = =C3=A9crit: > What do you mean by "this height"? What height? From what I can > tell, figuring out the correct level of abstraction is still part of > the problem, a part that needs a lot of thought. Indeed, communication with the outside world, is a master concern for a = = program. I do not see a reason why this should be restricted to files an= d = pipes as it is actually in the Ada standard. This is not an option, this= = is a requirement. > Being able to communicate with programs written in other languages > *is* a need, and I think that any package that would become part of > the Ada standard would have to meet that need. And I think it could > be done with some level of abstraction, i.e. with more than just a > thin binding to the Unix socket library, and in a way that allows for > different communications mechanisms than just sockets. As I replied to Georg, I agree too with the need of more abstraction = (that's a good idea). I came to start with sockets, because this is = actually the first and straightforward thing you think about when you ha= ve = that need. But I agree more abstraction would be welcome, as limiting th= is = to sockets, would be as much a damage, as the lack of support for = communication beyond files. > (I have some > experience with this. I wrote a message-communication package that > had two different bodies, one that implemented the messages with VMS > mailboxes, and another that used sockets to communicate with a Solaris= > host. This was due to requirements imposed by the customer, and it > was set up to communicate specifically with a program written by the > customer. But the package specification was the same in both cases > and was general enough that I was able to reuse it for other > purposes. So I'm convinced this is doable, but difficult to do in a > way that will meet the needs of as many users as possible.) > > -- Adam Well, what would you think about these abstract properties (I will talk = = about channels, to use a term introduced bu Georg after Erlang concepts)= : * A channel may be data conservative or non-conservative - Conservative: all data sent between peers will be received - Non-Conservative: some data sent between peers may be lost. - Socket analogy: TCP vs UDP * A channel may be relative time conservative or non-conservative - Conservative: any data chunk sent after a previous one, will arrive after that previous one. - Non-Conservative: data chunk sent after a previous one, may be received at the same time as the previous after it was delayed as well after the previous. - Socket analogy: the Nagle algorithm is disabled vs enabled. * A channel may act as a sequence or as a kind of set - As a sequence: data arrives in the same order as sent. - As a set: data arrives in any order, order does not matter. - Socket analogy: TCP vs UDP (not a perfect analogy for UDP). * A channel with the =E2=80=9Csequence=E2=80=9D property and the =E2=80=9C= relative time = conservative=E2=80=9D property, may be either have real-time requirement= or not = have real time requirement. * A channel may have a global or a local identity (global or local, is a= = property of the identity). * A channel identity may have aliases (which would not be required, ther= e = could be only one), and during one session, only one of its identifier = would be the canonical one (luckily, otherwise this would be mess-prone)= . = Honestly, this aspect seems a bit tricky to me. I still have questions about blocking/non-blocking, although task would = = probably be involved here (any way, Ada already allows I/O to be = potentially blocking). What about this first draft of a draft ? :) -- = Si les chats miaulent et font autant de vocalises bizarres, c=E2=80=99es= t pas pour = les chiens. =E2=80=9C c++; /* this makes c bigger but returns the old value */ =E2=80= =9D [Anonymous]