[
https://issues.apache.org/jira/browse/CASSANDRA-6870?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13942051#comment-13942051
]
Edward Capriolo commented on CASSANDRA-6870:
--------------------------------------------
{quote}
Tbh, I can't see too many simple use cases from the top of my head where you'd
do something interesting with a function-through-paxos
{quote}
I was thinking that most applications that have a read-before-write use pattern
could be abstracted into a single RPC slice+function regardless of atomicity. I
believe CQL lists already support some read-before-write operations.
Thinking a little harder:
You could apply a idempotent function to a list or set like
remove_all_odd_numbers() remove_elements_in_this_list( a,b, c)
> Transform operation
> -------------------
>
> Key: CASSANDRA-6870
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6870
> Project: Cassandra
> Issue Type: New Feature
> Reporter: Edward Capriolo
> Assignee: Edward Capriolo
> Priority: Minor
>
> Compare and swap uses paxos to only update a value only if some criteria is
> met. If I understand correctly we should be able to use this feature to
> provide a wider variety of server side operations.
> For example inside a paxos transaction performing a slice and then using a
> function to manipulate the slice. You could accomplish features like append
> and increment this way without user needing to know the current value.
> I took a stab at doing this. I **think** I did it correctly. Comments welcome.
--
This message was sent by Atlassian JIRA
(v6.2#6252)