Forum OpenACS Q&A: Response to Request for Comments and Discussion: Building a Leaner, Meaner OpenACS with MIST

It seems the discussion is not about configuraton tool (MIST), but about architecture. If OpenACS project adopted layering pattern, it could be easier to maintain and extend. The question is it OpenACS objective?

The essence of the pattern is that lower layer provides services only to upper layer. Lower layer never depends on upper layer (i.e. core OpenACS never depends on dotLRN). So architecture looks like this:

  1. System services (Linux, Postgresql, AOLserver)
  2. Foundation layer (authentication, objects.)
  3. Core application layer( forum, news, portal, calendar etc.) aka "business object layer" -a set of basic applications to solve problems in a particular domain (in OACS' instance - task of building online communities; but somebody may build a set for building stock market trading system, for example)
  4. Standard Applicaton layer (ready solutions for more specific task, such as community aimed at learning: dotLRN; or a "typical" blogger community for news discussion, or a web-store with attached community of customers (does it ever work?) etc.
  5. Custom applications done by customers to their own needs.

As you already noticed, it looks aufully like Enterprise Java. Nothing wrong with that, but with all those layers you may expect slow performance. Besides, it's inefficient trying to do object oriented programming in scripting languages like tcl. Why not direct in Java then? The language was designed for this stuff, after all. Example of ezPublish shows - you can build decent object-oriented framework with PHP, but it will be sloooow... And you never achieve stability of Java anyway.

But hear this. On the other hand, if you "compress" above core layers 2 and 3 into a monolitic OpenACS, you will still be able to provide basic services needed to build online communities. This application will be very difficult to upgrade and maintain, but who cares since people will be constructing new "types" of online communities on top of that (learning community, shoping community, political party, religious group etc). As far as core service set is stable and doesn't change (forum is forum after all and news/comments are news/comments) - nobody cares if there is a "expandable" object framework under it. Eveybody cares for speed and stability, though...

You can go even further and stuff your code into database (triggers and what you got), simplify your table structure (and break your neat data object framework) - and you can achieve a blazing speed for your application. This will lock OpenACS in PostgreSQL and Linux, though. Or you have to write another OACS for Oracle, more or less.

If anyone remembers, Greenspun had argument against using n-tier architecture in ACS. Why create layers when you know exactly what web services you will need in the end? Do most online communities need stock quotes? Do most communities use Windows? What is obvious enterprise-class database? So, ACS was made monolitic, married to Oracle and Solaris. Point. The system could scale up like a beast on a simple machine. The same machine that would choke on its first EJB...

So, I would argue 3.x system was made monolythic on purpose as one big "business object" that is stable, fast and provides only basic services to create online communities. After that all creativity and talent of the aD went into creating business applications with the toolkit.

Which path OpenACS community will chose, depends on its members vision. I see danger in trying to build Enterprise Java-type of busness object framework in tcl, however challenging it may be. On the other hand, if layers 2-3 (above) are made stable and optimised for performance - you have one great core business object for community building, including built-inIDE to create application like dotLRN - and many new ones. That is what I see as differentiating and unique feature of OpenACS under the sun.