9front - general discussion about 9front
 help / color / mirror / Atom feed
* Re: [9front] discussion: general fix for 9p status files which don't accept multiple readers
@ 2019-05-22  6:32 vp
  2019-05-22  8:56 ` Silas McCroskey
  0 siblings, 1 reply; 5+ messages in thread
From: vp @ 2019-05-22  6:32 UTC (permalink / raw)
  To: 9front

Another option is running mycroftiv's hubfs
and a bunch of cats for reading and writing
the files in question.
The server:
	hubfs -s multipipe
	mount -c /srv/multipipe /mnt/p
	cat /dev/kbd > /mnt/p/kbd &
The client(s):
	mount -c /srv/multipipe /mnt/p
	cat /mnt/p/kbd
Either the server or the clients could bind the
hub files or a directory wherever they please.
Note that you can create directory hierarchies
in hubfs just fine.

One *big* problem is that hubfs can, and will,
coalesce the messages at its leisure, masking
the write boundary behaviour that many
existing readers of stuff like /dev/kbd rely on.

- kvik


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [9front] discussion: general fix for 9p status files which don't accept multiple readers
  2019-05-22  6:32 [9front] discussion: general fix for 9p status files which don't accept multiple readers vp
@ 2019-05-22  8:56 ` Silas McCroskey
  2019-05-22  9:55   ` hiro
  0 siblings, 1 reply; 5+ messages in thread
From: Silas McCroskey @ 2019-05-22  8:56 UTC (permalink / raw)
  To: 9front

That's more or less what I'm suggesting, modulo a different multipipe
and an easier setup (bind over and read from could be default here, as
it is with mixfs). The existing multipipe.c does what hubfs does, but
only serves a single multipipe and responds to all readers once for
each write. It also doesn't save messages that all existing readers
have already read (so none at all, if there aren't currently any
readers), which I think is more appropriate for this use case (mod the
"respond with the current state on first read" part). hubfs is great,
but it handles a bunch of extra stuff that at best isn't necessary
here and at worst causes problems like the one you mentioned re:
coalescing.

- sam-d

On Wed, May 22, 2019 at 6:32 AM <vp@kvik.link> wrote:
>
> Another option is running mycroftiv's hubfs
> and a bunch of cats for reading and writing
> the files in question.
> The server:
>         hubfs -s multipipe
>         mount -c /srv/multipipe /mnt/p
>         cat /dev/kbd > /mnt/p/kbd &
> The client(s):
>         mount -c /srv/multipipe /mnt/p
>         cat /mnt/p/kbd
> Either the server or the clients could bind the
> hub files or a directory wherever they please.
> Note that you can create directory hierarchies
> in hubfs just fine.
>
> One *big* problem is that hubfs can, and will,
> coalesce the messages at its leisure, masking
> the write boundary behaviour that many
> existing readers of stuff like /dev/kbd rely on.
>
> - kvik


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [9front] discussion: general fix for 9p status files which don't accept multiple readers
  2019-05-22  8:56 ` Silas McCroskey
@ 2019-05-22  9:55   ` hiro
  2019-05-22 10:10     ` hiro
  0 siblings, 1 reply; 5+ messages in thread
From: hiro @ 2019-05-22  9:55 UTC (permalink / raw)
  To: 9front

i had the same dilemma and concluded like sam-d.
hubfs uses the same building blocks this might need, so one can learn
how to do it from hubfs, but as it is right now it wouldn't be so
suitable.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [9front] discussion: general fix for 9p status files which don't accept multiple readers
  2019-05-22  9:55   ` hiro
@ 2019-05-22 10:10     ` hiro
  2019-05-22 22:07       ` Silas McCroskey
  0 siblings, 1 reply; 5+ messages in thread
From: hiro @ 2019-05-22 10:10 UTC (permalink / raw)
  To: 9front

what i don't get: rio, and what edge cases you need to solve there...
rio serves all the things commonly needed by multiple readers in the
expected way, or?


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [9front] discussion: general fix for 9p status files which don't accept multiple readers
  2019-05-22 10:10     ` hiro
@ 2019-05-22 22:07       ` Silas McCroskey
  0 siblings, 0 replies; 5+ messages in thread
From: Silas McCroskey @ 2019-05-22 22:07 UTC (permalink / raw)
  To: 9front

My mistake, I meant /dev/wctl rather than /dev/window, but here's what
I'm referring to:
https://code.9front.org/hg/plan9front/file/523d2d3e473f/sys/src/cmd/rio/xfid.c#l293

cinap challenged me to solve this ages ago when I was discussing some
window management scripts with him, and I've been overanalyzing the
solution ever since :)

- sam-d

On Wed, May 22, 2019 at 3:55 AM hiro <23hiro@gmail.com> wrote:
>
> what i don't get: rio, and what edge cases you need to solve there...
> rio serves all the things commonly needed by multiple readers in the
> expected way, or?


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-05-22 22:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-22  6:32 [9front] discussion: general fix for 9p status files which don't accept multiple readers vp
2019-05-22  8:56 ` Silas McCroskey
2019-05-22  9:55   ` hiro
2019-05-22 10:10     ` hiro
2019-05-22 22:07       ` Silas McCroskey

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).