New Modules? Promise Module, Async Module

20 views
Skip to first unread message

Christian Grün

unread,
Feb 29, 2016, 10:24:58 AM2/29/16
to EXPath, EXPath, James Wright
Dear all,

James Wright has recently presented his XQuery Promise Module in
Prague (Proceedings, 139ff [1]). His code is available at GitHub [2],
and we were wondering if people in the community were interested in
seeing the ideas behind this module standardized?

The result could be two specifications:

1. The Promise Module

* This module is inspired by the Promise Pattern as it is available in
e.g. jQuery and AngularJS.

* It includes functions like defer(), then(), fail() and others (see
the links for more details)

* It seems to be possible to implement 90% or even 100% of the module
in pure XQuery.


2. The Async Module

* In its initial version, the module contains a single async:fork-join
function, which can be used to process a sequence of XQuery functions
in parallel [3].

* The module could be enhanced with an extension of the FLWOR
expressions and an 'async' keyword in for clauses [4].

* It could further be extended with two functions async:fork and
async:join. The first function would trigger the evaluation of a query
(supplied as string) as a separate process; the second function could
be called to fetch the result of the first function.

Thoughts are welcome; thanks in advance,
Christian

[1] http://archive.xmlprague.cz/2016/files/xmlprague-2016-proceedings.pdf
[2] http://github.com/james-jw/xq-promise/
[3] https://github.com/james-jw/xq-promise/issues/16
[4] https://github.com/james-jw/xq-promise/issues/15

Christian Grün

unread,
Mar 3, 2016, 11:30:53 AM3/3/16
to EXPath, EXPath

...no one? ;)

Jonathan Robie

unread,
Mar 3, 2016, 12:05:04 PM3/3/16
to exp...@googlegroups.com, EXPath
I'm trying to wrap my head around Promise and Async in a language designed to allow lazy evaluation.

In general, XQuery tries very hard to avoid saying when things happen or in what order.  I was just beginning to explore whether other functional languages provide these features and why ...

Jonathan

...no one? ;)

--
You received this message because you are subscribed to the Google Groups "EXPath" group.
To unsubscribe from this group and stop receiving emails from it, send an email to expath+un...@googlegroups.com.
To post to this group, send email to exp...@googlegroups.com.
Visit this group at https://groups.google.com/group/expath.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages