Hi all, As handy as Rtree is, one has to solve the problem of reliable and consistent access to the index data before it can be used in a multi-client application. I propose that we work together on a solution and include it with the Rtree package. The simplest thing that can possibly work seems to me to be a base TCP server implementation. I hacked one together using classes from the multiprocessing package
http://sgillies.net/blog/828/multiprocessing-with-rtree but JSON data might be more generally useful than the pickled Python objects exchanged by multiprocessing. I've also seen some benchmarks that show the lastest simplejson module outperforming cPickle. To add items to the Rtree, you'd send JSON data like this to the server: { 'add': { 'items': [ { 'id': '5fa49624-5cf0-4a57-9b49-a2614cd866c3', 'bounds': [-10.0, -10.0, 10.0, 10.0] } ] } } A query like { 'intersection': { 'bounds': [-10.0, -10.0, 10.0, 10.0] } } would return something like { 'items': [ { 'id': '5fa49624-5cf0-4a57-9b49-a2614cd866c3', 'bounds': [-10.0, -10.0, 10.0, 10.0] }, ... ] } The server classes wouldn't need to depend on anything that's not already in the standard library, and wouldn't be imported into the rtree namespace unless you did so explicitly ("from rtree.connection import Server" or some such). Thoughts? Sean _______________________________________________ Community mailing list [email protected] http://lists.gispython.org/mailman/listinfo/community
