rest parallel
Saturday, 25 August 2018 · 10 messages · last reply 29 Aug 2018
ВВ
Ветошкин Владимир25 Aug 2018 19:40 #
Hi!
Why do requests to RESTXQ wait for finishing each other?
For example:
declare
%rest:path("/test")
%rest:GET
function page:test()
{
prof:sleep(5000)
};
If I make 2 requests to /test, the first ends in 5 sec, the second - in 10 sec.--
С уважением,
Ветошкин Владимир Владимирович
CG
Christian Grün25 Aug 2018 20:15 #
Hi Vladimir,
parallel sleep requests will be evaluated in parallel indeed (see the attached screenshot). How did you test this?
If you have an old single-core system, it might happen that only one job will be executed at a time; but all jobs should be listed in the DBA, or when calling jobs:list-details().
Best,
Christian
Quoted text · Ветошкин Владимир · 11 lines
> Why do requests to RESTXQ wait for finishing each other? > For example: > declare > %rest:path("/test") > %rest:GET > function page:test() > { > prof:sleep(5000) > }; > > If I make 2 requests to /test, the first ends in 5 sec, the second - in 10 sec.
ВВ
Ветошкин Владимир25 Aug 2018 20:36 #
Hi, Christian!
Oh, yes, I test it on an old single-core system :)
Is it the reason?
In DBA only one job listed. When the first "test" finish, in job list appers the second job.
Quoted text · Christian Grün · 26 lines
25.08.2018, 21:15, "Christian Grün" <christian.gruen at gmail.com>: > Hi Vladimir, > > parallel sleep requests will be evaluated in parallel indeed (see the > attached screenshot). How did you test this? > > If you have an old single-core system, it might happen that only one > job will be executed at a time; but all jobs should be listed in the > DBA, or when calling jobs:list-details(). > > Best, > Christian > > > > > Why do requests to RESTXQ wait for finishing each other? > > For example: > > declare > > %rest:path("/test") > > %rest:GET > > function page:test() > > { > > prof:sleep(5000) > > }; > > > > If I make 2 requests to /test, the first ends in 5 sec, the second - in 10 sec.
--
С уважением,
Ветошкин Владимир Владимирович
ВВ
Ветошкин Владимир25 Aug 2018 21:16 #
Hmm.. When I request "test" in 2 tabs of chrome - only one job appears. But when I request the first "test" in one tab and the second "test" in another browser (or in incognito tab) - two jobs appears.
Quoted text · Ветошкин Владимир · 40 lines
25.08.2018, 21:36, "Ветошкин Владимир" <en-trance at yandex.ru>: > Hi, Christian! > > Oh, yes, I test it on an old single-core system :) > Is it the reason? > In DBA only one job listed. When the first "test" finish, in job list appers the second job. > > 25.08.2018, 21:15, "Christian Grün" <christian.gruen at gmail.com>: > > > Hi Vladimir, > > > > parallel sleep requests will be evaluated in parallel indeed (see the > > attached screenshot). How did you test this? > > > > If you have an old single-core system, it might happen that only one > > job will be executed at a time; but all jobs should be listed in the > > DBA, or when calling jobs:list-details(). > > > > Best, > > Christian > > > > > > > > > Why do requests to RESTXQ wait for finishing each other? > > > For example: > > > declare > > > %rest:path("/test") > > > %rest:GET > > > function page:test() > > > { > > > prof:sleep(5000) > > > }; > > > > > > If I make 2 requests to /test, the first ends in 5 sec, the second - in 10 sec. > > > -- > С уважением, > Ветошкин Владимир Владимирович >
--
С уважением,
Ветошкин Владимир Владимирович
CG
In the DBA, all jobs should be listed, so this rather indicates that your second request does not reach the BaseX HTTP server. How do you send the requests?
Ветошкин Владимир <en-trance at yandex.ru> schrieb am Sa., 25. Aug. 2018, 20:36:
Quoted text · Ветошкин Владимир · 43 lines
> Hi, Christian! > > Oh, yes, I test it on an old single-core system :) > Is it the reason? > In DBA only one job listed. When the first "test" finish, in job list > appers the second job. > > 25.08.2018, 21:15, "Christian Grün" <christian.gruen at gmail.com>: > > Hi Vladimir, > > parallel sleep requests will be evaluated in parallel indeed (see the > attached screenshot). How did you test this? > > If you have an old single-core system, it might happen that only one > job will be executed at a time; but all jobs should be listed in the > DBA, or when calling jobs:list-details(). > > Best, > Christian > > > > Why do requests to RESTXQ wait for finishing each other? > For example: > declare > %rest:path("/test") > %rest:GET > function page:test() > { > prof:sleep(5000) > }; > > If I make 2 requests to /test, the first ends in 5 sec, the second - in > 10 sec. > > > > -- > С уважением, > Ветошкин Владимир Владимирович > >
CG
I see. So this must be an issue with Chrome (and, possibly, requests to localhost).
Ветошкин Владимир <en-trance at yandex.ru> schrieb am Sa., 25. Aug. 2018, 21:16:
Quoted text · Ветошкин Владимир · 56 lines
> Hmm.. When I request "test" in 2 tabs of chrome - only one job appears. > But when I request the first "test" in one tab and the second "test" in > another browser (or in incognito tab) - two jobs appears. > > 25.08.2018, 21:36, "Ветошкин Владимир" <en-trance at yandex.ru>: > > Hi, Christian! > > Oh, yes, I test it on an old single-core system :) > Is it the reason? > In DBA only one job listed. When the first "test" finish, in job list > appers the second job. > > 25.08.2018, 21:15, "Christian Grün" <christian.gruen at gmail.com>: > > Hi Vladimir, > > parallel sleep requests will be evaluated in parallel indeed (see the > attached screenshot). How did you test this? > > If you have an old single-core system, it might happen that only one > job will be executed at a time; but all jobs should be listed in the > DBA, or when calling jobs:list-details(). > > Best, > Christian > > > > Why do requests to RESTXQ wait for finishing each other? > For example: > declare > %rest:path("/test") > %rest:GET > function page:test() > { > prof:sleep(5000) > }; > > If I make 2 requests to /test, the first ends in 5 sec, the second - in > 10 sec. > > > > -- > С уважением, > Ветошкин Владимир Владимирович > > > > > -- > С уважением, > Ветошкин Владимир Владимирович > >
ВВ
Ветошкин Владимир25 Aug 2018 21:39 #
That seems to be the case.
Thanks.
Quoted text · Christian Grün · 55 lines
25.08.2018, 22:18, "Christian Grün" <christian.gruen at gmail.com>: > I see. So this must be an issue with Chrome (and, possibly, requests to localhost). > > Ветошкин Владимир <en-trance at yandex.ru> schrieb am Sa., 25. Aug. 2018, 21:16: > > > Hmm.. When I request "test" in 2 tabs of chrome - only one job appears. > > But when I request the first "test" in one tab and the second "test" in another browser (or in incognito tab) - two jobs appears. > > > > 25.08.2018, 21:36, "Ветошкин Владимир" <en-trance at yandex.ru>: > > > > > Hi, Christian! > > > > > > Oh, yes, I test it on an old single-core system :) > > > Is it the reason? > > > In DBA only one job listed. When the first "test" finish, in job list appers the second job. > > > > > > 25.08.2018, 21:15, "Christian Grün" <christian.gruen at gmail.com>: > > > > > > > Hi Vladimir, > > > > > > > > parallel sleep requests will be evaluated in parallel indeed (see the > > > > attached screenshot). How did you test this? > > > > > > > > If you have an old single-core system, it might happen that only one > > > > job will be executed at a time; but all jobs should be listed in the > > > > DBA, or when calling jobs:list-details(). > > > > > > > > Best, > > > > Christian > > > > > > > > > > > > > > > > > Why do requests to RESTXQ wait for finishing each other? > > > > > For example: > > > > > declare > > > > > %rest:path("/test") > > > > > %rest:GET > > > > > function page:test() > > > > > { > > > > > prof:sleep(5000) > > > > > }; > > > > > > > > > > If I make 2 requests to /test, the first ends in 5 sec, the second - in 10 sec. > > > > > > > > > -- > > > С уважением, > > > Ветошкин Владимир Владимирович > > > > > > > > > -- > > С уважением, > > Ветошкин Владимир Владимирович > >
--
С уважением,
Ветошкин Владимир Владимирович
ВВ
Ветошкин Владимир29 Aug 2018 09:20 #
Hi!
Why are there max 7 jobs in the job list?
I have tried changing
PARALLEL parameter - no effect.Quoted text · Ветошкин Владимир · 66 lines
25.08.2018, 22:39, "Ветошкин Владимир" <en-trance at yandex.ru>: > That seems to be the case. > Thanks. > > 25.08.2018, 22:18, "Christian Grün" <christian.gruen at gmail.com>: > > > I see. So this must be an issue with Chrome (and, possibly, requests to localhost). > > > > Ветошкин Владимир <en-trance at yandex.ru> schrieb am Sa., 25. Aug. 2018, 21:16: > > > > > Hmm.. When I request "test" in 2 tabs of chrome - only one job appears. > > > But when I request the first "test" in one tab and the second "test" in another browser (or in incognito tab) - two jobs appears. > > > > > > 25.08.2018, 21:36, "Ветошкин Владимир" <en-trance at yandex.ru>: > > > > > > > Hi, Christian! > > > > > > > > Oh, yes, I test it on an old single-core system :) > > > > Is it the reason? > > > > In DBA only one job listed. When the first "test" finish, in job list appers the second job. > > > > > > > > 25.08.2018, 21:15, "Christian Grün" <christian.gruen at gmail.com>: > > > > > > > > > Hi Vladimir, > > > > > > > > > > parallel sleep requests will be evaluated in parallel indeed (see the > > > > > attached screenshot). How did you test this? > > > > > > > > > > If you have an old single-core system, it might happen that only one > > > > > job will be executed at a time; but all jobs should be listed in the > > > > > DBA, or when calling jobs:list-details(). > > > > > > > > > > Best, > > > > > Christian > > > > > > > > > > > > > > > > > > > > > Why do requests to RESTXQ wait for finishing each other? > > > > > > For example: > > > > > > declare > > > > > > %rest:path("/test") > > > > > > %rest:GET > > > > > > function page:test() > > > > > > { > > > > > > prof:sleep(5000) > > > > > > }; > > > > > > > > > > > > If I make 2 requests to /test, the first ends in 5 sec, the second - in 10 sec. > > > > > > > > > > > > -- > > > > С уважением, > > > > Ветошкин Владимир Владимирович > > > > > > > > > > > > > -- > > > С уважением, > > > Ветошкин Владимир Владимирович > > > > > > -- > С уважением, > Ветошкин Владимир Владимирович >
--
С уважением,
Ветошкин Владимир Владимирович
CG
Christian Grün29 Aug 2018 10:17 #
There can be much more jobs in the list, so once again I guess it’s related to your testing environment. Feel free to give us more details.
Quoted text · Ветошкин Владимир · 85 lines
On Wed, Aug 29, 2018 at 9:20 AM Ветошкин Владимир <en-trance at yandex.ru> wrote: > > Hi! > > Why are there max 7 jobs in the job list? > I have tried changing PARALLEL parameter - no effect. > > 25.08.2018, 22:39, "Ветошкин Владимир" <en-trance at yandex.ru>: > > That seems to be the case. > Thanks. > > 25.08.2018, 22:18, "Christian Grün" <christian.gruen at gmail.com>: > > I see. So this must be an issue with Chrome (and, possibly, requests to localhost). > > > Ветошкин Владимир <en-trance at yandex.ru> schrieb am Sa., 25. Aug. 2018, 21:16: > > Hmm.. When I request "test" in 2 tabs of chrome - only one job appears. > But when I request the first "test" in one tab and the second "test" in another browser (or in incognito tab) - two jobs appears. > > 25.08.2018, 21:36, "Ветошкин Владимир" <en-trance at yandex.ru>: > > Hi, Christian! > > Oh, yes, I test it on an old single-core system :) > Is it the reason? > In DBA only one job listed. When the first "test" finish, in job list appers the second job. > > 25.08.2018, 21:15, "Christian Grün" <christian.gruen at gmail.com>: > > Hi Vladimir, > > parallel sleep requests will be evaluated in parallel indeed (see the > attached screenshot). How did you test this? > > If you have an old single-core system, it might happen that only one > job will be executed at a time; but all jobs should be listed in the > DBA, or when calling jobs:list-details(). > > Best, > Christian > > > > Why do requests to RESTXQ wait for finishing each other? > For example: > declare > %rest:path("/test") > %rest:GET > function page:test() > { > prof:sleep(5000) > }; > > If I make 2 requests to /test, the first ends in 5 sec, the second - in 10 sec. > > > > -- > С уважением, > Ветошкин Владимир Владимирович > > > > > -- > С уважением, > Ветошкин Владимир Владимирович > > > > > -- > С уважением, > Ветошкин Владимир Владимирович > > > > > -- > С уважением, > Ветошкин Владимир Владимирович >
ВВ
Ветошкин Владимир29 Aug 2018 16:34 #
Oh, it's browser =)
Max Number of default simultaneous persistent connections per server/proxy:
Firefox 2: 2
Firefox 3+: 6
Opera 9.26: 4
Opera 12: 6
Safari 3: 4
Safari 5: 6
IE 7: 2
IE 8: 6
IE 10: 8
IE 11: 12
Chrome: 6
Quoted text · Christian Grün · 91 lines
29.08.2018, 11:18, "Christian Grün" <christian.gruen at gmail.com>: > There can be much more jobs in the list, so once again I guess it’s > related to your testing environment. Feel free to give us more > details. > > > On Wed, Aug 29, 2018 at 9:20 AM Ветошкин Владимир <en-trance at yandex.ru> wrote: > > > Hi! > > > > Why are there max 7 jobs in the job list? > > I have tried changing PARALLEL parameter - no effect. > > > > 25.08.2018, 22:39, "Ветошкин Владимир" <en-trance at yandex.ru>: > > > > That seems to be the case. > > Thanks. > > > > 25.08.2018, 22:18, "Christian Grün" <christian.gruen at gmail.com>: > > > > I see. So this must be an issue with Chrome (and, possibly, requests to localhost). > > > > > > Ветошкин Владимир <en-trance at yandex.ru> schrieb am Sa., 25. Aug. 2018, 21:16: > > > > Hmm.. When I request "test" in 2 tabs of chrome - only one job appears. > > But when I request the first "test" in one tab and the second "test" in another browser (or in incognito tab) - two jobs appears. > > > > 25.08.2018, 21:36, "Ветошкин Владимир" <en-trance at yandex.ru>: > > > > Hi, Christian! > > > > Oh, yes, I test it on an old single-core system :) > > Is it the reason? > > In DBA only one job listed. When the first "test" finish, in job list appers the second job. > > > > 25.08.2018, 21:15, "Christian Grün" <christian.gruen at gmail.com>: > > > > Hi Vladimir, > > > > parallel sleep requests will be evaluated in parallel indeed (see the > > attached screenshot). How did you test this? > > > > If you have an old single-core system, it might happen that only one > > job will be executed at a time; but all jobs should be listed in the > > DBA, or when calling jobs:list-details(). > > > > Best, > > Christian > > > > > > > > Why do requests to RESTXQ wait for finishing each other? > > For example: > > declare > > %rest:path("/test") > > %rest:GET > > function page:test() > > { > > prof:sleep(5000) > > }; > > > > If I make 2 requests to /test, the first ends in 5 sec, the second - in 10 sec. > > > > > > > > -- > > С уважением, > > Ветошкин Владимир Владимирович > > > > > > > > > > -- > > С уважением, > > Ветошкин Владимир Владимирович > > > > > > > > > > -- > > С уважением, > > Ветошкин Владимир Владимирович > > > > > > > > > > -- > > С уважением, > > Ветошкин Владимир Владимирович > >
--
С уважением,
Ветошкин Владимир Владимирович
Written for BaseX 9.0. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery