CN115268797B - 一种通过WebDav实现系统与对象存储通信的方法 - Google Patents

一种通过WebDav实现系统与对象存储通信的方法 Download PDF

Info

Publication number
CN115268797B
CN115268797B CN202211170991.9A CN202211170991A CN115268797B CN 115268797 B CN115268797 B CN 115268797B CN 202211170991 A CN202211170991 A CN 202211170991A CN 115268797 B CN115268797 B CN 115268797B
Authority
CN
China
Prior art keywords
request
object storage
command
parameter
returned result
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202211170991.9A
Other languages
English (en)
Other versions
CN115268797A (zh
Inventor
张颖
韩松
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chuangyun Rongda Information Technology Tianjin Co ltd
Original Assignee
Chuangyun Rongda Information Technology Tianjin Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chuangyun Rongda Information Technology Tianjin Co ltd filed Critical Chuangyun Rongda Information Technology Tianjin Co ltd
Priority to CN202211170991.9A priority Critical patent/CN115268797B/zh
Publication of CN115268797A publication Critical patent/CN115268797A/zh
Application granted granted Critical
Publication of CN115268797B publication Critical patent/CN115268797B/zh
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0614Improving the reliability of storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2219Large Object storage; Management thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0629Configuration or reconfiguration of storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/0643Management of files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/067Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]

Abstract

本发明公开了一种通过WebDav实现系统与对象存储通信的方法,其涉及通信技术领域。具体地,WebDavService执行的步骤包括:WebDavService内置的网络服务模块接收系统客户端的请求信息:包含有命令头和命令参数的操作信息;将请求信息通过RequestParser解析并处理为包含有不同请求命令和参数的MethodDescription;MethodMapping将相应的请求命令映射为对象存储相应的处理命令,并通过MethodHandler处理请求命令和参数,及通过OSDSDK与对象存储中的桶通信。通过WebDav可以直接将对象存储的桶挂载于操作系统中,使用户可以不利用第三方工具的情况下通过简单挂载实现与对象存储系统的通信,避免了需要繁琐的开发才可以实现与对象存储通信的不便利性。

Description

一种通过WebDav实现系统与对象存储通信的方法
技术领域
本发明涉及通信技术领域,特别涉及一种通过WebDav实现系统与对象存储通信的方法。
背景技术
简单来说,WebDav就像一个存储服务,各种应用都可以连接到它,允许应用直接访问内容,对其进行读写操作。WebDav普遍应用于网盘系统,小型NAS中也支持WebDav访问。常见操作系统通常都原生支持WebDav的访问,可以直接以盘符的形式将WebDav挂载于操作系统中,通过文件浏览器既可以轻松实现对文件的浏览访问与常规操作,在企业与个人用户中得到广泛应用。
对象存储是一种将数据作为对象进行管理的计算机数据存储体系结构,与其他存储体系结构(例如将数据作为文件层级管理的文件系统)以及将数据作为块和扇区内的块进行管理的块存储相对。每个对象通常包括数据本身,可变数量的元数据和全局唯一标识符。对象存储可以在多个级别实现,包括设备级别(对象存储设备),系统级别和接口级别。在每种情况下,对象存储都试图实现其他存储架构无法解决的功能,例如可以由应用程序直接编程的接口,可以跨越多个物理硬件实例的命名空间,以及数据管理功能,如数据复制和数据分发在对象级粒度。相比于数据库这种面向结构化数据存储的技术,对象存储主要面向存储大量的非结构化数据,通俗来说,日常生活中生成的照片、视频、音频、文档等都属于非结构化数据,这些日常产生的数据都适合存储在对象存储中,现在几乎所有公有云服务商都提供对象存储服务。
主流操作系统均支持WebDav直接挂载,但不支持对对象存储的直接挂载访问,无法将对象存储便利的与系统对接,通常需要本地应用通过API的形式与对象存储通信,需要一定专业知识与开发技能,通过专有SDK与之通信。
现有技术中,无法通过WebDav访问对象存储服务,通常通过WebDav结合系统元数据直接访问系统块存储设备,达到数据访问目的,但块存储无法对数据进行更好的保护,极易因磁盘故障导致数据不可访问。所以如何利用对象存储的高可用、海量文件存储、以及数据冗余保护等特性提升WebDav性能与可靠性是一个需要解决的技术难题。
发明内容
基于此,有必要针对上述技术问题,提供一种通过WebDav实现系统与对象存储通信的方法。
本发明实施例提供一种通过WebDav实现系统与对象存储通信的方法,WebDavService执行的步骤包括:
WebDavService内置的网络服务模块接收系统客户端的请求信息,所述请求信息包括:包含有命令头和命令参数的操作信息;
将请求信息通过RequestParser解析并处理为包含有不同请求命令和参数的MethodDescription;
MethodMapping将相应的请求命令映射为对象存储相应的处理命令,并通过MethodHandler处理请求命令和参数,及通过OSDSDK开发库与对象存储中的桶通信;
将通信后的返回结果通过ResultConverter转义提交后返回给系统客户端。
进一步地,所述请求信息还包括:包含有用户名和密码的验证信息;
相应地,WebDavService执行的步骤还包括:根据验证信息校验请求合法性,当请求合法将触发WebDav与对象存储通信,当请求有误将通过WebDavService返回错误。
进一步地,所述包含有不同请求命令和参数的MethodDescription,包括:
ListMethodHandlerl列出对象;
GetMethodHandlerl读取对象;
PostMethodHandlerl写入对象;
DeleteMethodHandlerl删除对象;
HeadMethodHandlerl获取对象信息。
进一步地,当执行所述ListMethodHandlerl列出对象时,其具体包括:
当请求命令为GET命令、参数为“/”结尾的路径参数A时,MethodMapping映射对应于ListMethodHandler,列出对象存储内相应桶内以参数A为前缀的对象数据,并将返回结果解析;
将返回结果由ResultConverter转义提交后返回给系统客户端。
进一步地,当执行所述GetMethodHandlerl读取对象时,其具体包括:
当请求命令为GET、参数为具体文件路径B时,MethodMapping映射对应于GetMethodHandler,并视参数B为对象KEY,对应读取对象存储桶内对应KEY内容,并将返回结果解析;
将返回结果由ResultConverter转义为WebDav返回值格式,数据体部分以数据流形式在内存Cache区转存并写回Response,再返回给系统客户端。
进一步地,当执行所述PostMethodHandlerl写入对象时,其具体包括:
当请求命令为POST、参数为具体文件路径C与数据体D时,MethodMapping映射对应PostMethodHandler,并将视参数C为对象KEY,将内容D读取至内存Cache区,以数据流形式写入对象存储对应桶内,并将返回结果解析;
将返回结果由ResultConverter转义提交后返回给系统客户端。
进一步地,当执行所述DeleteMethodHandlerl删除对象时,其具体包括:
当请求命令为DELETE、参数为具体文件路径E时,MethodMapping映射对应DeleteMethodHandler,并将视参数E为对象KEY,执行删除对象存储桶内对应KEY,并将返回结果解析;
将返回结果由ResultConverter转义提交后返回给系统客户端。
进一步地,当执行所述HeadMethodHandlerl获取对象信息时,其具体包括:
当请求命令为HEAD、参数为具体文件路径F时,MethodMapping映射对应HeadMethodHandler,并将视参数F为对象KEY,执行获取对象存储桶内对应KEY的元数据信息,并将返回结果解析;
并将返回结果由ResultConverter转义提交后返回给系统客户端。
本发明实施例提供的上述通过WebDav实现系统与对象存储通信的方法,与现有技术相比,其有益效果如下:
本发明将WebDav与对象存储有机结合,提升对象存储的应用场景,通过WebDav可以直接将对象存储的桶挂载于操作系统中,使用户可以不利用第三方工具的情况下通过简单挂载实现与对象存储系统的通信,避免了需要繁琐的开发才可以实现与对象存储通信的不便利性。
附图说明
图1为一个实施例中提供的一种通过WebDav实现系统与对象存储通信的方法原理示意图。
具体实施方式
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
参见图1,本发明实施例中提供的一种通过WebDav实现系统与对象存储通信的方法方法,该方法具体包括以下9个步骤:
1. WebDavService内置的网络服务模块启动并监听80端口,接收客户端请求。请求信息中包含验证信息与操作信息,其中验证信息中主要包含用户名密码,操作信息中包含命令头与命令参数。
2. 当收到请求后会根据携带的验证信息校验请求合法性,当请求的用户合法将触发下一处理,当请求验证有误将通过WebDavService返回错误。
3. 将请求信息通过RequestParser解析并处理为MethodDescription。请求Method包括:POST、GET、DELETE、HEAD。
4. MethodMapping会将相应的请求命令映射为对象存储相应的处理命令,并通过MethodHandler处理请求命令,过程中通过OSDSDK与对象存储通信,实现对象存储处理。[OSDSDK]:为系统使用的封装了S3访问命令的SDK开发库。
5. 相应的,当请求命令为GET命令参数为“/”结尾的路径参数A时,MethodMapping映射将对应于ListMethodHandler,列出对象存储内相应桶内以参数A为前缀的对象数据,并将返回结果解析,并将返回结果由ResultConverter转义提交最终通过WebDavService返回给客户端。
6. 相应的,当请求命令为GET参数为具体文件路径B时,MethodMapping映射将对应GetMethodHandler,并视参数B为对象KEY,对应读取对象存储桶内对应KEY内容,并将返回结果解析,将结果由ResultConverter转义为WebDav返回值格式。数据体部分以数据流形式在内存Cache区转存并写回Response,最终通过WebDavService返回给客户端。
7. 相应的,当请求命令为POST参数为具体文件路径C与数据体D时,MethodMapping映射对应PostMethodHandler,并将视参数C为对象KEY,将内容D读取至内存Cache区,以数据流形式写入对象存储对应桶内,并将返回结果由ResultConverter转义提交,最终通过WebDavService返回给客户端。
8. 相应的,当请求命令为DELETE参数为具体文件路径E时,MethodMapping映射对应DeleteMethodHandler,并将视参数E为对象KEY,执行删除对象存储桶内对应KEY,并将返回结果由ResultConverter转义提交,最终通过WebDavService返回给客户端。
9. 相应的,当请求命令为HEAD参数为具体文件路径F时,MethodMapping映射对应HeadMethodHandler,并将视参数F为对象KEY,执行获取对象存储桶内对应KEY的元数据信息,并将返回结果由ResultConverter转义提交最终通过WebDavService返回给客户端。
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。

Claims (2)

1.一种通过WebDav实现系统与对象存储通信的方法,其特征在于,WebDavService执行的步骤包括:
WebDavService内置的网络服务模块接收系统客户端的请求信息,所述请求信息包括:包含有命令头和命令参数的操作信息;
将请求信息通过RequestParser解析并处理为包含有不同请求命令和参数的MethodDescription;
MethodMapping将相应的请求命令映射为对象存储相应的处理命令,并通过MethodHandler处理请求命令和参数,及通过OSDSDK开发库与对象存储中的桶通信;
将通信后的返回结果通过ResultConverter转义提交后返回给系统客户端;所述包含有不同请求命令和参数的MethodDescription,包括:
ListMethodHandlerl列出对象;
GetMethodHandlerl读取对象;
PostMethodHandlerl写入对象;
DeleteMethodHandlerl删除对象;
HeadMethodHandlerl获取对象信息;
当执行所述ListMethodHandlerl列出对象时,其具体包括:
当请求命令为GET命令、参数为“/”结尾的路径参数A时,MethodMapping映射对应于ListMethodHandler,列出对象存储内相应桶内以参数A为前缀的对象数据,并将返回结果解析;
将返回结果由ResultConverter转义提交后返回给系统客户端。;
当执行所述GetMethodHandlerl读取对象时,其具体包括:
当请求命令为GET、参数为具体文件路径B时,MethodMapping映射对应于GetMethodHandler,并视参数B为对象KEY,对应读取对象存储桶内对应KEY内容,并将返回结果解析;
将返回结果由ResultConverter转义为WebDav返回值格式,数据体部分以数据流形式在内存Cache区转存并写回Response,再返回给系统客户端;
当执行所述PostMethodHandlerl写入对象时,其具体包括:
当请求命令为POST、参数为具体文件路径C与数据体D时,MethodMapping映射对应PostMethodHandler,并将视参数C为对象KEY,将内容D读取至内存Cache区,以数据流形式写入对象存储对应桶内,并将返回结果解析;
将返回结果由ResultConverter转义提交后返回给系统客户端;
当执行所述DeleteMethodHandlerl删除对象时,其具体包括:
当请求命令为DELETE、参数为具体文件路径E时,MethodMapping映射对应DeleteMethodHandler,并将视参数E为对象KEY,执行删除对象存储桶内对应KEY,并将返回结果解析;
将返回结果由ResultConverter转义提交后返回给系统客户端;
当执行所述HeadMethodHandlerl获取对象信息时,其具体包括:
当请求命令为HEAD、参数为具体文件路径F时,MethodMapping映射对应HeadMethodHandler,并将视参数F为对象KEY,执行获取对象存储桶内对应KEY的元数据信息,并将返回结果解析;
并将返回结果由ResultConverter转义提交后返回给系统客户端。
2.如权利要求1所述的通过WebDav实现系统与对象存储通信的方法,其特征在于,
所述请求信息还包括:包含有用户名和密码的验证信息;
相应地,WebDavService执行的步骤还包括:根据验证信息校验请求合法性,当请求合法将触发WebDav与对象存储通信,当请求有误将通过WebDavService返回错误。
CN202211170991.9A 2022-09-26 2022-09-26 一种通过WebDav实现系统与对象存储通信的方法 Active CN115268797B (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211170991.9A CN115268797B (zh) 2022-09-26 2022-09-26 一种通过WebDav实现系统与对象存储通信的方法

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211170991.9A CN115268797B (zh) 2022-09-26 2022-09-26 一种通过WebDav实现系统与对象存储通信的方法

Publications (2)

Publication Number Publication Date
CN115268797A CN115268797A (zh) 2022-11-01
CN115268797B true CN115268797B (zh) 2023-01-10

Family

ID=83757729

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211170991.9A Active CN115268797B (zh) 2022-09-26 2022-09-26 一种通过WebDav实现系统与对象存储通信的方法

Country Status (1)

Country Link
CN (1) CN115268797B (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116909992B (zh) * 2023-09-12 2023-11-24 创云融达信息技术(天津)股份有限公司 一种通过ntfs符号链接实现系统与对象存储通信的方法

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10423573B1 (en) * 2018-07-24 2019-09-24 Nasuni Corporation Cloud-native global file system with multi-site support using push classes
CN111491037A (zh) * 2020-06-28 2020-08-04 四川新网银行股份有限公司 通过sftp数据流与对象存储服务器的通信方法
CN113419687A (zh) * 2021-07-13 2021-09-21 广东电网有限责任公司 一种对象存储方法、系统、设备及存储介质

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6907457B2 (en) * 2001-01-25 2005-06-14 Dell Inc. Architecture for access to embedded files using a SAN intermediate device
US20130238785A1 (en) * 2012-03-06 2013-09-12 Rackspace Us, Inc. System and Method for Metadata Discovery and Metadata-Aware Scheduling
US10838920B2 (en) * 2017-05-05 2020-11-17 Esoptra NV Plug-in function platform and methods
CN114201446B (zh) * 2021-11-22 2024-01-23 苏州浪潮智能科技有限公司 实现hdfs远端存储挂载的方法及系统

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10423573B1 (en) * 2018-07-24 2019-09-24 Nasuni Corporation Cloud-native global file system with multi-site support using push classes
CN111491037A (zh) * 2020-06-28 2020-08-04 四川新网银行股份有限公司 通过sftp数据流与对象存储服务器的通信方法
CN113419687A (zh) * 2021-07-13 2021-09-21 广东电网有限责任公司 一种对象存储方法、系统、设备及存储介质

Also Published As

Publication number Publication date
CN115268797A (zh) 2022-11-01

Similar Documents

Publication Publication Date Title
US8762353B2 (en) Elimination of duplicate objects in storage clusters
US8370910B2 (en) File server for translating user identifier
US8015146B2 (en) Methods and systems for assisting information processing by using storage system
US20140013112A1 (en) Encrypting files within a cloud computing environment
US9317213B1 (en) Efficient storage of variably-sized data objects in a data store
US10725666B2 (en) Memory-based on-demand data page generation
CN110647497A (zh) 一种基于hdfs的高性能文件存储与管理系统
US9367569B1 (en) Recovery of directory information
CN109885577B (zh) 数据处理方法、装置、终端及存储介质
US20090019223A1 (en) Method and systems for providing remote strage via a removable memory device
US8977662B1 (en) Storing data objects from a flat namespace in a hierarchical directory structured file system
CN109710185A (zh) 数据处理方法及装置
CN115268797B (zh) 一种通过WebDav实现系统与对象存储通信的方法
CN112416880A (zh) 一种基于实时归并的海量小文件存储性能优化方法及装置
CN112818038A (zh) 基于区块链和ipfs组合的数据管理方法及相关设备
US8423585B2 (en) Variants of files in a file system
US20230123921A1 (en) Facilitating the embedding of block references for reducing file access latency file systems
US7634521B1 (en) Technique for scanning stealthed, locked, and encrypted files
CN112286448B (zh) 对象访问方法、装置、电子设备及机器可读存储介质
US11341159B2 (en) In-stream data load in a replication environment
US11886439B1 (en) Asynchronous change data capture for direct external transmission
Wee Analysis of hidden data in NTFS file system
US8990265B1 (en) Context-aware durability of file variants
CN116909992B (zh) 一种通过ntfs符号链接实现系统与对象存储通信的方法
US11853319B1 (en) Caching updates appended to an immutable log for handling reads to the immutable log

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant