Commit 26759686 authored by 黄大凯's avatar 黄大凯
Browse files

Update README

parent 871fee96
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -17,24 +17,24 @@
- [x] Fetch the file list
- [x] Request & download files

## Why we don't need block checksum?
#### Why we don't need block checksum?
Rsync requires random reading and writing of files to do the block exchange. But object storage does not support that.
rsync-os simplifies the rsync algorithm to avoid random reading and writing. When a file needs to be updated, we just download the entire file from the server and then replace it.

## HandShake
#### HandShake
rysnc-os supports rsync protocol 27. 
It sends the arguments "--server--sender-l-p-r-t" to the remote rsyncd by default.

## The File List
#### The File List
According the arguments rsync-os sent, the file list should contain path, size, modified time & mode. 
 
## Request the file
#### Request the file
rsync-os always saves the file list in its database(local file list). rsync2os doesn't compare each file with the file list from remote server(remote file list), but the latest local file list. If the file in the local file list has different size, modified time, or doesn't exist, rsync2os will download the whole file(without [block exchange](https://github.com/kristapsdz/openrsync#block-exchange)). To to do that, rsync2os sends the empty block checksum with the file's index of the remote file list. 

## Download the file
#### Download the file
The rsync server sends the entire file as a stream of bytes.

## Multiplex & De-Multiplex
#### Multiplex & De-Multiplex
![de-multiplex](https://raw.githubusercontent.com/kaiakz/rsync-os/master/docs/demux.jpg)

### Limitations