incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Tillotson <slatem...@yahoo.co.uk>
Subject Re: b-tree
Date Fri, 22 Jul 2011 20:34:40 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I've not tried this but speculative implementation schema probably
something like the following:

Super Col family for structure

hash(nodeId): {
	root: { left="nodeId1", right="nodeId2" }
	nodeId1: { left="nodeId3", right="nodeId4" }
	nodeId2: { left="nodeId5", right="nodeId6" }
}

Col family for data

root: { meta="blob" col1=val1 col2=val2 }
nodeId1: { meta="blob" col3=val1 col4=val3 }
etc

Same Col family for index

val1: { root: "", nodeId1="" }
val2: { root: "" }
val1: { nodeId1="" }


I think 3 Multiget queries covers most logic and splitting the tree etc
should be reasonably easy to manage. Though you probably pull more data
back to the client than was strictly needed for the logic.

Something along these lines would probably work.

p

On 20/07/11 21:30, Eldad Yamin wrote:
> Hello,
> Is there any good way of storing a binary-tree in Cassandra?
> I wonder if someone already implement something like that and how
> accomplished that without transaction supports (while the tree keep
> evolving)?
> 
> I'm asking that becouse I want to save geospatial-data, and SimpleGeo
> did it using b-tree:
> http://www.readwriteweb.com/cloud/2011/02/video-simplegeo-cassandra.php
> 
> Thanks!



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJOKd7gAAoJEFL3PBwM86C5QhcH/2a3/dkvGcIWuc81s3Ffv3Gp
qdcJ8zTajZnDK5iH7+vItDGiTTr8QcUNDLCz/CsVIBIglMHGZXe0n4m43VAlJGy2
LiVCqP8QPO8QAP+4Juwy3TORh/QlY6+ac+OXDD7FDHNjujQfTy3EW9ey7bx96g8m
M8XeFM4jXME+YAkUxLUhN0azx/khAM5AQGqEkoOs4W3+BVlYBTmejNmSZZZICUxz
SIapVX6mzzeJhQdXRKSx1dUBJBbt78duG3WcXw2y1hqH0T9Kk8LHQqoCOVzkXQQa
GGjUrKArTHKJAJwLbu9qxV9uR7kjaBYiBkAYD/7R6TnDwAaqpk6tnWnOC16aMbc=
=WX26
-----END PGP SIGNATURE-----

Mime
View raw message