16.01.2014 Views

Diploma Thesis Santiago Gómez Sáez - IAAS

Diploma Thesis Santiago Gómez Sáez - IAAS

Diploma Thesis Santiago Gómez Sáez - IAAS

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

6.2. NoSQL Support Implementation<br />

17 "AttributesToGet":<br />

18 ["score"]<br />

19 }<br />

20 }<br />

21 }<br />

Listing 6.4: Amazon Dynamo DB JSON over HTTP sample request [Amaa].<br />

Marshaling operations in the HTTP JBI BC are provided in the classes DefaultHttpConsumer-<br />

Marshaler, and DefaultHttpProviderMarshaler. Hence, we start the extension of the marshalers<br />

at this point. On the other hand, the marshalers do not support marshaling of JSON content,<br />

as the NMF stores XML format. Therefore, we include JSON marshaling operations which are<br />

provided by the Jackson v1.8.9 [Cod]. We select this version, as is the one provided in Amazon’s<br />

AWS SDK [Amag]. We provide a marshaler handler interface, which is implemented for<br />

the different Cloud data store providers. The handler is chosen based on the HTTP headers or<br />

target HTTP URL content (see Listings 6.4 and 6.5). As in the MySQL approach, marshaling<br />

operations include filling the NMF properties with the tenant’s source and backend data<br />

source configuration data retrieved from the service registry, and storage of the HTTP request<br />

content as an attachment. Properties and attachments identifiers are listed in the NMConstants<br />

class.<br />

1 - Request -<br />

2 POST /upload/storage/v1beta1/b/myBucket/o?uploadType=media&name=myObject HTTP/1.1<br />

3 Host: www.googleapis.com<br />

4 Content-Type: image/jpeg<br />

5 Content-Length: number_of_bytes_in_JPEG_file<br />

6 Authorization: your_auth_token<br />

7<br />

8 {JPEG data}<br />

9<br />

10<br />

11 - Response -<br />

12 HTTP/1.1 200<br />

13 Content-Type: application/json<br />

14<br />

15 {<br />

16 "name": "myObject"<br />

17 }<br />

Listing 6.5: Google Coud Storage JSON over HTTP sample request [Gooc].<br />

The same method described above applies in the HTTP provider endpoints. Demarshaling<br />

operations in the multi-tenant aware provider endpoint create the HTTP requests for each<br />

Cloud provider (see Listings 6.4 and 6.5) in a separate handler, based on the target data store<br />

properties which are stored in the NMF.<br />

Authentication mechanisms in the HTTP consumer endpoint processor rely on the tenant<br />

and user UUIDs, and follow Gomez’s approach [Sá12]. However, we do not retrieve the<br />

UUIDs from the SOAP header, but from the HTTP header where the authentication data is<br />

71

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!