 Hello. I will talk today about a file synchronizer, which is called Csync. It's a bi-directional file synchronizer. And the main purpose of CIS is to provide home, roaming home directories for Linux systems. So let's get an overview of what this is about. Normally what you have or what you want. Here, just an example with Windows. Assume that you have several Linux clients which are, for example, in an active directory environment. And you are working on a Linux workstation and you have a server with a share where you can put data on. And what you want is to unlock in that your data is synchronized from the server to your client. Then you work. And when you log out, the data is synchronized back so that you have a backup and have actual data if you, for example, lock into another client. I want to make sure that this is, that we don't here talk about to synchronize profiles. This is just about synchronizing files. So there is no merge of content or anything like that going on, maybe in the future. I want to make sure that you understand what the conflict is, which I will talk about it. Simply assume you have two directories. You have the same file in these two directories. You edit both files and they have different content. And if you want to synchronize these files, you have a conflict because both files have changed. And I will tell you how we will resolve this later. So let's look a little bit at the concepts. What we have now is Csync, which is a library with a simple command line client. And what Csync does is it does a synchronization in several steps or several phases. The first is that you collect metadata from your file systems. This means that you walk over a file system directory tree and collect the metadata. And then you check the metadata normally with a database. This is called update detection. After that, you do this for, for example, if you synchronize with Linux client and the server, then you do the update detection for, for, on your client and then on the server. And the next step is that you compare the metadata. So you know what you have on the client and on the server. You compare them and decide which file needs to be synchronized in which direction. And the final step is simply to copy the files, which is called propagation. So let's look at how updates are detected. Assume that you have, that you get the metadata from a file that we use the modification time to detect if a file has changed. And we have a database with, with an entry for each file we already synchronized. And then we simply compare the file or the modification file, modification time of the file with the entry in the database. If there is no entry in the database of that file, then we have a new file. If some modification time is new, then the file has changed and needs to be synchronized. If it is equal, then there are no changes. And if both files on both replicas or on the client and on the server have changed, then yeah, you have conflict. So what do we do if we detect a conflict? And this is important currently. There is only one algorithm to handle these conflicts. It is called the merge algorithm. And this algorithm doesn't need any user interaction. It is used by Microsoft for roaming profiles. The intention is not to be better than Microsoft. The reason is I've developed this especially for Samba or for Windows environments where you use Samba or a part of Samba to join a Linux client to an Active Directory domain. And if it detects a conflict, then it will use the most recent file and will override the file on the other replica. This means that it is possible that you will lose any data. But it turned out that this is working really great on Microsoft. And so that's why I implemented it in the same way so that most users who are used to it don't get confused. The plan is to support other conflict algorithms in the future, but not at the moment. So C-Sync uses doesn't have any special protocol. It uses what is already available. So protocols which are supported are, for example, S&B with S&B client from Samba to synchronize with a Windows server or you can synchronize with a Samba server which should have CIFS Unix extensions enabled or you can use, you can synchronize using SFTP which is done with Slip SSH. This is currently supported. It's wrong that this will be supported in this version. 0.43 is already out. I will release the next version next week which has been updated to use a new version of S&B. And you can use this file synchronizer to synchronize local directories, too. The difference between, for example, I think most of you know R-Sync. R-Sync is a unidirectional file synchronizer so it just synchronizes in one direction. So the purpose of it is for backups. And here you have a synchronizer which synchronizes in both directions. And you can use it for local directories, too, to keep them completely in sync. Just for some developers who are interested how Sysys is done, Sysync uses a red black tree to store all the information in memory so it is really fast, especially on update detection. And if you do reconciliation, then Sysys is completely done on the red black tree and it is really fast. And if you have a lot of files, then it can do it in less than one second normally. SQL database is used to store all the metadata you need for this synchronization. It has a virtual I.O. plug-in system to support all the protocols. Currently these are as you have seen S&B and SFTP. I haven't looked at other protocols yet, but where is this page? I haven't looked at other protocols but it would be possible to simply support them. And Sysync has been developed with unit testing framework. So if you, for example, want to create a new I.O. plug-in for the system, then you can simply run the testing framework and make sure that it works. If you want to now have roaming home directories using Sysync, then this is done in the PAM stack. There is a PAM module which is called PAM Sysync. And this PAM module does authentication management to get the password and it passes it to the session management. And this will call the file synchronizer and synchronize all the files. The problem here is that the PAM stack is really old and during file synchronization you are completely blocked during the login process. The problem is that maybe some users get confused here because they think the whole machine blocks here, but there is no possibility to give feedback on the synchronization process back to the system and to show it to the user. PAM Sysync has some features, especially it works really good with PAM Windbind. And if you use PAM Windbind, then it has a special mode that gets the information from the Active Directory server. It has Kerberos support. So if you use the SMB plug-in, it will use Kerberos for the synchronization of the credentials. It can exclude users which you don't want that they get synchronized. And I've implemented some more features to change several locations with a list there because some user requested it. And the source code is also at the same place as you can find the file synchronizer called Sysync. So I have some plans for the future, but I don't know if I will find time in the next or in this year to implement everything. So one thing which has been requested would be free IPA integration. Free IPA is an identity management like Active Directory but only for Linux. And here what I want is a way that you can define a roaming home in free IPA and free IPA has to provide a way that it can pass this directory to the PAM stack and I can use it to set up synchronization for it. If you are using already using free IPA, you can use PAM Sysync and Sysync with the SFDP protocol. You just have to set it up on every machine and there is no central possibility to change it. Then some users have requested if it would be possible to integrate a GUI support. For this I want to create a conflict algorithm. So if you want to solve a conflict there is one possibility which is the merge algorithm to always use the latest file and the correct solution would be to ask the user what he wants to do and for this you need a GUI application. It's really hard to support it with PAM because you don't have any conversation with PAM and for this you need a GUI application which uses Sysync to synchronize all the stuff. The plan would be possible to support more protocols in the future like maybe it is possible to talk to an R-Sync daemon and to differential just to synchronize diffs. Webduff would be a possibility and an own daemon which has MIME type support there which has MIME type support too to merge contents would be nice too. Some users ask if this would be possible but not at the moment and I'm thinking about a bigger picture of file synchronization but this needs a lot of work and for this you need a daemon but this would be a start to research the stuff so if you have questions we have I think two minutes left you can ask him now or grab me here at FOSSTEM and ask. There is a user guide which describes everything I've talked about it in details please take a look at it if you have further questions or ask me here. Now the plan was completely here to be that you can do everything as a user with protocols which are available and you don't need to install a special server component but I'm not sure if subversion would be suitable for that. Yeah I think we are handling here files and the best is normally to stay at the file system and yeah but maybe.