[ 
https://issues.apache.org/jira/browse/CASSANDRA-1311?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13191127#comment-13191127
 ] 

Martin Hentschel commented on CASSANDRA-1311:
---------------------------------------------

Current status from our side: Maxim and I have done research on implementing 
asynchronous triggers in Cassandra. Based on this, we have provided the patch 
of this issue. In the discussion that followed, a different implementation of 
triggers in Cassandra has been suggested. Since then, Maxim and I have not 
continued to work on our patch. I guess it's up to Jonathan Ellis, T Jake 
Luciani, and Stu Hood to make a decision on which implementation of triggers to 
pursue and who does it :-)

Here is a brief summary of our research on asynchronous triggers in the last 
1.5 years:

We have published a technical report about the idea of integrating asynchronous 
triggers into Cassandra [1]. In this technical report we provide three things: 
(1) a comparison of different approaches to execute triggers on top of 
Cassandra, (2) a set of new protocols for executing triggers inside Cassandra, 
and (3) results of performance experiments comparing all of these approaches. 
The proposed protocols ensure at-least-once semantics of trigger execution. 
That is, upon a change to a table in Cassandra, a registered trigger is 
guaranteed to be executed at least once -- even in case of node failures. The 
experimental results show that our "integrated approach" performs just as well 
as the state-of-the-art approach of executing triggers outside of Cassandra. 
However, our approach utilizes system resources more efficiently; that is, less 
machines are needed to scale the execution of triggers.

The patch we have attached to this issue implements the proposed protocols and 
has been used in our performance experiments. Thus, this patch is fully 
functional and well-tested. The implementation extends the replication 
mechanism of Cassandra to execute triggers with at-least-once semantics.

In the discussion above, another approach has been suggested to implement 
triggers inside Cassandra. The idea is to use the log record to execute 
triggers. This seems to be a clever way to implement triggers because it would 
require less extensions to the existing Cassandra infrastructure, I assume. 
However, this does not increase the guarantees of trigger execution. It won't 
give you exactly-once semantics.

To guarantee exactly-once semantics of trigger execution, we have build a 
system that departs significantly from this patch [2]. In short, the system 
extends the patch with transactions and synchronization mechanisms to execute 
triggers. It also provides an easier programming model, which is more like 
MapReduce than a trigger-like programming model.

References:

[1] Martin Hentschel, Maxim Grinev, Donald Kosssmann: Building Data Flows Using 
Distributed Key-Value Stores. Technical Report 742, ETH Zurich, 
ftp://ftp.inf.ethz.ch/pub/publications/tech-reports/7xx/742.pdf

[2] Maxim Grinev, Maria Grineva, Martin Hentschel, Donald Kossmann: Analytics 
for the RealTime Web. Demo Paper, VLDB Conference 2011, 
http://www.vldb.org/pvldb/vol4/p1391-grinev.pdf
                
> Triggers
> --------
>
>                 Key: CASSANDRA-1311
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1311
>             Project: Cassandra
>          Issue Type: New Feature
>            Reporter: Maxim Grinev
>             Fix For: 1.2
>
>         Attachments: HOWTO-PatchAndRunTriggerExample-update1.txt, 
> HOWTO-PatchAndRunTriggerExample.txt, ImplementationDetails-update1.pdf, 
> ImplementationDetails.pdf, trunk-967053.txt, trunk-984391-update1.txt, 
> trunk-984391-update2.txt
>
>
> Asynchronous triggers is a basic mechanism to implement various use cases of 
> asynchronous execution of application code at database side. For example to 
> support indexes and materialized views, online analytics, push-based data 
> propagation.
> Please find the motivation, triggers description and list of applications:
> http://maxgrinev.com/2010/07/23/extending-cassandra-with-asynchronous-triggers/
> An example of using triggers for indexing:
> http://maxgrinev.com/2010/07/23/managing-indexes-in-cassandra-using-async-triggers/
> Implementation details are attached.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to