Biomedical Engineering Reference
In-Depth Information
low concurrency requirements (medical records are updated every few
hours rather than every second). Therefore a tolerance to consistency
issues should be reasonable.
Cassandra is based on a distributed storage scaling architecture made
famous by Amazon, called Dynamo [24]. Cassandra provides clustering
and data replication with a peer-to-peer architecture and easily confi gured
parameters (even per query) for the numbers of nodes to successfully
respond with a successful read or write. Each node does not need to
have the correct replica of each data item. Versions are automatically
tracked via timestamps, and, on reads, inconsistent nodes are repaired
automatically. These settings can be applied per query and can be tailored
based on how critical it is that the data are guaranteed to be the latest or
guaranteed to be written.
Riak is another NoSQL database based on the dynamo clustering
architecture, and thus the clustering and consistency is similar to
Cassandra. Riak is a polished, but young, open source technology
produced by Basho that improves on the Cassandra capabilities by
offering simpler and easier to understand programmatic access and
clustering capabilities. In fact, Riak offers an extremely easy to use
RESTful/JSON access mechanism that greatly simplifi es web development.
Although Riak can support all content types, the native indexing and
awareness of JSON for structured data will lead to a natural tendency to
standardize on JSON throughout an entire application. For CDA though,
this means that an XML to JSON converter must be used to take full
advantage of this.
Although Riak's JSON support allows it to support constructs like the
Column and SuperColumn features, it furthers this ability by supporting
links. Links provide innate relationships between the fl exibly structured
key/value pairs. The ability to add links to the data supports an ability to
model named (or typed) relationships between entities. On top of this
modeling, Riak supports link walking within MapReduce functions,
which allows semi-relational capabilities. Figure 20.9 shows an example
of a simple Riak http query that an application tier might submit to the
database. The fi rst portion of the URL points to the Riak Cluster domain
name, specifi es to use the Riak bucket called 'patients', and specifi es to
retrieve the patient identifi ed by 'uniquepatientid'. The second part of the
http query is a Riak convention that supports walking links. The template
for this link walking section is ' _,_,_ ', with an underscore being
convention to not fi lter on this fi eld. The fi rst underscore fi lters on the
bucket, the second portion fi lters on the link type, and the third portion
fi lters on the actual id. In this example, patient demographics and three
￿ ￿ ￿ ￿ ￿
 
Search WWH ::




Custom Search