Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-5173

Provide a mechanism to notify listeners when a mutation has occurred (or certain types of mutations have happened)

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Low
    • Resolution: Won't Fix
    • None
    • None
    • None

    Description

      This is related to CASSANDRA-1311 but much less complicated. I have had the desire in the past where my application needed to react to mutations on Cassandra that have come from other DCs. Essentially using Cassandra as the storage system of record, but also using its replication as a "bus".

      An example of a straightforward use case is a read through caching system that can be more intelligent about its data than Cassandra's built in caching - providing better performance. One caching system per DC. The DC to DC replication in Cassandra is nice to keep data in sync, but the external caching system must know when a mutation comes from another DC and mark its data as dirty - or do whatever. Combine these notifications with TTLs on the cache and you have a fairly robust external caching integration with Cassandra!

      To get this integration, the external cache would register a "listener" (in the same JVM as Cassandra) for the types of mutations it is interested in, and receive an event when the conditions are met. after that it is the job of the listener to do what it needs.

      I created a patch on 1.1.4, but then the business decided on another direction. If this is still interesting to the community I can rebase to 1.2 and post the patch, but my use case has since passed and I will probably not have time to maintain it.

      Attachments

        Activity

          People

            Unassigned Unassigned
            btoddb B. Todd Burruss
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: