Forum OpenACS Development: OpenACS on Apache?
I think the last time this was discussed was around 2001 (https://openacs.org/forums/message-view?message_id=18951).
There are many reasons (technical and of marketing) for which being able to run openacs/dotlrn would be convenient, and things at openacs have changed a lot since 2001.
How big an effort would this be?
Would this be a worthwhile effort?
Just for fun, I added an ns_load command into my libnsd that allows you to also load AOLserver modules into TCL. It is definitely a hack, but works for simple modules like nssha1. You can see a screenshot at http://www.jamierasmussen.com/documents/programming/openacs/ns_load.png
I believe John was considering modifying portable.nsd to load libnsd if it was available and to fall back on the pure TCL implementation of the API if not - I don't know if he did. Building on the work John and Michael have already done on portable.nsd I think it should be possible to run at least a basic OpenACS instance on TclHttpd or Apache without investing too many hours.
I think you're describing the approach mod_aolserver took. I don't know too much about it, but it's more complicated than just rewiring the return function. The biggest issue with using a binary interface to wire openacs into another web server is that it has to be updated when the interface changes, or rewritten for each new web server you want to support. I think that's why the idea continues to not gain traction (aD tried it with both IIS and Apache).
I feel pretty good about the prospects of running portablensd under apache and iis, and avoiding the binary issue by using fastcgi. It worked well on the platforms I tried it on (apache 1.3x/win32 + apache 2/rh9)
I got hung up on implementing ad_form and the new listbuilder -- the templating code was too messy and too different from Michael's nstcl for me to reconcile. I don't think it would be hard from someone better at TCL than myself (like Michael, say).
There were a few other issues, but no show-stoppers.
fwiw, I did plan to look for libnsd and fall back to tcl-only routines if they exist, but I'm not sure if the functionality exposed in libnsd offers enough of a performance increase to justify the maintainence overhead (i.e. adding another row to the pnsd test matrix.)
What you are saying is very promising. I think that using Apache could be very usefull for the people developing webservices for openacs, besides also being better for those marketing openacs.
nstcl implements a subset of the ns_ commands involved in processing adp templates, and ad_form makes use of some of the ones that are not implemented. Because of differences between how nstcl and aolserver implement these it's not a simple matter of implementing the missing ns_* procs. Specifically, recursion is handled differently in the native and pure tcl libraries, and ad_form relies on some globals (level, content) that don't necessarily have the same values at the same adp parse/emit stage.
The aD code's reliance on globals made it really hard for me to figure out what was going on, and ultimately I couldn't figure out how to bridge the two. Michael C suggested just reimplementing ad_form, as he did with the almost all the rest of the custom tags. His reimplemented code relies much more on namespaces than on globals, and is much cleaner to extend and debug.