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.

2. Fundamentals<br />

2.10.1. Key-value Databases<br />

In a key-value datastore elements are uniquely identified by an id, which the data store does<br />

not take into account its type, and are simply stored as a Binary Large Object (BLOB) . A<br />

user can get the value for the key, put a value for the key, or delete a key from the data store<br />

[SF12]. Its storage model can be compared to a map/dictionary [Str]. Products offering this<br />

data storage model in a Cloud infrastructure are Amazon DynamoDB [Amaa], Google Cloud<br />

Storage [Gooc], Amazon SimpleDB [Amae] , Amazon S3 [Amad], etc. In this diploma thesis<br />

we mainly focus on the following key-value data stores: DynamoDB, and Google Cloud<br />

Storage.<br />

Amazon DynamoDB’s data model includes the following concepts: tables, items, and attributes<br />

[Amaa]. The attributes are a key-value, where the value is binary data. Attributes<br />

are stored in items, and these are stored in tables. Items stored in a table can be retrieved by<br />

referencing its unique id. The number of attributes is not limited by Amazon, but each item<br />

must have a maximum size of 64 KB. Accessing stored data in this data store can be mainly<br />

done in two ways: using the functionalities provided by the AWS SDK, or using the Cloud<br />

storage RESTful API.<br />

Google Cloud Storage’s data model includes the following concepts: buckets and objects<br />

[Gooc]. Buckets contain on or more objects. The objects are identified within a bucket with its<br />

unique id. Users can perform I/O operations on both buckets and objects. For this purpose,<br />

Google Cloud storage provides RESTful API.<br />

In this diploma thesis we use an ESB for accessing transparently tenant’s databases migrated<br />

to the Cloud. Servicemix-mt provides multi-tenant HTTP support [Sá12]. Therefore, we reuse<br />

and extend the multi-tenant HTTP BC in order to provide dynamic routing between the<br />

different data stores.<br />

2.10.2. Document Databases<br />

Document databases can be considered as a next step in improving the key-value storage<br />

model. In this storage model, documents are stored in the value part of the key-value<br />

store, making the value content examinable [SF12]. Documents with different schemas are<br />

supported in the same collection, and can be referenced by the collection’s key or by the<br />

document’s attributes. One of the main difference in the attributes specification regarding<br />

RDBMS is that in document stores document’s attributes cannot be null. When there is an<br />

attribute without value, the attribute does not exist in the document’s schema. Products<br />

implementing this data storage model are Apache CouchDB, MongoDB, etc. [Thea] [10G].<br />

Mongo DB defines two storage structures: collections and documents [10G]. A specific<br />

database contains one or more collections identified by its unique id. A specific collection<br />

stores one or more documents. Collections and documents stored in a database can be<br />

accessed, inserted and modified using the RESTful API supported by the database system.<br />

24

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

Saved successfully!

Ooh no, something went wrong!