9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] Question about o/mero -> o/live event notification mechanism
@ 2012-04-30 21:54 aram
  2012-05-01  8:58 ` Nemo
  0 siblings, 1 reply; 4+ messages in thread
From: aram @ 2012-04-30 21:54 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

Hi,

i explore the UI of octopus and i try to understand how omero notifies the
viewers for events.
It is apparent from the documentation that the viewers "read" events from
the ui/olive file.
However, when i cat that file from the shell and "play" with a terminal a
bit, i get no data.
The terminals are updated correctly which indicates that the events are
delivered.
I checked the source of olive (port/live/live.b) and it simply reads (by
calling updateproc(fd)) the file as expected.

Obviously i am missing something important that the documentation does not
cover.
How can i read events posted by omero?

Thanks



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

* Re: [9fans] Question about o/mero -> o/live event notification mechanism
  2012-04-30 21:54 [9fans] Question about o/mero -> o/live event notification mechanism aram
@ 2012-05-01  8:58 ` Nemo
  2012-05-02 13:56   ` aram
  0 siblings, 1 reply; 4+ messages in thread
From: Nemo @ 2012-05-01  8:58 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs


On Apr 30, 2012, at 11:54 PM, aram wrote:

> Hi,
> 
> i explore the UI of octopus and i try to understand how omero notifies the viewers for events.
> It is apparent from the documentation that the viewers "read" events from the ui/olive file.
> However, when i cat that file from the shell and "play" with a terminal a bit, i get no data.
> The terminals are updated correctly which indicates that the events are delivered.
> I checked the source of olive (port/live/live.b) and it simply reads (by calling updateproc(fd)) the file as expected.
> 
> Obviously i am missing something important that the documentation does not cover.
> How can i read events posted by omero?
> 
> Thanks

There are two type of events. IIRC.
User events like open, exec, ... are posted via o/ports, and you can
read them from there.

UI events are sent through a file with a protocol for o/live.
(Time ago they were sent also through ports, but I think I changed that).
The viewer reads a tree and then gets updates from that file.
That's internal and I don't think the man page describes that.

I can take a look to the source so I remember if you don't have luck
with these hints.

hth




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

* Re: [9fans] Question about o/mero -> o/live event notification mechanism
  2012-05-01  8:58 ` Nemo
@ 2012-05-02 13:56   ` aram
  2012-05-02 15:02     ` Nemo
  0 siblings, 1 reply; 4+ messages in thread
From: aram @ 2012-05-02 13:56 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs


On Tue, 01 May 2012 11:58:28 +0300, Nemo <nemo@lsub.org> wrote:

>
> On Apr 30, 2012, at 11:54 PM, aram wrote:
>
>> Hi,
>>
>> i explore the UI of octopus and i try to understand how omero notifies
>> the viewers for events.
>> It is apparent from the documentation that the viewers "read" events
>> from the ui/olive file.
>> However, when i cat that file from the shell and "play" with a terminal
>> a bit, i get no data.
>> The terminals are updated correctly which indicates that the events are
>> delivered.
>> I checked the source of olive (port/live/live.b) and it simply reads
>> (by calling updateproc(fd)) the file as expected.
>>
>> Obviously i am missing something important that the documentation does
>> not cover.
>> How can i read events posted by omero?
>>
>> Thanks
>
> There are two type of events. IIRC.
> User events like open, exec, ... are posted via o/ports, and you can
> read them from there.

Yes, i receive successfully events targeted to applications (o/mero:.*).
However ...

> UI events are sent through a file with a protocol for o/live.
> (Time ago they were sent also through ports, but I think I changed that).
> The viewer reads a tree and then gets updates from that file.
> That's internal and I don't think the man page describes that.

... i am interested for this ^^. In mero.b these events are described as

# Events:
#	from o/mero to o/live (via merop):
#		"Tupdate file data"
#		"Ctl top"
#		"Ctl ins tag vers pos string"
#		"Ctl del tag vers pos string"

I want to be able to listen precisely these events.
I assume by "the viewer reads a tree and then gets updates from that file"
you mean that the /mnt/ui/olive file is read?
I checked the viewers code again, and it does not do anything strange or
cryptic. The fact that bothers me is that by executing

% cat olive

I receive nothing, whereas by executing

% touch /mnt/ports/listen_app_events
% echo 'o/mero:.*' > listen_app_events
% cat listen_app_events

i receive application events (exec, close, ets) just fine.


> I can take a look to the source so I remember if you don't have luck
> with these hints.
>
> hth
>
>

Thanks for your time.


--
This => <aram@privatdemail.net> is my new email address.



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

* Re: [9fans] Question about o/mero -> o/live event notification mechanism
  2012-05-02 13:56   ` aram
@ 2012-05-02 15:02     ` Nemo
  0 siblings, 0 replies; 4+ messages in thread
From: Nemo @ 2012-05-02 15:02 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs


On May 2, 2012, at 3:56 PM, aram wrote:

> % cat olive
>
> I receive nothing, whereas by executing

Because IIRC that file is used to speak a protocol.
That is, unless you issue certain requests on that file, o/mero
wont reply.

That's used to synchronize all o/lives so that they all perform
very much like in cooperative editing environments.

The ctls you saw in the comment are the protocol (merop).




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

end of thread, other threads:[~2012-05-02 15:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-30 21:54 [9fans] Question about o/mero -> o/live event notification mechanism aram
2012-05-01  8:58 ` Nemo
2012-05-02 13:56   ` aram
2012-05-02 15:02     ` Nemo

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