[modtex] / modtex / trunk / doc / TODO Repository:
ViewVC logotype

View of /modtex/trunk/doc/TODO

Parent Directory Parent Directory | Revision Log Revision Log


Revision 27 - (download) (annotate)
Thu Feb 15 04:11:41 2007 UTC (3 years, 6 months ago) by pcd
File size: 13590 byte(s)
rid of double ## on copyright: reserved for Doxygen; add: Doxygen props









                   mod_tex 0.1-beta TODO

          Peter Danenberg <pcd at wikitex dot org>
                   http://wikisophia.org



                          ABSTRACT

          Things  to  do  (exigenda)  and  things  done
     (exacta) are recorded here.



14 February 2007













































TODO                         -i-            mod_tex 0.1-beta


                     Table of Contents


1.  Exigenda . . . . . . . . . . . . . . . . . . . . . .   1
     1.1.  Server  . . . . . . . . . . . . . . . . . . .   1
          1.1.1.  Multiple Documents . . . . . . . . . .   2
     1.2.  Documentation . . . . . . . . . . . . . . . .   3
     1.3.  Handler . . . . . . . . . . . . . . . . . . .   3
     1.4.  Jailkit . . . . . . . . . . . . . . . . . . .   3
2.  Exacta . . . . . . . . . . . . . . . . . . . . . . .   4
     2.1.  Generic . . . . . . . . . . . . . . . . . . .   5
          2.1.1.  Cache  . . . . . . . . . . . . . . . .   5
     2.2.  Server  . . . . . . . . . . . . . . . . . . .   5
     2.3.  Client  . . . . . . . . . . . . . . . . . . .   6
          2.3.1.  Cache  . . . . . . . . . . . . . . . .   6
     2.4.  Documentation . . . . . . . . . . . . . . . .   7
3.  Copyright  . . . . . . . . . . . . . . . . . . . . .   7
4.  Colophon . . . . . . . . . . . . . . . . . . . . . .   7







































                      14 February 2007






TODO                         -1-            mod_tex 0.1-beta





                   mod_tex 0.1-beta TODO

          Peter Danenberg <pcd at wikitex dot org>
                   http://wikisophia.org


1.  Exigenda

     1.1.  Server

          Temp-dir
               tmpwatch and cron

          Parse-trees
               Bring back parse-trees, since Graphviz is not
               a drop-in replacement.

          Back-end
               Transition  to  an array of chrooted Apaches;
               dump SimpleXMLRPCServer on the back-end.

          Error-messages
               Facilities-flag in default.py to return  out-
               put  from  a process, giving feedback; useful
               for: LaTeX or LilyPond, for instance, to dis-
               close syntax errors.

               Not so useful for dvipng, etc. (sysadmins can
               retrieve that from the syslog).

               Some way to scrub sensitive data like  paths?
               The chroot path-structure is well documented,
               though.

          File-size
               Limit requests to size X to avoid memory DoS?

          Graphviz
               Optional link map (outsource source to exter-
               nal link)?

          Cache
               Server-side cache (outsource?)

          Templates
               Some protocol options to turn  off  templates
               for  naked encoding (but not for gnuplot, for
               instance, that depends upon the  template  to
               return an image).





                      14 February 2007





TODO                         -2-            mod_tex 0.1-beta


          Config
               Windows-style config files (or XML?).

          Crontab
               Crontab to delete daily cruft (left over from
               over-ambitious users who outstrip  resources,
               causing files.

          Actions
               Plenary Classes

          Install
               Replace  ad-hoc  installations  by  copytree;
               fail on directory existence.

          1.1.1.  Multiple Documents

               Protocol
                    Protocol change: return a dictionary  of
                    {MIME: ARRAY} objects; where ARRAY is an
                    array of  matching  documents  (such  as
                    dvipng's image-per- page).

               Structure
                    Breadth-first  or  depth-first: meaning,
                    array  of  atomic  dictionaries;  or  an
                    array of unbound arrays?

                    Second may be slightly more efficient in
                    those  cases  where  one   source,   for
                    instance, wields multiple targets (e.g.,
                    latex to multiple PNGs); but more diffi-
                    cult  to  distinguish between uneven and
                    incomplete data.

                    First may require some redundance (e.g.,
                    redundant  MIDIs  per  LilyPond page, or
                    source per LaTeX image); but is cleaner,
                    and determinant.

                    The   superset  renderer  will  have  to
                    receive a glob of targets; but how  does
                    it distinguish between partitioned (e.g.
                    PNGs)  and  whole  (e.g.   LaTeX-source)
                    data?

                    And if partitioned data should come back
                    incomplete or in  disparate  quantities?
                    Can flag partitioned data, I suppose.

                    Bottom line: don't want to fuck up clean
                    design; but may relent to multipage out-
                    put   if   necessary.   (LilyPond's  eps
                    driver, for instance, outputs the  whole



                      14 February 2007





TODO                         -3-            mod_tex 0.1-beta


                    document  in  one  page;  can link to an
                    optional pdf  if  multi-page  output  is
                    desirable.)

                    General  solution: offer optional alter-
                    native download (PDF, say) for multipage
                    docs, specified as parameter.

     1.2.  Documentation

          jailkit.ini
               Document jk_init commands.

          Fontconfig
               Fontconfig  issue with NONE deposited in each
               directory.

          Doxygen
               Real doxygen; what to  do  about  docstrings,
               though?  Answer:  wait until docutils matures
               into automatic  reStructuredText  extraction.
               (Doxygen  also  does  the  nice  call-graphs,
               though; and (who knows?) may do docstrings at
               some point.)

          TODO Raus; find something else: bugzilla?

          Permissions
               Work   with   MediaWiki   to  restrict  usage
               (optionally) to certain classes of users.

          XML-RPC-lib
               Add fallback-support for phpxmlrpc or Incutio
               for  those  with  little  control  over their
               installations, willing to take a  performance
               hit.

     1.3.  Handler

          Throttle
               A  "check back in X seconds" message on over-
               usage.

          Database
               Swap  out  home-brew  lock  system  for  some
               heavy-duty  piece-of-shit  (mysql, say; post-
               gre; or even sqlite3).

     1.4.  Jailkit

          Paths
               Dynamic jailkit with gno-tools  (./configure,
               etc.);  throw  in  --with-user, --with-group,
               etc.; or:  make  a  build_jailkit  target  in



                      14 February 2007





TODO                         -4-            mod_tex 0.1-beta


               setup.py.

2.  Exacta

     Server-client dichotomy
          Server is now its own entity: mod_tex; the client,
          a MediaWiki client, is mod_tex.

     Packaging
          Combine both server and client into a common pack-
          age, or utterly segregated (thus possibly not con-
          fusing the client-users)?

          Latter: combined  source;  `src'  directory:  con-
          tains: `client', `server'.

     PHP-client
          Basic  request working; now to do something useful
          with it.

     Temp-dir
          Does cleanup happen after exceptions? (The  object
          is deleted, after all.)

          Yes.

     Python Apache-handler
          Trader  Joe  acts  as a middle-man between locally
          running, unprivileged, chrooted  servers  and  the
          requesting public.

          More  efficient?  Possibly; will rebuke the prema-
          ture optimization for now.

     THANKS
          Get Erik in there. Hephaistos, Hermes Charmophron,
          Apollon, Hestia, Hera, Athena, dodeka Theoi.

     Footer/Header
          mod_tex  <VERSION>  in  footers or headers, across
          from date

     Honest work in subserver
          Invocation of latex, dvipng

     Web install
          Installs into web-root and changes ownership.

     Title page
          ms-macro to institute  title  page  (include  with
          .so)

     License
          Includable ms-file for license (.so)



                      14 February 2007





TODO                         -5-            mod_tex 0.1-beta


     2.1.  Generic

          2.1.1.  Cache

               Purview
                    Client-, server-side or both?

               Failure
                    Problem: in 1.0+, failed rendering don't
                    get cached and are rerendered every day.

                    Distinguish,  therefore, between server-
                    and syntax-failures; and  cache  accord-
                    ingly.

                    No:  a  simple  flag  PHP side will turn
                    on/off error caching;  functioning  sys-
                    tems  can  turn  it off for performance,
                    and for debugging purposes: back on.

                    It may be useful to distinguish  between
                    temporary and permanent errors, now that
                    we have ad-hoc classes.

     2.2.  Server

          Debug
               Add a verbosity option on some facilities  to
               be  invoked when modtex-debug is invoked; and
               quiet, otherwise.

          Config
               Simplified on excision of client.

          Resource Limits
               Don't setrlimits in case of debug.

          Facilities
               Facility constructor takes merely a **kwargs,
               and  populates  accordingly; no pre-set vars.
               (Implemented: pre-set args and **kwargs.)

          Debug
               build_scripts command which takes --debug and
               disables optimization in modtex-main.py

               No:  rather a modtex/main.py, and two trivial
               wrappers: modtex and modtex- debug, which are
               invoked with `python -O' and `python' respec-
               tively.

          IP-throttle
               Database of author vs. time




                      14 February 2007





TODO                         -6-            mod_tex 0.1-beta


          setrlimit
               Per-request (post droppriv)

          MIME-types
               Currently a non-descript list  in  Constants;
               instantiate  MIME-wrappers  with well-defined
               instance variables.

          Delivery
               Client-server contract for  the  delivery  of
               content (keys for XMLRPC response); encode in
               a format parseable by PHP: XML, say?

               Right now: using an implicit contract (image:
               content).   A low-tech published API may suf-
               fice.

     2.3.  Client

          Source
               `errors' directory to house the manifold.

          Authentication
               CURL-lib on PHP can  handle  basic  and  key-
               based.

          Errors
               Unified error presentation.

          Documentation
               Own  PHP-client  documentation,  or  combined
               with server's (current).

          2.3.1.  Cache

               Purview
                    Use MediaWiki mechanism with  its  over-
                    head, or some ad-hoc system?

               MediaWiki
                    MediaWiki  mechanism: must be tweaked to
                    forbid arbitrary upload; but can  detect
                    orphaned files: Special:Unusedimages.

                    Must  forge,  apparently,  a subclass of
                    WebRequest, filling in  artificial  val-
                    ues.

               Home-brew
                    Own  mechanism: lightweight; but respon-
                    sibility (cruft).






                      14 February 2007





TODO                         -7-            mod_tex 0.1-beta


     2.4.  Documentation

          Territory
               Copyright notices, etc.

          README Mon Jan 22 08:36:11 PST 2007
               Installation

          Build Sun Jan 21 01:46:55 PST 2007
               Build target in Setup.py  which  invokes  the
               Makefile in doc.

3.  Copyright

     mod_tex: distributed LaTeX-rendering over Apache
     Copyright (C) 2007 Peter Danenberg

          You should have received a copy of the GNU General
     Public License version 2 along with  this  program;  if
     not,  write  to  the Free Software Foundation, Inc., 51
     Franklin Street, Fifth Floor, Boston,  MA   02110-1301,
     USA.

4.  Colophon

          This  document was prepared in GNU troff using the
     ms macro package; preprocessed with tbl, the table for-
     matter;  and  lastly  filtered  through  col  to remove
     reverse line feeds and tabs:

          groff -ms -t -Tascii SOURCE | col -bx > OUT

     Automatically generated contents were moved  from  page
     last to first with an ad-hoc bash-diddy.























                      14 February 2007



Peter Danenberg <pcd at modtex dot org>
ViewVC Help
Powered by ViewVC 1.1-dev