diff --git a/doc/design/file_manager/README.md b/doc/design/file_manager/README.md index 2cfc459d2bc5c435bf48411d0e75d3960bf3985e..3df10d801e568834729f902aace483d033340e2d 100644 --- a/doc/design/file_manager/README.md +++ b/doc/design/file_manager/README.md @@ -34,16 +34,16 @@ ### PFSServer PFSServer提供RESTful API接口,接收处理PFSClient端的文件管理请求,并且把结果返回PFSClient端。 -``` RESTful API - /api/v1/files - - `GET /api/v1/files`: Get attributes of files or directories. - - `POST /api/v1/files`: Update files or directories. + - `GET /api/v1/files`: Get metadata of files or directories. + - `POST /api/v1/files`: Create files or directories. + - `PATCH /api/v1/files`: Update files or directories. - `DELETE /api/v1/files`: Delete files or directories. - /api/v1/file/chunks - - `GET /api/v1/storage/file/chunks`: Get chunks's attributes of a file. + - `GET /api/v1/storage/file/chunks`: Get chunks's metadata of a file. - /api/v1/storage/files - `GET /api/v1/storage/files`: Download files or directories. @@ -52,11 +52,11 @@ RESTful API - /api/v1/storage/file/chunks - `GET /api/v1/storage/file/chunks`: Download chunks's data. - `POST /api/v1/storage/file/chunks`: Upload chunks's data. -``` + ## 文件传输优化 ### 分块文件传输 -用户文件可能是比较大的,上传到Cloud或者下载到本地的时间可能比较长,而且在传输的过程中也可能出现网络不稳定的情况。为了应对以上的问题,我们提出了Chunk的概念,一个Chunk由所在的文件偏移、数据、数据长度及校验值组成。文件数据内容的上传和下载都是都过Chunk的操作来实现的。由于Chunk比较小(默认256K),完成一个传输动作完成的时间也比较短,不容易出错。PFSClient需要在传输完毕最后一个Chunk的时候检查destination文件的MD5值是否和source文件一致。 +用户文件可能是比较大的,上传到Cloud或者下载到本地的时间可能比较长,而且在传输的过程中也可能出现网络不稳定的情况。为了应对以上的问题,我们提出了Chunk的概念,一个Chunk由所在的文件偏移、数据、数据长度及校验值组成。文件的上传和下载都是通过对Chunk的操作来实现的。由于Chunk比较小(默认256K),完成一个传输动作完成的时间也比较短,不容易出错。PFSClient需要在传输完毕最后一个Chunk的时候检查destination文件的MD5值是否和source文件一致。 一个典型的Chunk如下所示: diff --git a/doc/design/file_manager/pfs/pfsclient.md b/doc/design/file_manager/pfs/pfsclient.md index eb119689bf5bd0bb184696016bb181da0f5f87f7..56bc70c54bbc92b78d66e04fb495b1300cf8ebe0 100644 --- a/doc/design/file_manager/pfs/pfsclient.md +++ b/doc/design/file_manager/pfs/pfsclient.md @@ -109,7 +109,7 @@ Synopsis: ls [-r] ... Options: - -r + -R List directory(ies) recursively Examples: