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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,68494635acddb77e X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!news1.google.com!eweka.nl!lightspeed.eweka.nl!npeer.de.kpn-eurorings.net!npeer-ng1.kpn.DE!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: File output and buffering Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <60a35fd4-e5a6-4aa0-a73f-6815ce7e92fc@f36g2000hsa.googlegroups.com> <4af2f934-7458-4370-b325-c38e3a4068b8@s50g2000hsb.googlegroups.com> <1jt8nguvzf1hw$.189glcey6hmht.dlg@40tude.net> <84805bfc-26f4-4507-9024-9e3558c9cb32@m73g2000hsh.googlegroups.com> <104g44sstk0to$.1lektfatijska$.dlg@40tude.net> <4db7770e-a53b-436b-bc87-b487fdec430b@e39g2000hsf.googlegroups.com> <1n1jam128sz9v$.3jl0ijmar2gb.dlg@40tude.net> <6242f0d9-4874-427d-bf45-c5f5c36c75f2@k7g2000hsd.googlegroups.com> Date: Sat, 23 Aug 2008 12:25:14 +0200 Message-ID: NNTP-Posting-Date: 23 Aug 2008 12:25:18 CEST NNTP-Posting-Host: 78b5eac1.newsspool4.arcor-online.net X-Trace: DXC=aE`8>=KSVaX\PS5Xo=M[RV4IUK\BH3YRQ`QB@4YCXa\DNcfSJ;bb[UIRnRBaCdQZ0eS8Y X-Complaints-To: usenet-abuse@arcor.de Xref: g2news2.google.com comp.lang.ada:7506 Date: 2008-08-23T12:25:18+02:00 List-Id: On Fri, 22 Aug 2008 14:41:18 -0700 (PDT), Maciej Sobczak wrote: > On 22 Sie, 15:22, "Dmitry A. Kazakov" > wrote: > >> One last try. In your example, when >> characters of a message are sent *synchronously* (assuming E-mail as the >> transport layer, no back doors, etc) then each single character has to be >> sent as a reply to the answer to the earlier mail. > > Then we have a different notion of "synchronously". > When I write something to the file, the operation is synchronous when > the program *waits* for the transfer to complete. The transfer of the group, not the transfers of the individual items of. >> The very ability to send >> multiple characters in one mail means that they are sent in parallel = >> asynchronously. > > Then we have a different notion of "asynchronously". > When I write something to the file, the operation is asynchronous when > the program can continue while the transfer is being handled. That is the same notion. Asynchronous = not synchronous. The semantics of a transfer of a group of items does not depend on the order and exact timing of the transfers of individual items. If any, because they might be not transferred at all. Consider protocols which recode the group, digital fountains, etc. > And we have also a different notion of "parallel". > When I send a mail, it is transferred serially over a network cable. Wrong, they are printed and then sent per pigeon post. You have defined the transport layer as E-mail. That's it. Don't make suggestions about how E-mail might work, there are lots of ways. > The longer is the mail the longer it takes (hint: with parallel > communication the time of transmission would not depend on the number > of characters in the mail, since they would be sent, well, in > parallel). Nope I have a huge rack of multiplexed modems installed in the cellar. You again make assumptions about possible implementations of the transport layer, which weren't there when you presented the example. If the transport were rather a synchronous bytes stream, then buffering obviously would bring *nothing* to the throughout. >> � �http://en.wikipedia.org/wiki/Buffer_%28telecommunication%29 > > Short, but nice. Especially point d). Right, it says "operated on as a unit", read my previous posts. Who operates them as "a unit"? You need an independent asynchronous agent capable to do so, otherwise it is not a unit. If you have such an agent, and you can talk to it in terms of such units, then that is *without* buffering, and it is faster than anything else. The purpose of d) is to collect, it is merely an adapter between two protocols. Layered protocols are always slower. >> Note the category of the article, read the purposes of buffering. > > Yes, the purpose d) is what I'm talking about. I use buffers to group > data into smaller number of bigger units. This is where the > performance gain comes from. No, it is where you lose performance, because I just send bigger units directly. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de