9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Ciprian Dorin Craciun <ciprian.craciun@gmail.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] Regarding 9p based "protocols" message framing
Date: Fri, 16 Mar 2012 19:55:24 +0200	[thread overview]
Message-ID: <CA+Tk8fzB_Oj8AhuEJAWzy0VsSwv-hSC_cjVKdGrA5jqa1g_+7A@mail.gmail.com> (raw)
In-Reply-To: <CADSkJJVcsffzZo6En5A8DTApZULxkqCuzXEgKbFvv8eRjm2DpQ@mail.gmail.com>

On Fri, Mar 16, 2012 at 19:36, Russ Cox <rsc@swtch.com> wrote:
> On Fri, Mar 16, 2012 at 7:40 AM, Ciprian Dorin Craciun
> <ciprian.craciun@gmail.com> wrote:
>>  Why was I puzzled: because as a non Plan9 user / developer, I
>> usually think of the underlaying transport technology (be it sockets
>> or 9p) as a stream of bytes without explicit framing.
>
> Even outside Plan 9, this is not always the case.
> UDP, IP, ethernet, Unix datagram sockets, email, HTTP.
> They're all message-based protocols.
>
> Russ


    I am aware that there are other types of transports with other
semantics. Nevertheless I guess that at least 90% of the existing
protocols are built directly on top of stream based transports than
datagram ones. (I'm not speaking of ubiquity / underlaying technology,
or else we'd conclude that we use Ethernet in 99.999% of the cases.)
And what is even more funny, is that I guess a good majority of the
protocols are in the end message-based (as you've mentioned HTTP,
SMTP, etc.) although they are built ontop of a stream based protocol.

    Furthermore 9p exposes a semantic more similar with TCP than with
UDP, and only when you take into account the read / write atomicity
you see it as a datagram protocol.

    My concert was that in general a programmer used to implement
things ontop of stream based protocols was "thought" to expect that
one read on the client is not in general one read on the server due to
fragmentation, etc., and that he must frame his messages accordingly.

    Thus my question was if when working with 9p it is a good choice
to do explicit framing (as in the case building ontop of TCP) or to
take for granted the read / write atomicity.

    Ciprian.



  reply	other threads:[~2012-03-16 17:55 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-16 11:40 Ciprian Dorin Craciun
2012-03-16 17:04 ` Richard Miller
2012-03-16 17:36 ` Russ Cox
2012-03-16 17:55   ` Ciprian Dorin Craciun [this message]
     [not found] ` <CADSkJJVcsffzZo6En5A8DTApZULxkqCuzXEgKbFvv8eRjm2DpQ@mail.gmail.c>
2012-03-16 17:49   ` erik quanstrom
2012-03-20 11:42     ` Yaroslav
2012-03-20 12:32       ` Dan Cross
2012-03-20 20:30         ` Ciprian Dorin Craciun
2012-03-21  1:22           ` Dan Cross
     [not found]           ` <CAEoi9W6t2WRPTYU6+JHfAZoRAe6aWxkuCDkXb1G+VAkZZ1kYug@mail.gmail.c>
2012-03-21  1:52             ` erik quanstrom
     [not found]       ` <CAEoi9W6z_48wm8Jx__Meodnr50g0Ba00wqyfVrv0SP=Xb5ZHcw@mail.gmail.c>
2012-03-20 15:57         ` erik quanstrom
2012-03-21 20:11           ` Yaroslav
2012-03-21 20:32             ` Anthony Sorace
2012-03-21 20:37               ` erik quanstrom
     [not found]           ` <CAG3N4d_Qd-dH4pZWXGdqoNTguSjGge1oLahTwJAk5nVLvzXvjQ@mail.gmail.c>
2012-03-21 20:27             ` erik quanstrom
2012-03-21 20:38               ` Anthony Sorace
2012-03-21 20:53                 ` erik quanstrom
2012-03-21 21:24                   ` cinap_lenrek
2012-03-21 21:27                     ` erik quanstrom
2012-03-21 21:35                       ` cinap_lenrek
2012-03-21 21:07                 ` cinap_lenrek
2012-03-21 21:22                   ` erik quanstrom
2012-03-21 21:16               ` David du Colombier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CA+Tk8fzB_Oj8AhuEJAWzy0VsSwv-hSC_cjVKdGrA5jqa1g_+7A@mail.gmail.com \
    --to=ciprian.craciun@gmail.com \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).