/usr/share/doc/gamin
NameSizeModeActions
AUTHORS1530644editdlrm
callbacks.gif45140644editdlrm
ChangeLog832560644editdlrm
client_server.gif46240644editdlrm
config.html68830644editdlrm
contacts.html53580644editdlrm
debug.html73730644editdlrm
debugging.txt12880644editdlrm
devel.html49680644editdlrm
differences.html67690644editdlrm
downloads.html42000644editdlrm
FAQ.html39630644editdlrm
gamin.html323850644editdlrm
index.html81040644editdlrm
internals.html54200644editdlrm
NEWS97100644editdlrm
news.html144560644editdlrm
overview.html53240644editdlrm
python.html62920644editdlrm
README15160644editdlrm
security.html67680644editdlrm
server_structs.gif88800644editdlrm
socket.txt16300644editdlrm
TODO26540644editdlrm
using.html40960644editdlrm
Edit: /usr/share/doc/gamin/internals.html (5420B)
Internals

Gamin the File Alteration Monitor

Internals

Main Menu
Related links

gamin uses a client server model, this is in a large measure justified by the inappropriate dnotify kernel API way to signal modification events to an application but also to share kernel signal when multiple application monitors the same resource. It also allow to fine tune and filters event flow in the daemon, potentially minimizing resource consumption in applications.

One server and two client connected

Internally the gam_server maintain various data structures:

  • A tree of monitored nodes, using both GamNode structure containing specific informations (like the path, the subscriptions list for that node, monitoring data and whether it's a directory), the tree itself is based on a GNode N-ary tree.
  • Per connection data (GamConnData) one per connected socket. The data includes state, connection informations (file descriptor, Glib I/O Channel, pid of the application), and potential unprocessed yet data request from the socket.
  • Listener information, keeps the list of subscriptions for the connected application, this could probably be merged in the connection data.
  • For each path monitored by an application, a specific GamSubscription structure is maintained. The subscriptions are referenced both from the monitored nodes tree and from the listeners.

the data structures present in the server

Daniel Veillard