On Mon, Aug 31, 2009 at 8:59 AM, William Stein<wst...@gmail.com> wrote: > > > On Mon, Aug 31, 2009 at 8:45 AM, Thierry Dumont <tdum...@math.univ-lyon1.fr> > wrote: >> >> William Stein a écrit : >> > >> > The first thing I plan to do is consider switching from >> > twisted to Django, as is done in codenode -- see http://codenode.org/ -- >> > hopefully, even sharing code with that project. >> >> Django is used (generally) with mod_python under Apache. Does it means >> that the whole Sage will be served by Apache and mod_python? This would >> (may be) improve performances, no ? >> > > I doubt it would impact performance in practice. Improving performance is > going to require improvement to the rest of the server code. > > For Sage, the default would be that the notebook is still served by some > Python library -- most likely Twisted of course -- but that at least the > option of replacing use of Twisted by Apache would exist. > > Codenode guys -- since I speak from 0 experience (!) -- any comments on the > relative performance of Apache versus Twisted?
For what we are trying to do, i.e. write an "online programming notebook" (Sage notebook / Codenode), the bottleneck is definitely going to be the processes that are actually executing the code, the communications from these processes back to the "Frontend", and the additional data operations like saving user state. Consider a "very small" load on a regular website, maybe 100 users at once doing various things like reading static articles or checking out photos. In the case of the Sage Notebook or Codenode, that's *100 python/sage processes* - Apache vs Twisted doesn't make much of a difference here. A Twisted web server can easily handle 100 users, and so can Apache, it's a moot point for what we are trying to accomplish, imho. There are other optimizations that are far more important - like optimizing file system / database calls. To summarize, we have many more pertinent problems to solve than trying to decided how a web server might improve performance. Also, as William has mentioned, talking about all this in an anecdotal way is mostly useless. We need well thought out benchmarks - which is a challenging science in its self (there are lies, damn lies, and benchmarks). -- Also, Django is a web framework, meant to be served by a WSGI server. With codenode, the default is to use Twisted, which *has* WSGI serving functionality, and it's very convenient to use Twisted because for most situations users don't have to know anything about the fact that Twisted is doing the WSGI. Surely this is desirable for the Sage notebook, as with codenode. You can go to the extra effort to use Apache/Nginx to do the WSGI, but at this moment with codenode it hasn't been needed for our usage because Twisted works great. That said, as soon as possible, I want to test and document all configurations so people can choose what they prefer. -Alex > > William > >> >> t.d. >> >> >> > > > > -- > William Stein > Associate Professor of Mathematics > University of Washington > http://wstein.org > > > > -- Alex Clemesha clemesha.org --~--~---------~--~----~------------~-------~--~----~ To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---