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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM 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: g2news1.google.com!postnews.google.com!k30g2000hse.googlegroups.com!not-for-mail From: Maciej Sobczak Newsgroups: comp.lang.ada Subject: Re: File output and buffering Date: Fri, 22 Aug 2008 14:41:18 -0700 (PDT) Organization: http://groups.google.com Message-ID: 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> NNTP-Posting-Host: 85.3.126.156 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1219441278 18719 127.0.0.1 (22 Aug 2008 21:41:18 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 22 Aug 2008 21:41:18 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: k30g2000hse.googlegroups.com; posting-host=85.3.126.156; posting-account=bMuEOQoAAACUUr_ghL3RBIi5neBZ5w_S User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.0.1) Gecko/2008070206 Firefox/3.0.1,gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:1771 Date: 2008-08-22T14:41:18-07:00 List-Id: On 22 Sie, 15:22, "Dmitry A. Kazakov" wrote: > It seems that you didn't read my posts. I've read them, but did not understand. > 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 very ability to send > multiple characters in one mail means that they are sent in parallel =3D > 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. And we have also a different notion of "parallel". When I send a mail, it is transferred serially over a network cable. 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). > Compare it to parallel vs. serial communication. Nothing to compare. > For the > rest see > > =A0 =A0http://en.wikipedia.org/wiki/Buffer_%28telecommunication%29 Short, but nice. Especially point d). > 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. > Because it debunks your claim that the transfer of individual items is > synchronous. It is asynchronous, when makes sense. No, it is synchronous, since the program has to wait until the transfer completes (if the transfer is triggered at all - the buffer makes that happen less frequently). -- Maciej Sobczak * www.msobczak.com * www.inspirel.com Database Access Library for Ada: www.inspirel.com/soci-ada