Hi everyone, As some of you know, James Wright has presented his excellent work on the Promise Module in Prague [1,2]. The promise:fork-join function is now part of BaseX, along with some additional functions for asynchronous query processing [3,4]. Your feedback is welcome as usual, Christian [1] https://github.com/james-jw/xq-promise/ [2] http://archive.xmlprague.cz/2016/files/xmlprague-2016-proceedings.pdf [3] http://docs.basex.org/wiki/Async_Module [4] http://files.basex.org/releases/latest/
Huge news!!! I'll throw away my code for doing this. Unless someone wants to have a look at it! :D :D :D Thank you guys. Regards, Marco. On 01/03/2016 17:09, Christian Grün wrote:
Hi everyone,
As some of you know, James Wright has presented his excellent work on the Promise Module in Prague [1,2].
The promise:fork-join function is now part of BaseX, along with some additional functions for asynchronous query processing [3,4].
Your feedback is welcome as usual, Christian
[1] https://github.com/james-jw/xq-promise/ [2] http://archive.xmlprague.cz/2016/files/xmlprague-2016-proceedings.pdf [3] http://docs.basex.org/wiki/Async_Module [4] http://files.basex.org/releases/latest/
Hi Christian, This is great. I particularly like the way errors in the async execution are captured: declare function local:result($id){ try{ map{ "result":async:result($id) } } catch * { map{ "error": map { 'code': $err:code, 'description': $err:description, 'module': $err:module, 'line': $err:line-number, 'column': $err:column-number, 'value': $err:value } } } }; async:ids()!local:result(.) I see async:update is marked as an updating function.Is this correct as it also returns a result? I would have thought it causes an update later but it is not itself updating. This causes problems as the query id can not be captured or suppressed from the output. /Andy On 1 March 2016 at 16:09, Christian Grün <christian.gruen@gmail.com> wrote:
Hi everyone,
As some of you know, James Wright has presented his excellent work on the Promise Module in Prague [1,2].
The promise:fork-join function is now part of BaseX, along with some additional functions for asynchronous query processing [3,4].
Your feedback is welcome as usual, Christian
[1] https://github.com/james-jw/xq-promise/ [2] http://archive.xmlprague.cz/2016/files/xmlprague-2016-proceedings.pdf [3] http://docs.basex.org/wiki/Async_Module [4] http://files.basex.org/releases/latest/
Hi Andy,
I see async:update is marked as an updating function.Is this correct as it also returns a result?
Thanks to your valuable hint, I noticed that there is no need to have an updating version at all! You can now use async:eval for both updating and non-updating queries. The new snapshot is available in a few minutes. Christian
On 1 March 2016 at 16:09, Christian Grün <christian.gruen@gmail.com> wrote:
Hi everyone,
As some of you know, James Wright has presented his excellent work on the Promise Module in Prague [1,2].
The promise:fork-join function is now part of BaseX, along with some additional functions for asynchronous query processing [3,4].
Your feedback is welcome as usual, Christian
[1] https://github.com/james-jw/xq-promise/ [2] http://archive.xmlprague.cz/2016/files/xmlprague-2016-proceedings.pdf [3] http://docs.basex.org/wiki/Async_Module [4] http://files.basex.org/releases/latest/
participants (3)
-
Andy Bunce -
Christian Grün -
Marco Lettere