README.md 967 字节
Newer Older
G
gongweibao 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
# Desgin doc: FileManager
## Objetive
在本文档中,我们设计说明了用户上传、下载、管理自己在PaddlePaddle Cloud上的文件所涉及到的模块和流程
<image src=./src/filemanager.png width=600>

## Module
### Client
Client是用户操作的界面,支持的命令如下

- ls
 
```bash
ls
```

- cp

```bash
cp 
```

- sync

```bash
sync
```

- mv

```bash
mv
```


### Ingress
- 在kubernets中运行
- 做Http转发
- 注意配置session保持


### FileServer
FileServer是gorpc写的HttpServer, 用来接收Client的REST API的请求,自身由kubernets来管理。
REST API说明

- file

```
GET /file: Get attribue of files
POST /file: Touch a file 
DELETE /file: Delete a File
```

- chunk
 
```
GET /file/chunk: Get a chunk info 
POST /file/chunk: Update a chunk
```

- dir

```
GET /dir: List all files in a directory
POST /dir: Touch a directory
DELETE /dir: Delete a directory
```


## 流程
### cp
### 断点续传
### sync