csync talk at sambaxp 2009

23
Terminology and Concept Roaming Home Directories Plans for the future Roaming Home Directories Andreas Schneider <[email protected]> csync 23rd April 2009 Andreas Schneider <[email protected]> csync Roaming Home Directories

Upload: cynapses

Post on 08-Jul-2015

189 views

Category:

Documents


0 download

DESCRIPTION

Talk about csync a user level bidirectional file synchronizer especially for roaming home directories.

TRANSCRIPT

Page 1: csync talk at SambaXP 2009

Terminology and Concept Roaming Home Directories Plans for the future

Roaming Home Directories

Andreas Schneider <[email protected]>

csync

23rd April 2009

Andreas Schneider <[email protected]> csync

Roaming Home Directories

Page 2: csync talk at SambaXP 2009

Terminology and Concept Roaming Home Directories Plans for the future

Roaming Home Directories

1 Terminology and ConceptTerminologyConcept

2 Roaming Home DirectoriesPAMpam csync

3 Plans for the futureFeatures users or developers asked for

Andreas Schneider <[email protected]> csync

Roaming Home Directories

Page 3: csync talk at SambaXP 2009

Terminology and Concept Roaming Home Directories Plans for the future

Terminology

csync - roaming home directories

1 Terminology and ConceptTerminologyConcept

2 Roaming Home DirectoriesPAMpam csync

3 Plans for the futureFeatures users or developers asked for

Andreas Schneider <[email protected]> csync

Roaming Home Directories

Page 4: csync talk at SambaXP 2009

Terminology and Concept Roaming Home Directories Plans for the future

Terminology

Roaming Home Directories

Andreas Schneider <[email protected]> csync

Roaming Home Directories

Page 5: csync talk at SambaXP 2009

Terminology and Concept Roaming Home Directories Plans for the future

Terminology

Roaming Home Directories

We don’t talk about Profiles here

This is about synchronizing files!

No merging of content (not yet?)

Andreas Schneider <[email protected]> csync

Roaming Home Directories

Page 6: csync talk at SambaXP 2009

Terminology and Concept Roaming Home Directories Plans for the future

Terminology

What is a replica?

A tree or subtree of a filesystems

This could be local or remote

Changes are often made independently and as a result they donot contain the same information.

Andreas Schneider <[email protected]> csync

Roaming Home Directories

Page 7: csync talk at SambaXP 2009

Terminology and Concept Roaming Home Directories Plans for the future

Terminology

What is a conflict?

A path is conflicting if it fulfills the following conditions:

1 it has been updated on one replica

2 it or any of its decendants has been updated on the otherreplica too, and

3 its contents are not identical.

Andreas Schneider <[email protected]> csync

Roaming Home Directories

Page 8: csync talk at SambaXP 2009

Terminology and Concept Roaming Home Directories Plans for the future

Concept

csync - roaming home directories

1 Terminology and ConceptTerminologyConcept

2 Roaming Home DirectoriesPAMpam csync

3 Plans for the futureFeatures users or developers asked for

Andreas Schneider <[email protected]> csync

Roaming Home Directories

Page 9: csync talk at SambaXP 2009

Terminology and Concept Roaming Home Directories Plans for the future

Concept

What do we need?

We need a bidirectional file synchronizer

working with metadata (stat())

working with a metadata status database

client only (no specific daemon needed)

Andreas Schneider <[email protected]> csync

Roaming Home Directories

Page 10: csync talk at SambaXP 2009

Terminology and Concept Roaming Home Directories Plans for the future

Concept

What do we have?

csync simple file synchronizer which:

collects and checks metadata (update detection)

compares metadata (reconciliation)

copy the files (propagation)

Andreas Schneider <[email protected]> csync

Roaming Home Directories

Page 11: csync talk at SambaXP 2009

Terminology and Concept Roaming Home Directories Plans for the future

Concept

How do we detect updates?

We compare the modification time of the file with the db entry.

no entry = new file

newer modification time = file changed

equal modification time = no changes

...

Andreas Schneider <[email protected]> csync

Roaming Home Directories

Page 12: csync talk at SambaXP 2009

Terminology and Concept Roaming Home Directories Plans for the future

Concept

What do we do with conflicts?

The Merge Algorithm

doesn’t need any user interaction

it is used by Microsoft for Roaming Profiles

if it detects a conflict, it will use the most recent file andoverwrite the file on the other replica

Andreas Schneider <[email protected]> csync

Roaming Home Directories

Page 13: csync talk at SambaXP 2009

Terminology and Concept Roaming Home Directories Plans for the future

Concept

Which protocols are supported?

SMB: using Sambas libsmbclient

SFTP: using libssh (will be in 0.43)

Andreas Schneider <[email protected]> csync

Roaming Home Directories

Page 14: csync talk at SambaXP 2009

Terminology and Concept Roaming Home Directories Plans for the future

Concept

For developers

csync uses:

a red-black tree to store all information in memory

a sqlite3 database to store all the metadata for the nextsynchronization

a virtual IO plugin system to support different protocols

a unit testing framework

Andreas Schneider <[email protected]> csync

Roaming Home Directories

Page 15: csync talk at SambaXP 2009

Terminology and Concept Roaming Home Directories Plans for the future

PAM

csync - roaming home directories

1 Terminology and ConceptTerminologyConcept

2 Roaming Home DirectoriesPAMpam csync

3 Plans for the futureFeatures users or developers asked for

Andreas Schneider <[email protected]> csync

Roaming Home Directories

Page 16: csync talk at SambaXP 2009

Terminology and Concept Roaming Home Directories Plans for the future

PAM

Pluggable Authentication Module

Separates the tasks of authentication into four independentmanagement groups:

authentication management

password management

account management

session management

Andreas Schneider <[email protected]> csync

Roaming Home Directories

Page 17: csync talk at SambaXP 2009

Terminology and Concept Roaming Home Directories Plans for the future

pam csync

csync - roaming home directories

1 Terminology and ConceptTerminologyConcept

2 Roaming Home DirectoriesPAMpam csync

3 Plans for the futureFeatures users or developers asked for

Andreas Schneider <[email protected]> csync

Roaming Home Directories

Page 18: csync talk at SambaXP 2009

Terminology and Concept Roaming Home Directories Plans for the future

pam csync

pam csync does ...

authentication management to get the password and pass it to

session management to synchronize the files

Andreas Schneider <[email protected]> csync

Roaming Home Directories

Page 19: csync talk at SambaXP 2009

Terminology and Concept Roaming Home Directories Plans for the future

pam csync

pam csync features

pam winbind support to get the Profile directory from theADS

kerberos suppport

exclude users

Andreas Schneider <[email protected]> csync

Roaming Home Directories

Page 20: csync talk at SambaXP 2009

Terminology and Concept Roaming Home Directories Plans for the future

Features users or developers asked for

csync - roaming home directories

1 Terminology and ConceptTerminologyConcept

2 Roaming Home DirectoriesPAMpam csync

3 Plans for the futureFeatures users or developers asked for

Andreas Schneider <[email protected]> csync

Roaming Home Directories

Page 21: csync talk at SambaXP 2009

Terminology and Concept Roaming Home Directories Plans for the future

Features users or developers asked for

GUI support

What’s needed?

A conflict algorithm

Callback that for the GUI to display and modify conflicts

Andreas Schneider <[email protected]> csync

Roaming Home Directories

Page 22: csync talk at SambaXP 2009

Terminology and Concept Roaming Home Directories Plans for the future

Features users or developers asked for

More protocols

WEBDAV: maybe possible with libneon

RSYNC: maybe we can talk to rsync

own daemon with mimetype support to merge special contents

Andreas Schneider <[email protected]> csync

Roaming Home Directories

Page 23: csync talk at SambaXP 2009

Terminology and Concept Roaming Home Directories Plans for the future

Features users or developers asked for

Questions & Answers

Interested in development?

Poject page: http://www.csync.org/

Andreas Schneider <[email protected]> csync

Roaming Home Directories