ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Mon, 21 Jul 2014 09:38:02 +0200How to run Sage as a daemon / service?https://ask.sagemath.org/question/23509/how-to-run-sage-as-a-daemon-service/This isn't really a question as much as it is an attempt to get the "Sage daemon/service" keywords indexed in search engines (I came upon many people asking for this in my own search).
I figured out how to run Sage as a daemon using Python and sockets - the code can be found in http://ask.sagemath.org/question/23431/running-sage-from-other-languages-with-higher-performance/ .
I was looking into creating an init script, but my Linux knowledge is too lacking in this area (even when I try to edit the /etc/init.d/skeleton script). In any case anyone who can write a proper init script this would be very welcome - I was imagining something along the lines of an init script calling a binary `/usr/bin/sageadmin` that would:
- Start daemon via Sage executable and path to the Python daemon script
- Stop daemon using sockets
- Check status using sockets
As for the `sageadmin` binary I can write the socket C code, but I'm not sure what else is required. http://www.enderunix.org/docs/eng/daemon.php seems to have a couple of good points, but again - I'm not that comfortable with writing code for something this low level in Linux.
So to sum up: I've made the Python script for "daemonizing" Sage - I'm hoping someone else (with more complete Linux knowledge) can write an init script and the required parts of a `sageadmin` binary.WoodgnomeMon, 21 Jul 2014 09:38:02 +0200https://ask.sagemath.org/question/23509/Call Sage functions from Node.js or other web app/servicehttps://ask.sagemath.org/question/8697/call-sage-functions-from-nodejs-or-other-web-appservice/Hi,
I have a Node.js app that needs to use a few of Sagemath's functions.
I have no idea at all how I can call into Sage from a js backend, or even if it's possible to call it from an external process.
Obviously being able to call Sage to plot a graph and receiving the result as a stream or saved to disk would be optimal. But so far, I would be happy if I could call factor() from a web page and display the results.
Anyone has an idea how to accomplish this?
I don't mind having a Python layer around Sage if thats what it takes, but any code snippets or pointers to existing libraries would be highly appreciated.
Thanks. MichelTemSat, 04 Feb 2012 04:01:25 +0100https://ask.sagemath.org/question/8697/Can I shutdown the server from the admin web interface?https://ask.sagemath.org/question/7631/can-i-shutdown-the-server-from-the-admin-web-interface/So far I've always hit control-c in the terminal where I called "./sage -n"; is there a cleaner way to setup the server as a service?ccanoncWed, 25 Aug 2010 21:31:50 +0200https://ask.sagemath.org/question/7631/