Hi Kristian,
If you have a single machine, and…
• if you access databases, the random access patterns of parallel queries slow down evaluation time a lot, so will usually get best performance with single-threaded queries.
• if you don’t access any databases, the xquery:fork-join function will allow you to run several threads in parallel within a single XQuery expression. Even then, performance gain is not that thrilling as you might expect, but it works fine for operations that lead to long delays caused by external services (such can be the case with http:send-request).
If you work with multiple machines, you can use the BaseX Client Module [2] to request data from several BaseX instances, or simulate map/reduce patterns.
If you newer versions of Java, more and more code will be rewritten for multi-core processing, but this is nothing you can really control.
As you see, my replies do not completely match your question, but feel free to give us more input on which types of queries and expressions you would like to parallelize.
Cheers, Christian
[1] http://docs.basex.org/wiki/XQuery_Module#xquery:fork-join [2] http://docs.basex.org/wiki/Client_Module
On Mon, May 22, 2017 at 11:26 AM, Kristian Kankainen kristian@keeleleek.ee wrote:
Hi all!
Is there any way to make BaseX run in parallel on a cluster? Through school I have access to several clusters and I got interested in trying out if BaseX can take advantage of parallel computing.
I know my question is vague. To try to be more specific - can I compile BaseX with some extra parameters? Is there anything written about this topic?
For the background information I got interested in trying out running parallel XQuery because from somewhere (that I can't find in the mailing list archive) I read that XQuery falls under the "dataflow" programming paradigm [1] and as such should be parallelizable out-of-the-box. Also being a functional language with no side-effects makes automatic parallelization easier. I am not a computer scientist and/but I am aware it isn't that easy as I might make it sound.
Cheers Kristian K