Internals - aegif/CmisSync GitHub Wiki
Users don't need this information, it is here as a reference for developers.
CmisSync runs as a single process on the client machine. It has one thread for each synchronized folder.
Each synchronized folder has an SQLite database to store metadata (in JSON) and date/checksum of the last version seen on the server side.
The Windows installer is built with WiX.
The synchronization algorithm itself can be found in the Cmis.Lib/Sync folder and especially CrawlStrategy.
Important: Always back up your synchronized documents somewhere else before attempting to modify this file manually, as it could result in loss of data (including on the server).
CmisSync's config file can usually be found at C:\Users\nico\AppData\Roaming\cmissync\config.xml
(replace nico
with your user name. Note: Configure Windows to show hidden files, otherwise you might not see AppData
).
It contains, for each CMIS folder:
- name: a name for this checkout. CmisSync tries to find a good name, but anything is fine except slashes
- url: CMIS URL
- repository: id of the CMIS repository to use (there can be several repositories at the same URL)
- remoteFolder: folder on the repository. With prefix slash but no trailing slash.
- user
- hashed password
- poll interval, in milliseconds
Full example:
<?xml version="1.0" encoding="UTF-8"?>
<CmisSync>
<user>
<name>nraoul</name>
<email>Unknown</email>
</user>
<log4net>
<appender name="CmisSyncFileAppender" type="log4net.Appender.RollingFileAppender">
<file value="C:\Users\nraoul\AppData\Roaming\cmissync\debug_log.txt" />
<appendToFile value="true" />
<rollingStyle value="Size" />
<maxSizeRollBackups value="10" />
<maximumFileSize value="5MB" />
<staticLogFileName value="true" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date [%thread] %-5level %logger [%property{NDC}] - %message%newline" />
</layout>
</appender>
<root>
<level value="DEBUG" />
<appender-ref ref="CmisSyncFileAppender" />
</root>
</log4net>
<folders>
<folder>
<name>s1</name>
<path>C:\Users\nraoul\CmisSync\sales</path>
<url>http://192.168.0.22:8080/alfresco/cmisatom</url>
<repository>7d52d0ed-5108-4dba-8100-48b63b9d3541</repository>
<remoteFolder>/Sites/sales/documentLibrary</remoteFolder>
<user>nicolas.raoul</user>
<password>AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAAtiSvUCYnDkGdPOuyhiThTwAAAAACAAAAAAAQZgAAAAEAACAAAADexlyLIms+TPKj/w52HwkYjiHXI5JTF3GkFVSr1wZHBgAAAAAOgAAAAAIAACAAAADehsLp6b/ZO+YAUu57xf9kmRqsTYZSZn7hCgNfEXFbdxAAAAAIkBNhEZrtiGnXkugNIuEGQAAAAFQbSOpuPy2/XyTt5nu3CgLoQsVVfIrBF3jfrFs23mgMBlEx6RW1YHgohJYTDgPPYA+MpWY8B/KEBUY7qdIIzok=</password>
<pollinterval>5000</pollinterval>
</folder>
</folders>
<notifications>True</notifications>
</CmisSync>
On Windows, never change the drive of a folder (for instance from C: to D:) as it is also stored in the SQLite database.
Here are a few tests that someone should perform to ensure CmisSync can be used in all circumstances. Feel free to add more test ideas! Thanks in advance to anyone who performs these tests, please let us know about whether it works on the forum/Twitter/email.
- Very large file
- Intermittent network connection
- Very slow network connection
- Many files in a single folder
The synchronization algorithm is in CmisSync.Lib/Sync
.
CmisSync uses an SQLite database to cache checksums, server-side modification dates, etc, in Database.cs
.
The source code contains a lot of comments so it should be explicit. Please let us know if something is lacking.
The UI is based on SparkleShare, an excellent Git-synchronization tool.