David,
thanks for sharing these ideas. We basically implemented it by using longs and dividing the long-namespace into multiple parts on each insert. As you already described, the biggest problem with this approach is, that we are not able to simply invoke get(x) because the indexes of the list are not a sequence of natural numbers.

Kind regards
Matthias

On 10/18/2011 10:30 AM, David Jeske wrote:
On Tue, Oct 18, 2011 at 12:14 AM, Matthias Pfau <p...@l3s.de
<mailto:p...@l3s.de>> wrote:

    we want to sort completely on the client-side (where the data is
    encrypted). But that requires an "insert at offset X" operation. We
    would always use CL QUORUM and client side synchronisation.


You can do "insert at offset X"... just make X be an int, float, or
string and you can create your own offsets.

Key = 1.1  Value = record A
Key = 1.2  Value = record C

Want to "insert at offset 2" between records A and C, just use "Key =
1.15". If you are worried about the float overflowing, use strings instead.

In order to use an "insert at X" operation, you would have to either (a)
have an entire sorted copy of the data in your other system to find the
insertion-location, which begs to ask why you need Cassandra, or (b) do
a log(N)-ish search through the Cassandra dataset to "find" the
insertion point, retrieving and decrypting each record as you went. This
could be pretty slow, as you'd be doing out-of-process roundtrips just
to find the insertion point. However, it is possible today.




Reply via email to