On Sat, Feb 23, 2008 at 12:02 AM, didier deshommes <[EMAIL PROTECTED]>
wrote:

>
> On Fri, Feb 22, 2008 at 5:57 PM, alex clemesha <[EMAIL PROTECTED]> wrote:
> > In Knoboo we *decouple* the idea of a kernel, it could be another
> > Python (Sage) process, with communication through Pexpect
> >
> > ... but it also couple be another Python (Sage) process running a very
> > minimal XML-RPC server, and all communication occurs through
> >  *** HTTP instead of Pexpect ***.
>
> I personally am not too familiar with web development, so it's always
> great to hear from someone who has (which is exactly why this
> discussion was started). Regarding XML-RPC vs Pexpect:
>  - how slow is one compared to the other?  I expect xml-rpc to be
> slower, but not so slow to render it unusable.


I would say that it is even faster than how the current Sage notebook
does its process of compiling scripts to be passed back and forth with
Pexpect.

But in reality, both methods of communication, in most cases,
are sub-second and constant, so this is mostly a complete non-issue.


> - I understand xml-rpc working for inter-communication, ie SAGE ->
> outside world, but I don't see how it would work for
> intra-communication, SAGE -> maxima. Maxima would have to be already
> running in the background, right? If that is the case, then every sage
> session would have to spawn singular, maxima, maple, etc sessions at
> start-up. I don't like that. Is there something I'm not getting here?


Sage intra-communication would stay exactly the same.  The way that
works (pseudo-tty) won't be changing any time soon (ever?).
It's fundamental to how Sage encapsulates all it's external programs.

Behind the scenes, when you use a function that requires,
for example, singular or maxima to be used, then that new process
would start only when you call that function, not at startup,
which is already a working, built in part of Sage.

The method of using some light-weight RPC server,
(could be Python's built in XML-RPC server, could be a DSage instance, etc)
to act as the running namespace for a notebook is almost identical
to how the Sage notebook uses it's separate processes for each notebook,
it's just that communication to the *outside world* is done with
standard RPC methods instead of with a psuedo-tty (Pexpect).  This is the
key point.

By using standard RPC methods,
(which by the way is the bread and butter of most web services, regardless
of programming language)
to communicate with the running Sage process,
you can then support some API which others can use too.

-Alex









>
> didier
>
> >
>

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

Reply via email to