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.