The following diagram presents a high level overview of the Cassandra CQL resource adaptor and highlights the most important components.

cassandra ra arch
Figure 1. Cassandra CQL Resource Adaptor Architecture

The most important components from a Rhino TAS application developer perspective are:

  1. CassandraProvider — allows application developers to execute synchronous queries against the cassandra database and create CassandraSession activities that support asynchronous interaction

  2. CassandraSession — is the activity type for the Cassandra CQL resource adaptor. Application developers use a CassandraSession to execute queries asynchronously against a cassandra database and receive the results as events (in a future transaction)

  3. QueryResultEvent and CassandraErrorEvent — are the event types provided by the Cassandra CQL resource adaptor. These events represent the results of an asynchronous interaction with the cassandra database and are delivered within the context of a CassandraSession

See Using the Cassandra CQL API for more information on these components, including examples of how to use the Cassandra CQL resource adaptor api in an application

You monitor the health of a Cassandra CQL resource adaptor entity by inspecting the statistics the entity generates and responding to alarms it raises. See Monitoring the resource adaptor for more information on the statistics collected and the alarms raised.

Tip

You can define your own threshhold based alarms that are a function of the statistics the Cassandra CQL resource adaptor collects. See Threshold Alarms in the Rhino TAS Admin Guide for more information about defining threshold based alarms.

The resource adaptor contains a cache of prepared statements. A prepared statement is a query that has been pre-parsed and validated by the database. The resource adaptor caches the result of prepare operations so the application developer does not need to implement their own caching behaviour. You can configure the cache size and how long cache entries are preserved, to suit your application needs.

The resource adaptor includes an executor component that is responsible for receiving asynchronous responses from the DataStax java driver, and injecting corresponding events into the Rhino TAS (that are then delivered to applications for processing). You can configure the threading and queuing behaviour of the executor to suit your application needs.

General properties of the resource adaptor (such as the hosts of the cassandra cluster, and the keyspace to use) can be configured as required to suit your application needs.

Previous page Next page