Hi all,
I was playing with the python examples of basex version 6.7.1-1 from the debian-wheezy repository. I've used the corresponding BaseXClient.py to establish a connection/add/update/query stuff and so on, it worked very well.
Now I've noticed the new 7.0.2 version and now I've got problems with the query/iterate operation.
In the 6.7 example one starts a query and iterates over the results, using the more method, which sends \x01 followed by the query-result id.
But the examples of 7.0.2 don't behave like this anymore, instead they cache the complete result on the client side.
I've tried to rebuild the old 6.7 behaviour with the commands shown here, http://docs.basex.org/wiki/Server_Protocol but I wasn't successful.
Is is still possible to query and iterate on the server side instead, of caching the complete result on the client side?
Am I doing things the wrong way? If I do, could you please point me to the right direction or examples, documentation?
Best regards Fabian
Dear Fabian,
you're right, and you found the correct links in our Wiki: in our new iterator, all results are cached client-side. The two main reason for switching to the new approach were that a) the old approach was pretty slow if many small results were requested, and b) it caused deadlocks as soon as updating queries were intefering.
The old behavior cannot really be simulated with the new architecture, but it is simply possible to rewrite the iterator code and directly process the returned results. This way, caching can be avoided, but you have to make sure that all results will be requested in order not to stall the client/network comunication of a specific process.
I just noticed that the new caching iterator has not been implemented in Python yet; contributions are welcome here. If we should observe that the new concept performs too bad, we may continue and look for another solution.
Hope this helps, Christian ___________________________
On Mon, Nov 28, 2011 at 2:17 PM, Fabian Hickert hickert@gonicus.de wrote:
Hi all,
I was playing with the python examples of basex version 6.7.1-1 from the debian-wheezy repository. I've used the corresponding BaseXClient.py to establish a connection/add/update/query stuff and so on, it worked very well.
Now I've noticed the new 7.0.2 version and now I've got problems with the query/iterate operation.
In the 6.7 example one starts a query and iterates over the results, using the more method, which sends \x01 followed by the query-result id.
But the examples of 7.0.2 don't behave like this anymore, instead they cache the complete result on the client side.
I've tried to rebuild the old 6.7 behaviour with the commands shown here, http://docs.basex.org/wiki/Server_Protocol but I wasn't successful.
Is is still possible to query and iterate on the server side instead, of caching the complete result on the client side?
Am I doing things the wrong way? If I do, could you please point me to the right direction or examples, documentation?
Best regards Fabian
Hi Christian,
thank you for this explanation, it was very helpful.
I've once had one of the described dead-locks, but thought I've done something wrong ;)
regards Fabian
Am Montag, den 28.11.2011, 19:59 +0100 schrieb Christian Grün:
Dear Fabian,
you're right, and you found the correct links in our Wiki: in our new iterator, all results are cached client-side. The two main reason for switching to the new approach were that a) the old approach was pretty slow if many small results were requested, and b) it caused deadlocks as soon as updating queries were intefering.
The old behavior cannot really be simulated with the new architecture, but it is simply possible to rewrite the iterator code and directly process the returned results. This way, caching can be avoided, but you have to make sure that all results will be requested in order not to stall the client/network comunication of a specific process.
I just noticed that the new caching iterator has not been implemented in Python yet; contributions are welcome here. If we should observe that the new concept performs too bad, we may continue and look for another solution.
Hope this helps, Christian ___________________________
On Mon, Nov 28, 2011 at 2:17 PM, Fabian Hickert hickert@gonicus.de wrote:
Hi all,
I was playing with the python examples of basex version 6.7.1-1 from the debian-wheezy repository. I've used the corresponding BaseXClient.py to establish a connection/add/update/query stuff and so on, it worked very well.
Now I've noticed the new 7.0.2 version and now I've got problems with the query/iterate operation.
In the 6.7 example one starts a query and iterates over the results, using the more method, which sends \x01 followed by the query-result id.
But the examples of 7.0.2 don't behave like this anymore, instead they cache the complete result on the client side.
I've tried to rebuild the old 6.7 behaviour with the commands shown here, http://docs.basex.org/wiki/Server_Protocol but I wasn't successful.
Is is still possible to query and iterate on the server side instead, of caching the complete result on the client side?
Am I doing things the wrong way? If I do, could you please point me to the right direction or examples, documentation?
Best regards Fabian
basex-talk@mailman.uni-konstanz.de