9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Jorden Mauro <jrm8005@gmail.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] Collaborative Sam?
Date: Mon, 15 Mar 2010 13:47:25 -0400	[thread overview]
Message-ID: <3aaafc131003151047g1ff880cdxec116fd86a60d346@mail.gmail.com> (raw)
In-Reply-To: <3e1162e61003150830r6ceff701h1abbc7fcf8ea47fa@mail.gmail.com>

On Mon, Mar 15, 2010 at 11:30 AM, David Leimbach <leimy2k@gmail.com> wrote:
>
>
> On Mon, Mar 15, 2010 at 8:14 AM, Jorden Mauro <jrm8005@gmail.com> wrote:
>>
>> On Mon, Mar 15, 2010 at 10:34 AM, David Leimbach <leimy2k@gmail.com>
>> wrote:
>> > I don't know enough about sam's innards to be able to say whether or not
>> > this could work, but I do like the idea.
>>
>> I think it's doable because of the way sam's remote mode works -- it
>> appears to just use pipes.
>>
>> Therefore, I thought that maybe a multiplexer could sit between a
>> single sam and several samterms, organizing the protocol messages from
>> all the different samterms and presenting something sane to the single
>> sam -R instance. It would have to be convincing to that individual
>> sam, appearing to be a single `normal' samterm. I think the fact that
>> sam uses a database-like protocol would make that possible; all the
>> results of the multiplexer's merging and so forth would be presented
>> to the sam -R instance as if they were coming in as protocol messages
>> from a single samterm.
>>
>
> Well I think there'd have to be a concept of a session in there somewhere,
> so that edits by one person could be differentiated from edits by another.
>  Also how atomic are the messages in the protocol and can they be
> "committed" transactionally  to the buffer?  If so I think there might be
> something doable here.

I would think that the multiplexer would handle all of this. It could
just check what time the samterms' messages come to it, resolve them,
and output a single stream of sam protocol messages to the single sam
-R on the server side. Of course, there's more to this `handling' than
there seems at first glance, but as long as the multiplexer can handle
all the client samterms' messages, merge everything properly, and once
it makes sense of all the requests, emit a single stream of sane
samterm messages to the sam -R that it talks to on the server-side, I
think it would work.

The only modification to sam would be adding the option to set up the
pipes on both ends and fork the multiplexer -- which would read pretty
much the same as the connectto() functionn /sys/src/cmd/sam/io.c .

> It'd be cool to use with Inferno for example, where you can run editing
> sessions from anyone's PC in a company setting.
> Isn't that what the collaborative whiteboard app in Inferno is/was for?
>  I've never tried running it.
> Dave
>
>>
>> >
>> > On Mon, Mar 15, 2010 at 7:05 AM, Jorden Mauro <jrm8005@gmail.com> wrote:
>> >>
>> >> How hard would it be to stick a program between a single sam -R and
>> >> several samterms? I imagine such a program would have to interpret the
>> >> sam protocol and handle merges and simultaneous updates, but since sam
>> >> essentially treats files operations as database transactions, it seems
>> >> like sam's protocol could be very helpful. The possibilities for what
>> >> such an intermediary program could do are probably limitless, but I
>> >> was thinking it could make collaborative editing via sam a
>> >> possibility.
>> >>
>> >> I don't know enough about sam's protocol to know if such an idea would
>> >> work.
>> >>
>> >
>> >
>>
>
>



  parent reply	other threads:[~2010-03-15 17:47 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-15 14:05 Jorden Mauro
2010-03-15 14:34 ` David Leimbach
2010-03-15 15:14   ` Jorden Mauro
2010-03-15 15:30     ` David Leimbach
2010-03-15 17:04       ` Chad Brown
2010-03-15 17:38         ` Jorden Mauro
2010-03-15 17:47       ` Jorden Mauro [this message]
2010-03-15 22:23 ` Skip Tavakkolian
2010-03-15 23:14   ` Jorden Mauro

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=3aaafc131003151047g1ff880cdxec116fd86a60d346@mail.gmail.com \
    --to=jrm8005@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).