Parallel and-or asynchronous execution

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Parallel and-or asynchronous execution

GLASS mailing list
Hi,

Imagine the following situation a web user click on "Execute" in the Web
App.

This will trigger the execution of 3 different scripts inside a collection
(each is an instance of BpmScriptTaskInstance).

In most cases the script run fast but in some cases the Script can be long
so the execution is slow.

I want the web user have the control after click on "Execute" -->
asynchronous.

For these cases i want a Gem to run each script. (all in the same GemStone
installation)

Is GsExternalSession the way to go ?

The Gems that serve the Web App will handle GsExternalSession in such a way
to create a new Gem for each script.

Is this the way to go ?

Or it is better to have a Rc collection to add these scripts and then use
Topaz scripts to process my script inside the collection. In this case i
have to have some way to know the number of elements in the collection in
order to create the same number of Gems.

Maybe a Topaz script using GsExternalSession to start the correct number of
Gems ???

regards,
bruno



--
Sent from: http://forum.world.st/GLASS-f1460844.html
_______________________________________________
Glass mailing list
[hidden email]
https://lists.gemtalksystems.com/mailman/listinfo/glass
Reply | Threaded
Open this post in threaded view
|

Re: Parallel and-or asynchronous execution

GLASS mailing list
I think you want this:

https://github.com/GsDevKit/ServiceVM


It creates a gem that polls a queue and does the tasks it finds on the
queue.  

Once your user clicks you can add your scripts to the queue.

You can then have your user's browser poll your seaside app to see if the
tasks are done and once they are update the UI.

There is a Seaside example in that repo that covers adding the tasks and
polling for a response and I have no idea if it still works or not but
should. Or it shouldn't be too hard to get it working if it doesn't. Its
probably just outdated app registration if anything.

The ServiceVM gem stuff definitely still does.  





GLASS mailing list wrote

> Hi,
>
> Imagine the following situation a web user click on "Execute" in the Web
> App.
>
> This will trigger the execution of 3 different scripts inside a collection
> (each is an instance of BpmScriptTaskInstance).
>
> In most cases the script run fast but in some cases the Script can be long
> so the execution is slow.
>
> I want the web user have the control after click on "Execute" -->
> asynchronous.
>
> For these cases i want a Gem to run each script. (all in the same GemStone
> installation)
>
> Is GsExternalSession the way to go ?
>
> The Gems that serve the Web App will handle GsExternalSession in such a
> way
> to create a new Gem for each script.
>
> Is this the way to go ?
>
> Or it is better to have a Rc collection to add these scripts and then use
> Topaz scripts to process my script inside the collection. In this case i
> have to have some way to know the number of elements in the collection in
> order to create the same number of Gems.
>
> Maybe a Topaz script using GsExternalSession to start the correct number
> of
> Gems ???
>
> regards,
> bruno
>
>
>
> --
> Sent from: http://forum.world.st/GLASS-f1460844.html
> _______________________________________________
> Glass mailing list

> Glass@.gemtalksystems

> https://lists.gemtalksystems.com/mailman/listinfo/glass





--
Sent from: http://forum.world.st/GLASS-f1460844.html
_______________________________________________
Glass mailing list
[hidden email]
https://lists.gemtalksystems.com/mailman/listinfo/glass
Reply | Threaded
Open this post in threaded view
|

Re: Parallel and-or asynchronous execution

GLASS mailing list
Dale,

Excellent !

Now i'm checking class and code at Seaside-GemStone-Tools-Production
package.

regards,
bruno



--
Sent from: http://forum.world.st/GLASS-f1460844.html
_______________________________________________
Glass mailing list
[hidden email]
https://lists.gemtalksystems.com/mailman/listinfo/glass