On Wed, Jul 1, 2015 at 12:48 PM, Uriel Avalos
<[email protected]> wrote:
> Basically, we're building a REST web service that takes math expressions and
> returns the evaluated result.
>
> We currently have a service that invokes sage via the '-c' flag (i.e.,
> command line) with *each* request.
>
> Unfortunately, that's obviously too slow.
> Is there a way to setup the Sage server to listen for requests?

You need to start one sage process, then *fork* it to handle each
request.   Forking takes milliseconds instead of seconds.

Here's an example of a forking TCP server for Sage:

   https://github.com/sagemathinc/smc/blob/master/salvus/sage_server.py

The Sage Cell server is (probably) another example.

As others have pointed out, you need to run this thing in a sandbox....

William

>
> --
> You received this message because you are subscribed to the Google Groups
> "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/sage-devel.
> For more options, visit https://groups.google.com/d/optout.



-- 
William (http://wstein.org)

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to