Search code examples
cassandranosqlobject-oriented-analysisooad

OOAD and Cassandra. How?


I am trying to wrap my head around doing object oriented analysis and design when your canonical data source is Cassandra.

Specifically:

  1. How do I maintain data consistency if data is duplicated among the denormalized cassandra tables?
  2. How do I maintain a clean object design? Do I have to have a reference diagram that shows how my domain models map to the denormalized tables?

Thanks.


Solution

  • Essentially, the same way you would if you used a RDBMS as the data-store. Create OO domain-model classes. Access the data-store through an abstract interface, the persistence layer, which accepts and provides objects of those classes. Internally, have the persistence layer convert to and from your domain-model classes and Cassandra tables.