The Swift to WebDAV Proxy Architecture
What we learned architecturally creating the proxy.
Join the DZone community and get the full member experience.Join For Free
when we (really dr. butcher ) crafted the swift to webdav proxy , the architecture mattered. the first two attempts at building the proxy raised issues technology and architecture issues that needed to be worked out. for example, our second attempt worked well as long as the files weren't large. but as object storage users know, there are times you want to work with large files.
webdav needs to authenticate with a username and password for this to work. the alternative form of authentication, digest authentication , requires access to an md5 version of the password which we don't have.
when the webdav client tries to authenticate against the webdav endpoint it will pass in a username and password. for the proxy to communicate with swift it will need a token. to avoid communicating with keystone for each request, the token and some other information is stored in memcached.
if the token expires or becomes invalid the proxy service will ask the webdav client to re-authenticate.
webdav is able to provide a username and password. openstack scopes assets to projects, formerly called tenants. to handle passing all 3 pieces of information to swift the project id is collected in the url. for example,
individual proxy instances are configured to work with a specific region. a proxy setup will be needed for each supported region. this allows the setup to scale from a single region to numerous geo-located ones without issue.
the proxy service is a translating proxy. for example, when the webdav client requests a list of the contents within a directory the proxy service translates that to the correct swift call. the response from swift is converted into the appropriate format for the webdav client.
when data is passed, specifically files, the proxy service passes the content through the proxy to the other side. that means that fetching a file, even a large file, happens almost immediate. files are not stored on the proxy so it doesn't need to have a large cache. instead they simply pass through changing formats as needed.
this setup has let me transfer large files, in the gigabyte range, without issue. i've been able to use it on mac, linux, windows, tablets, and even my phone.
Published at DZone with permission of Matt Farina, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.