SDS:软件定义存储 Soft Define Storage Distributed Storage:分布式存储 三种服务:块存储,文件存储,对象存储 不管哪种服务类型,所提供的API核心都是create,delete,write,read
块存储的API
create delete: 例如rbd的创建与删除
块设备的读写是以扇区为单位的,一般由相应的驱动程序实现,在内核态实现
write read:<offset, length, data>
用户态的块设备一般是当作普通文件,通过文件接口进行操作的
文件存储Posix File API
[https://www.man7.org/linux/man-pages/man2/open.2.html](https://www.man7.org/linux/man-pages/man2/open.2.html)
以下是Linux系统的文件操作系统调用
int creat(const char *pathname, mode_t mode)
int open(const char *pathname, int flags)
int close(int fd)
ssize_t write(int fd, const void *buf, size_t count)
ssize_t read(int fd, void *buf, size_t count)
对象存储Restful API
[https://www.zhihu.com/question/28557115](https://www.zhihu.com/question/28557115)
[https://www.runoob.com/w3cnote/restful-architecture.html](https://www.runoob.com/w3cnote/restful-architecture.html)
资源URL:http:ip.com/uri,其中uri是资源名称
POST url
GET url
PUT url
Delete url
|