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

Vijay commented on CASSANDRA-1311:
----------------------------------

Pardon my ignorance: I just wanted to throw my view on Triggers (Feel free to 
ignore it :-) ).

Today: When a write happens the co-ordinator does n mutations (n being the 
number of replicas), if any one of the write fails we store hints for the 
mutation and try again on that node when it comes up.

With Triggers in the mix, it might be simple to just extend the number of 
mutations to n+1, where n is the number of replicas and the additional mutation 
is for the trigger. The trigger implementation should take care of the 
execution and return success or failure. if there is a failure we will store 
the hint for the mutation and retry after x interval or something.

This way we will have a eventually consistent trigger. We dont guarantee the 
order but we can guarantee the execution which is what we guarantee in most of 
our operations anyways (Example: we write to n replicas n-1 fails but the other 
one succeeds we eventually will propagate the data even though the client got a 
error because of quorum operation).

We might also add one more consistency level, if we really need to know if the 
trigger was executed or not.
                
> 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