Project

General

Profile

Actions

Exiv2 and Cloud Services » History » Revision 5

« Previous | Revision 5/7 (diff) | Next »
Tuan Nhu, 19 Aug 2013 06:54


Exiv2 and Cloud Services

1. Introduction

This article is to share my investigations about some of cloud services and suggest the way to integrate them into Exiv2. The investigated cloud services are Google Drive and Dropbox, which are the most popular services. As enterprises integrate their existing IT infrastructures and IT resources with the sharable cloud paradigm, it is imperative for cloud enablers to provide a uniform API that these enterprises can use to tailor the cloud to their business processes. Hence, the way we integrate Google Drive and Dropbox into Exiv2 should be applicable to other cloud services.

2. Architecture

Most of cloud services provide Representational State Transfer (RESTful) API to allow users to perform the operations (view, edit, delete, share, …) on their resources.
The API is mostly based on the HTTP/HTTPS protocol and GET, POST, PUT, and DELETE requests may be all used. The API presupposes no particular structure in the Uniform Resource Identifier (URI) space. The starting point is a URI, supplied by the cloud service provider, that identifies the cloud itself. The cloud's representation contains URIs for the other resources in the cloud. Operations on the cloud resources are performed by making an HTTP request against the URI of the resource.
Before accessing the API, the applications are required to ask users to authenticate as well as authorize the permission to access the user data. Most of the cloud services use OAuth 2.0 to do that.

The following is the way we should integrate the cloud services to Exiv2.

Fig.1. The domain diagram of CloudIo

The CloudIo should contains 2 components: Exiv2::Oauth and Exiv2::CurlIo.
  • The Exiv2:Oauth is to request and receive credentials to access the API. The credentials in this case are often the tokens. The tokens are attached to the request headers that are sent to RESTFUL API to get the data.
  • The Exiv2::CurlIo is to retrieve the data. It should be similar as we access a particular image URL because the API is mostly based on the HTTP/HTTPS protocol (We should easily get byte-ranges and PUT byte-ranges)

Updated by Tuan Nhu over 8 years ago · 5 revisions