SDN Controller Programming Guide

79
Persistence
Distributed Persistence Overview
The SDN Controller provides a distributed persistence for applications in form of a Cassandra [11]
database node running on each controller instance. A team of controllers serves as a Cassandra
cluster. Cassandra provides the following benefit as a distributed database:
A distributed, peer-to-peer datastore with no single point of failure.
Automatic replication of data for improved reliability and availability.
An eventually-consistent view of the database from any node in the cluster.
Incremental, scale-out growth model.
Flexible schemas (column oriented keyspaces).
Hadoop integration for large-scale data processing.
SQL-like query support via Cassandra Query Language (CQL).
Distributed Persistence Use Case
The distributed persistence architecture is targeted at applications that have distributed active-
active requirements. Specifically, applications should use the distributed persistence framework if
they have one or more of following requirements:
Consumer application have high scalability requirements i.e. there are generally multiple
instances of the app running on different controller nodes that need access to a common
distributed database store.
The distributed database should be available independent of whether individual nodes are
present or not e.g if there are controller node crashes.
The applications have high throughput requirements: large number of I/O operations.
Further, they have requirements wherein as the number of controller nodes increases,
performance needs to scale linearly.
For addressing applications with such requirements, a distributed persistence layer that uses
Cassandra is exported as the underlying distributed database. The HP VAN SDN Controller
provides a Data Access Object (DAO) layer on top of Cassandra for performing distributed
persistence operations.
Persistence Data Model
Introduction to DAO Pattern
A data access object (DAO) is an object that provides an abstract interface to some type of
database or persistence mechanism, providing some specific operations without exposing details
of the database. It provides a mapping from application calls to the persistence layer. This
isolation separates the concerns of what data accesses the application needs, in terms of domain-
specific objects and data types (the public interface of the DAO), and how these needs can be
satisfied with a specific DBMS, database schema, and so on. Figure 33 and Figure 34 show Data
Access Object pattern [31].