Forum OpenACS Q&A: Response to The whole java thing, Tclblend and Webmail

Collapse
Posted by Brent Fulgham on
Dan,

We do wrap many pieces of the Tcl API, but that's mainly as a means to get things working quickly.  Furthermore, we are seeking a high level of Tcl integration, so some of what you are seeing are Tcl callbacks to Python, Python callbacks to Tcl, etc.

We plan on exporting all AOLserver API functions through Python, using the ns_python and pywx modules that are already present (in an early form) in PyWX.

The important thing to note is how the python interpreter is created and cached by AOLserver.  You will also need to devise a way of connection the Java I/O streams to AOLservers input and output buffers.  That's what the AOLbuffer C++ class does (in a messy way).

It might interest you to know that I'm getting started embedding a Scheme interpreter (Guile) in AOLserver.  It's not because I'm a
language-crazy fiend (I prefer to remember as few as possible), but
it dovetails with another effort I've got going on.  At any rate,
we might want to discuss embedding issues together so we can have a somewhat unified system of handling these projects.

I believe that once your Java interpreter is in-process with AOLserver, it's standard error will automatically be written to the logfile.  Then you need to decide if you want to redirect all I/O through AOLservers HTTP ports, or if you want to implement specific commands (like ns_write) that do this for you and leave standard I/O alone.

Anyway, let me know if I can answer any questions.