[
https://issues.apache.org/jira/browse/CASSANDRA-1311?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12995342#comment-12995342
]
Martin Hentschel commented on CASSANDRA-1311:
---------------------------------------------
Thanks for your comments. I don't want to advertise our approach and
implementation but I want to give some hints on why we chose this pattern.
T Jake Luciani said that clients want to know when triggers are executed. In
our approach the client can be sure that the trigger will be executed
(at-least-once behavior) but not when. There are lots of use cases when a
client doesn't need to know when the trigger was executed. For example, when
you do a bank transaction, you usually submit the transaction and it is
executed some time later. On Twitter, when you submit a tweet you usually do
not care when your tweet is forwarded to your followers. In both cases, the
execution of the bank transaction and forwarding the tweet to your followers,
would be implemented by triggers.
Jonathan Ellis said that asynchronous behavior can be implemented on the client
side. While this is true, it requires some effort by the programmer. The
programmer would need to set up a queue, implement communication with the
queue, ensure at-least-once behavior etc. Having all of this already present
within Cassandra could help in the use cases mentioned above.
In my opinion, having synchronous triggers has no advantages over implementing
it synchronously at the client. Synchronously updating a table + an index can
be done easily at the client side (without queues and fancy implementation).
Therefore we wouldn't need triggers at all.
I guess I will join the dev list again, this seems to become a good discussion
:-)
> Support (asynchronous) triggers
> -------------------------------
>
> Key: CASSANDRA-1311
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1311
> Project: Cassandra
> Issue Type: New Feature
> Components: Contrib
> Reporter: Maxim Grinev
> Fix For: 0.8
>
> 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.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira