[ANN] rev 0.3.1: a libev-based event framework, now with betterfilesystem monitoring

Discussion in 'Ruby' started by Tony Arcieri, Oct 15, 2009.

  1. Tony Arcieri

    Tony Arcieri Guest

    [Note: parts of this message were removed to make it a legal post.]

    rev 0.3.1 is largely a maintenance/bugfix release, but it comes with a new
    feature: configurable filesystem polling intervals.

    The previous version introduced Rev::StatWatcher, a simple observer that
    notifies you if stat() for a given path changes. Thanks to rev's
    libev-based core, rev can do this while monitoring for events on any Ruby IO
    object, and all in a single thread. On Linux, filesystem monitoring uses
    inotify, a high-performance interface which receives event notifications
    directly from the kernel. On all other platforms, libev monitors the
    filesystem using stat() polling.

    The previous version did not allow you to configure this polling interval,
    and used a "default" of approximately 5 seconds intended to maximize
    performace. This is unacceptable in some cases where you want filesystem
    monitoring closer to realtime.

    0.3.1 lets you create new filesystem watchers with a prespecified polling
    interval:

    Rev::StatWatcher.new("./path/to/interesting/file", 0.5)

    This will check the status of the given path every 0.5 seconds rather than
    every 5 seconds. Values below 0.1 are not particularly meaningful. On
    Linux the polling interval is ignored and events are received as soon as
    inotify reports them.

    --
    Tony Arcieri
    Medioh/Nagravision
    Tony Arcieri, Oct 15, 2009
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Tony Arcieri
    Replies:
    6
    Views:
    159
    Tony Arcieri
    Jan 1, 2008
  2. Tony Arcieri
    Replies:
    1
    Views:
    123
    Roger Pack
    Feb 2, 2009
  3. Tony Arcieri
    Replies:
    3
    Views:
    186
    Tony Arcieri
    Aug 31, 2009
  4. Tony Arcieri
    Replies:
    14
    Views:
    440
    Tony Arcieri
    Dec 9, 2010
  5. Tony Arcieri
    Replies:
    0
    Views:
    395
    Tony Arcieri
    Dec 14, 2010
Loading...

Share This Page