Forum OpenACS Q&A: Status and ACS 4.x

Collapse
7: Status and ACS 4.x (response to 1)
Posted by Oli Sharpe on
I've just put up a document that outlines the current status of the RCO project and the road ahead. It's at:

http://later.runtime-collective.org/oms-site/later/home/rco-doc/future

As regards ACS 4.x I think there is a good possibility for some very effective synergy between RCO and the ACS 4.x object model. I have not had any real exposure to using ACS 4.x, but I have read a fair amount of the available documentation. It has led me to believe that there could be a very complimentary match between the 4.x object model in the RDBMS and the RCO objects in memory.

In particular it may be possible to use RCO as a `memory resident cache' of 4.x objects. RCO could be used to manage persistent sessions for users who are, say, performing a lot of editing of content. During the session RCO would manage in memory a copy of the various objects being used in the editing process. This would reduce the number of database interactions to one initial set of selects followed by a few updates when content is saved. Indeed this may even let one database server effectively service a farm of web servers. Once the session is over, the objects are de-activated and the memory recycled.

To achieve this an RCO class called ACS_Objects could be set up as the RCO mirror of the acs_objects table. All application specific objects would then inherit from the ACS_Objects class. Various useful methods would be defined for the ACS_Objects class and thereby be available for use with all ACS objects. Application specific objects would extend the basic class with extra data elements and methods.

RCO is already set up so that the different data elements within one class can be mapped onto columns within different tables in the RDBMS. This way an RCO class can behave like a view on the database .. but a view that you can write to as well as read. So, an ACS_Notes application class, that inherits from ACS_Objects, could map data elements onto both the acs_objects table and onto the notes table.

Another area where the RCO code base could be interesting to ACS 4.x is in the development of new objects. RCO already has a web based development environment where new classes can be defined along with methods associated with the class. In the RCO environment these class definitions are then translated into a Tcl file of RCO procedures (a bit like proc_doc calls) that actually create the class. The Tcl file is created, saved and re-loaded (using the ACS 3.4 `watch' code) so that the new class is instantly available for use. It shouldn't be too hard to extend this functionality to be able to spit out the necessary code for creating an ACS 4.x object as well (such as the PL/SQL procedures ..etc). However, I have no experience of writing these object definitions by hand, so I don't know how easy this would really be and whether or not these object models can be re-loaded.

So, although I don't know the details of ACS 4.x I am very excited about the possibilities when RCO is made compatible. Realistically it wont happen for at least a couple of months. As you mentioned, Don, hopefully the first OpenACS 4.x will have been released by then and so I can use it as the basis for making RCO compatible.