[Csync2] old patches and such

Art -kwaak- van Breemen ard+csync2 at telegraafnet.nl
Tue Nov 24 14:10:14 CET 2009


Well, this should be new "patches":
http://projects.kwaak.net/twiki/pub/CSync2/WebHome/new-csdb.tar.bz2
No patches, just my current work.
That work is:
Extend textlist to have both append as wel as prepend
functionality.
Move al database queries to a single seperate file to prepare
for:
A "metadata" daemon, which actually is a very light
database daemon ;-).
Rework code to first fetch a work list (short queries), before
doing the work. It means that there are no nested queries
anymore.

More about the content:
The database query layer works without url-encoded filenames. If
url-encode is needed, it must be done before calling the
functions.
The metadata daemon uses a unix socket. It performs some sort of
message passing instead of rpc (which actually is the same),
because in the feature we actually want to use the metadata
daemon to understand that hints given with inotify have some
relation with files received from a csync2 peer, and so should be
discarded.
Currently it is a single thread that accepts multiple
connections, and performs a single database query at a time.
The client side therefore is tightly coupled in the sense that it
will receive all data of the query before returning from the
calls.
In a sense this just gives us just a simple mutex and
serialization.
The daemon takes about 2MB to run:
  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND           
21803 root      40   0 20988 2152 1152 S    0  0.1   0:00.04 csync2             


For the daemon to work you have to have:
csdb-socket /var/lib/csync2/csdb-connection;
in the csync2.cfg
If the configuration is there, you must start the daemon with
csync -b
before doing anything.

Anyway: I also splitted the database files, so don't try it
unless you already use that ;-).
(this means if you were already using:
http://projects.kwaak.net/twiki/pub/CSync2/WebHome/csync2-r401-experimental-patches.patch
it's not a problem).

This is pre-alpha quality.
It compiles!
I will now test it on some production systems :-).
Specifically I probably have problems with url_encode and decode.


More information about the Csync2 mailing list