[
https://issues.apache.org/jira/browse/CASSANDRA-1311?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13246355#comment-13246355
]
Brian ONeill commented on CASSANDRA-1311:
-----------------------------------------
Great questions/points. a quick two cents... I'll try to put more thought into
it later...
We had the same concerns RE: classpaths and restarts, etc.
To keep things simple, all of our triggers we implemented simply make REST
posts out to services that actually do the work. This let us get around
classpath issues and still have more "power" than a simple script. Not sure
this works for everyone though. We're dropwizard happy. ;) It seems like we
should provide a js ability as well.
In our case, we don't need the pre-write CF. I'd prefer having that
lightweight option in place. I think the trigger needs the ability to cancel
the update. You may be trying to enforce constraints and/or data quality.
I'm not sure we need to provide them the ability to create additional row
mutations in the that same batch unless we have near-term plans for support for
transactions. e.g. In the case where the user is keeping an index up to date,
they can write to the index themselves in the trigger. As long as they have
the ability to fail the insert, this seems reasonable.
Likewise, altering the actual row mutation might be a nice to have. It doesn't
seem critical because the user is free to write additional information in there
trigger -- agagin, except for the transactional guarantees that a single row
write gets you.
> 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