Diploma Thesis Santiago Gómez Sáez - IAAS
Diploma Thesis Santiago Gómez Sáez - IAAS
Diploma Thesis Santiago Gómez Sáez - IAAS
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
6.2. NoSQL Support Implementation<br />
which use its libraries. During the activation process of this OSGi bundle, an instance of<br />
the component is created and registered in the Camel registry. Camel endpoints containing<br />
in its URI the jdbccdasmix component create an instance of the JdbcCdasmixComponent class.<br />
The original Camel-jdbc component requires the user to specify the data source name in the<br />
endpoint URI, and its properties in the bean configuration. However, we do not require<br />
the explicit description of the data source in the URI, as the component retrieves it from the<br />
NMF, and creates it dynamically. The JdbcCdasmixEndpoint class creates an instance of the<br />
producer endpoint, the JdbcCdasmixProducer. The JdbcCdasmixProducer includes the main logic<br />
of the component. When a NMF is received in the jdbccdasmix endpoint, its properties are<br />
extracted and analyzed, the connection to the backend database is established, the message<br />
is demarshaled, the request on the database system is performed, the response from the<br />
database system is marshaled into the NMF, and forwarded back to the endpoint which<br />
created the exchange. The response’s meta-data is stored in the properties section of the NMF,<br />
while the data is stored in the attachment section of the NMF. The storage of attachments in<br />
the NMF through the Camel API requires the storage of the data in a class which implement<br />
the javax.activation.DataSource class. Threfore, we implement two different classes which<br />
implement it, and store different data: the data retrieved from the backend database system<br />
(when success), or the error messages (when an error occurs). Operations on different backend<br />
database systems in one message exchange are considered atomic. If one backend database<br />
system answers with an error, the message exchange status is set to error, and forwarded to<br />
the endpoint which created the message exchange.<br />
The support of JDBC in a custom component and a unique endpoint URI prefix allows<br />
the developers to use the existing Camel-jdbc component for their non multi-tenant aware<br />
connections.<br />
6.2. NoSQL Support Implementation<br />
The prototype requirements described in Chapter 4 specify the need of support to NoSQL<br />
Cloud data stores. In Chapter 5 we present a design for accessing backend NoSQL Cloud data<br />
stores via a standardized protocol which is supported in most of the data stores interfaces:<br />
JSON over HTTP. Gomez [Sá12] and Muhler [Muh12] extend the ServiceMix-http JBI BC in<br />
order to provide multi-tenancy awareness at the communication level. We reuse and extend<br />
the BC to support the communication protocol required in this diploma thesis.<br />
6.2.1. Multi-tenant ServiceMix HTTP Binding Component<br />
As discussed in previous chapters, the ServiceMix-mt JBI BC implements multi-tenancy<br />
awareness for the HTTP communication protocol. However, the multi-tenancy awareness<br />
supported ensures endpoint isolation at the tenant level, but not at the user level. Ensuring<br />
tenant isolation in a system which connects to multiple tenant’s databases, and is accessed by<br />
multiple tenant’s users, is not enough. Therefore, we modify the operations implemented in<br />
Muhler’s approach [Muh12], in order to ensure tenant and user isolation.<br />
69