summaryrefslogtreecommitdiff
path: root/pnotify/pnotify-0.2/index.html
blob: 0da304d88485df547841186a6b80f477009c765d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
<html>
<head>
<title>pnotify - a portable filesystem event notifier</title>
</head>
<body>
<h1>pnotify</h1>
pnotify is an event notification framework for monitoring files and directories.
It is designed to be portable across different Unix-like operating systems, and currently
supports Linux and BSD.  The <a href="manpage.html">pnotify API</a> is very similar to the <a href="http://linux.die.net/man/7/inotify">inotify API</a> under Linux.

<center>
<hr width="50%">
<a href="#download">Download</a> | 
<a href="#docs">Documentation</a> | 
<a href="#mlist">Mailing list</a> 
<hr width="50%">

</center>

<h2>Rationale</h2>

Kernel-based filesystem event notification is a relatively new phenonemon, and several
different approaches have been taken by various operating systems. 
Linux uses inotify, BSD uses kqueue, Apple has kqueue and it's own Spotlight system calls, Solaris has FEM, Windows has the NTFS Change Journal and the ReadDirectoryChangesW function, and so forth.
<p>
The goal of pnotify is to provide a simple, cross-platform API for monitoring filesystem
events.  The library will conceal all of the messy implementation-specific details from the user and help them to write more portable programs.

<h2>History</h2>

pnotify was born out of an effort to port the inotify API from Linux
to BSD. This initial effort took the form of a userspace library that would translate
inotify requests into their kqueue(4) equivalent. After some time, it became clear that 
kqueue was not sophisticated enough to support all of the functionality of inotify.
There was also the problem of threadsafety; inotify relies on shared global data
structures, which is normal within the kernel but complicates the design of a userspace library.
<p>
Eventually, it became clear that a new API was needed to address these portability and threadsafety issues. This new API became 'pnotify', to indicate that it is a portable subset of the
inotify API.  

<h2>Supported Platforms</h2>

pnotify has been ported to the following platforms:

<ul>
<li>Linux 2.6
<li>OpenBSD 4.0
<li>NetBSD 3.0
<li>MacOS/X 10.4
</ul>

There are platforms that are not supported due to lack of developer resources.
Interested parties with access to these platforms are encouraged to port
the library to their platform. For example:

<p>
<ul>
<li>Sun OpenSolaris will soon get a similar API called FEM that could be supported.
<li>Microsoft Windows has a filesystem event notification mechanism
</ul>
<p>
At the current time, there is no generic polling mechanism to use as a fallback
for systems that don't have a kernel event mechanism like inotify or kqueue.

<h2>Usage</h2>

When you run './configure && make && make install', pnotify is built
as a shared library and installed under the /usr/local prefix.
<p>
Even though pnotify is built as a shared library by default, 
it is easier for application developers to include
pnotify.c and pnotify.h in their source tree and not depend
on the existence of a shared library. 

<a name="download">
<h2>Download</h2>
</a>

The source code may be downloaded from the <a href="http://code.google.com/p/pnotify/downloads/list">download page</a>. You may also check out a working copy of the latest
development sources by issuing the following command:
<p>
<code>
svn checkout http://pnotify.googlecode.com/svn/trunk/ pnotify
</code>
<p>
If you just want a quick peek at the source code, you can browse the <a href="http://pnotify.googlecode.com/svn/trunk/">webSVN repository</a>

<a name="docs">
<h2>Documentation</h2>
</a>
<ul>
<li>The pnotify(3) manpage in <a href="manpage.html">HTML</a> or <a href="manpage.ps">PostScript</a> format.
<li>Doxygen-generated API reference manual (coming soon)
</ul>

<a name="mlist"></a>
<h2>Mailing List</h2>

There is a mailing list for discussion about the pnotify library. Click
<a href="http://groups.google.com/group/pnotify/topics">here</a> to sign up,
post a question or comment, or browse through the archives.

<h2>Contact the Author</h2>

For more information, contact Mark Heily at <a href="mailto:devel@heily.com">devel@heily.com</a>

<h2>Related Links</h2>

<ul>
<li><a href="http://oss.sgi.com/projects/fam/">FAM</a> - the original, unmaintained monitoring utility from SGI.
<li><a href="http://www.gnome.org/~veillard/gamin/">gamin</a> - the modern FAM replacement. Part of the GNOME project.
<li><a href="http://monkey.org/~provos/libevent/">libevent</a> - a library for building event-driven servers. Supports socket events, but not filesystem events.
</ul>
<hr>
(C) 2007 Mark Heily.
</body>
</html>