"Server" to Server Connection and Command Blacklist



Hi Gerd,

> Of course I found the "--server" command line option in the man-
> pages, but reading this list, I found out that the Maxima server is
> really a client and needs a running server. However, all I could find
> was that usually xmaxima is this server.

Take a look at http://maxima.sf.net/relatedprojects.shtml ---
all of the projects listed there have solved the client/server
problem in one way or another.

> I imagine I need to write a small server program that runs on some
> port, and then tell Maxima to connect to that port via the command
> line open, and then I talk to my server via another port or socket
> when I need something ... but then I am lost: I have no idea what the
> protocol needs to be. Any hints or code snippets would help.

Well, I'm pretty sure there is no special protocol:
the Maxima client process just reads and writes the socket
connection as if it were the console (inputs and outputs are
passed as strings and not any kind of internal data structure).

One tricky part here is to figure out where the input prompts
in the stream of stuff coming back from Maxima.
These messages talk about that:
http://www.math.utexas.edu/pipermail/maxima/2006/012190.html
http://www.math.utexas.edu/pipermail/maxima/2006/012292.html

> - a blacklist is nice, but is there a "safe" mode that disables
> system and disk access in a command line or configuration
> that I did not find?

A safe mode is a great idea, but Maxima doesn't have one.

It sounds like you want to run Maxima as a CGI process ---
if so you might be able to get the web server's cooperation
here, putting limits on cpu and memory use and forbidding
file i/o (or maybe just file output, since loading scripts from
the maxima/share library is pretty useful).

If you make some progress on this "safe mode" problem
I would be really interested to hear about it.
It is a problem that people have asked about before
and it would be great if we had a ready answer.

Hope this helps,
Robert Dodier