[gamin] Re: [PATCH] inotify 0.5



  Sorry for the delay, my laptop decided to break while at OLS making
mail and related work near impossible...

On Wed, Jul 21, 2004 at 10:47:10PM -0400, John McCutchan wrote:
[...]
> My idea is that when we are packaging the events for the client we can
> scan the events we have already queued to be sent to the client, and if
> the events are the same we toss the one out. A couple questions.. (I
> haven't gotten a firm grasp on FAM/gamin yet) does the client (aka
> nautilus,etc) ask for all pending events ? or do we just push them down
> a fd and nautilus reads them whenever it feels like it?

  it's synchronous, the second kind, which makes filtering a bit harder.
The main problem  people raised (with fam) is that if a file is being
monitored (or in a monitored dir) and grows very fast, you get a continuous
stream of FAM event consuming most of your CPU. Avoiding this effect
could be done by rate limiting Changed events for a given file. You still
don't want to block them completely as FAM is used for example to monitor
log files.

> Either way I think flow control and event merging shouldn't be too hard.
> We just need a staging ground for 'new events' where we could batch them
> up and say once per second send them off to the clients or fd.

  yup, you don't want to delay the event, but block successive Changed events
until a given delay. This can be done completely server based.

> > > One question about gamin, why does it not have a backend shutdown
> > > routine? 
> > 
> >   I'm not 100% sure I understand, maybe the answer is because
> > this wasn't available in the FAM API.
> 
> We should be able to add this right? It shouldn't affect the fam API,
> just when gamin is shutting down call a backend shutdown callback.

  I'm still unclear. Do you mean libgamin ? How would the library knows
it's shutting down, since FAM is the only user visible interface from the
library to the application (and I would really like to keep it that way).
It seems I'm missing something, or do you mean a internal API call at the
server level when it's shutting down (say on SIGINT signal) ?

Daniel

-- 
Daniel Veillard      | Red Hat Desktop team http://redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]