On Sun, Jul 20, 2008 at 10:24 PM, Shing Hing Man <[EMAIL PROTECTED]> wrote:
>
> If I submit a command that takes a long time to run,
>
> eg
> (1)   
> http://localhost:8000/simple/compute?session=(session)&code=factor(2^1000
> -1)
>
> then the immediately returned JSON will have status equals computing.
>
> I have modified my Java program, so that after (1) is submitted,
>
> I keep querying SAGE with
>    http://localhost:8000/simple/status?session=(session)&cell=(cellId)
>
> until the returned status is done.
>
> Is there a better way to wait for (or be notified of) the completion
> of a command ?
>

I don't know of a way using the simple server.
By the way even the Sage notebook doesn't actually do
anything more sophisticated than ask whether the computation
is finished or not.   One thing we do is a backoff; at first the
notebook checks often whether the computation is done, but
if not, it checks less frequently.

William

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to