Forum OpenACS Q&A: Thoughts on CCM

Collapse
Posted by Michael Bryzek on
I wanted to respond to Jun's post
(https://openacs.org/bboard/q-and-a-fetch-msg.tcl?msg_id=0005pP&topic_id=11)
listing some thoughts on redhat CCM, but thought it more appropriate
to start another thread to not clutter the nsjava discussion.

Thank you Jun - your thoughts on your experiences with CCM are
excellent. I would like to share a few of my own experiences working
with CCM over the past year. I too have built sites of various
complexities using many different flavors of ACS (1.x classic to
openACS 4.5).

Most recently, I worked with a group of 4 other developers putting
together the website for www.futuredex.com. Underneath, the site is
fairly complex in terms of data capture, administrative UI, and search
functionality. We store literally 1000's of unique pieces of data
related to our core object types and the relationships between them.
We built a pretty advanced search engine which is capable of
efficiently searching through the data using many different criteria
simultaneously.

Throughout the development process, we've constantly compared our
experiences to what we would expect had we used a product like
openACS. As Jun points out, each has its advantages. Some thoughts:

  * The user interface for search and the underlying logic to generate
the correct, efficient queries is complex. With CCM, we are able to
provide a framework for interacting with the search engine, providing
for relatively easy reuse and extension of the forms and queries we
use. This allows us to provide basic search, advanced search, browsing
along many different dimensions, customized UI, and unique attributes
for administrative interface using the exact same core code. Could we
build the the same type of functionality in openACS? Absolutely. Would
it be easier, faster to implement, or more robust? I'm not sure. CCM
and an object oriented language like Java certainly were good tools
for what we needed to do.

  * The CCM has a complex dispatching system that lets each individual
package dispatch in its own unique way. This flexibility proved to be
completely unnecessary for us, and the code itself was very hard to
debug. When I built a subsite-based online alumni database using ACS
3.x, the request processor provided an elegant solution that worked
exactly as expected and was relatively straight-forward to debug.

  * Once you understand how the CCM persistence system works, it
really has a few wonderful advantages. One example is that data model
changes are very easy to make using CCM -- changing a column name is
often as simple as updating one line of code. The other major
advantage of CCM is that it lets you override all aspects of itself -
if you don't like the way an object is retrieved from the database,
you can provide your own custom query to do it the way you like. One
disadvantage of the persistence system is a loss of some efficiency -
for most cases, you will retrieve a bit more information than you
absolutely need for your page. You can always override this, but
chances are it won't matter enough to do so.

  * Some of the greater abstraction provided by CCM can really kill
you if you're not careful. For example, it's easy to write code which
hits the database once per row for a hundred rows. In the ACS world,
when the database api was first introduced, we had a similar problem -
all of a sudden it became very easy to nest db queries. With CCM,
there are more ways to do this which are not obvious at first, but
once you know what to look at for and *how* to tune your pages, the
problem can be handled.

  * The current community surrounding CCM, simply put, sucks. Unless
I'm looking in the wrong places, I can't find any place remotely
similar to the openACS community. Redhat told me they were planning on
opening up their development process once the dust settles, but it's
been a few months and nothing is happening. I submitted a simple patch
to redhat to see how well user contributions would be accepted, and it
has been ignored as far as I can tell.

  * The learning curve on CCM is much longer compared to openACS. Part
of this is due to the greater level of abstractions, and part of it is
due to the greater number of large problems the CCM tries to address
(db abstraction thru a persistence layer, presentation through
xml/xslt, reusuable web UI thru bebop).

  * The amount of interest in Java itself is great - the JDK's from
Sun are rich in functionality as is the open-source world (open
symphony is a good example).

Collapse
Posted by Jun Yamog on
Hi Michael,

Firstly its great to see you here.  Especially given the fact that if you grep count ACS Tcl or CCM, your name will probably be in the top 5.  Although its unfortunate to confirm my thoughts that pretty much the core development team of CCM is not with Red Hat anymore.  I wonder who are filling all those big shoes left at Red Hat.

Since CCM community simply sucks I apologize of posting further about CCM here.

Anyway has anybody tried out BeanShell?  http://www.beanshell.org/intro.html  When developing in CCM you really miss Tcl.  These seem to be a good idea to imbed into CCM to address its scripting weakness.  Although I am not capable enough to implement or even validate the idea.  Anybody out there has some thoughts regarding this?

Collapse
Posted by Richard Li on
I've written an update that I'll try to maintain: http://people.redhat.com/richardl/ until we launch our ccm.redhat.com website.

Although its unfortunate to confirm my thoughts that pretty much the core development team of CCM is not with Red Hat anymore.

Jun, virtually the entire engineering team that designed and developed ACS 4 Tcl, ACS 4 Java, and CCM Core/ACS 5 is still working hard on improving CCM. I'm not sure who you think of when you refer to the "core development team", but I many (if not most) of the key contributors are still working in Red Hat's CCM group.

All of us at Red Hat view community as absolutely critical to our growth and ultimate success. I'm glad that OpenACS has flourished and I hope that we can find a way to work together as we go forward. There's tremendous opportunity for synergy between our groups, and I'd like to see what we can do to take advantage of the fact that we're all trying to tackle similar types of problems.

Collapse
Posted by Peter Marklund on

A thread about the future of ACS Java was started at pinds.com a couple of months ago and there me and Lars tried to explain some of the issues that we have with the ACS Java platform back in the day when we worked with it (autumn last year).

Obviously the platfrom has improved since I worked on it. Richard - congratulations on the plans for PostgreSQL support and RPM packaging, that's great news! I would love for CCM to be successful! However, there are some issues that need to be resolved before I feel that I can recommend it.

The major technical issue for me in using the platform is its presentation API - Bebop. The API may be all so well designed from an OO perspective but it doesn't allow for the easy rapid development of traditional templating approaches (in the Java world Struts and Velocity are two alternatives). I would be curious to hear what RedHat's plans are in this area. Will Bebop be replaced with something lighter?

Collapse
Posted by Andrew Piskorski on
For scripting with Java, I'm not familiar with any of them, but would BeanShell be more or less usefull than Jacl or TclBlend?
Collapse
Posted by Jun Yamog on
Richard,

I apologize for saying that the core development team is not with Red Hat anymore.  I think I should rephrase that into I am not familiar who else is working at Red Hat's engineering team.  Karl G, Lars, Yon and Michael B is not there anymore.  I guess the developer who keeps appearing in the code and docs that I don't know the status is Bryan Quinn.  Can we know who are working on CCM?  Again I apologize no negative intention was meant.

I like the rpm of 5.1 I have been using it with Vadim and Richard Su its a real step forward.

I hope that we get some place even a mailing list.  Me, Nick Anger and Ming has been keeping in touch with one another using our address book.  That is really very bad.  The community is in much worse shape than before.  I can't wait for ECM why can't a mailing list will do for the meantime its been months since we where promised the bboards will be up.  Maybe a CCM place here at OpenACS but I am not sure if its ok since some OpenACS community members does not welcome the thought of CCM.  Please even a mailing list will do.

Peter,

I have to agree that CCM is a lot more complex and less community support than getting Velocity, Struts, etc.  But I think the same way was OpenACS in the PHP, Apache world.  OpenACS has integration and complexity with it, so we choose OpenACS than getting the different scripts out there.  I guess the same way goes with CCM.  Although CCM does make use of some Java OSS libs out there.  I think the complexity of OpenACS and CCM has been a double edge sword.  Its good for technical people but it kept it away from wide spread acceptance.

Andrew,

Like you I don't know the answer.  I posted the question here since what I have stated I am not capable to implement or validate the idea.  I was hoping some CCM or Java expert will give a good opinion about it.

For a newbie opinion I think Beanshell is better for CCM.  Tcl Blend or DanW's nsjava is good for OpenACS.  Jacl I don't know.  But based from Beanshell's intro it seem to be inspired by Tcl Blend and Jacl.  But Beanshell is not Tcl specific but it was inpired by Tcl.  I even read somewhere that BeanShell support Tcl syntax.  Not sure though.

All,

I hope CCM gets a mailing list or something.  Its not expected the Red Hat people go to the mailing list but atleast there is a common place for CCM discussion.  Or maybe the senior members of this community to be kind enough to put a CCM category or forum.

Collapse
Posted by Richard Li on
As far as CCM goes, the @author tags are only a partial measure of who contributed to CCM because:
  1. Typically, the @author tag is only used by the initial creator of the file, even if the file is only just a stub. Most of us don't bother to update or add to the @author tag as we add code.
  2. There are a lot of steps in software development other than implementation: requirements, design, testing, and so forth. Contributors to those steps are generally not reflected in the @author tag. Virtually all of the systems have been designed by teams of people and implementation handed off to a member of the design team.
So, don't worry if you see just a few names in the @author tags and you don't recognize a lot of the current names. Rafael, for instance, conceived and designed the entire ACS 4 object and permissions systems, the CCM persistence layer, among other things. Jim is our resident XSLT guru and was a key member of the initial presentation team. Archit and I wrote the ACS 4 security subsystem, tuned the request processor with Rafael, and helped design the presentation system, login system, and other parts of CCM. I won't bore you by giving the biographies of every individual in engineering, but all of us have been working on the web development problems for several years now.

Peter and Jun bring up an interesting point about complexity. There is general agreement (and I agree) that CCM is substantially more complex than its predecessors. This complexity is an issue we struggle with every day: how to build a powerful system without presenting a lot of that complexity to the user/developer. IIRC, when we released ACS 4, with a unified object/permissions system, a lot of people had issues with the complexity of ACS 4 as well as the lack of feature breadth (where are all the ACS 3 modules was a common question). We haven't been very good about hiding complexity in the past, but we're working on trying to make things easier to use, and hopefully we will be able to work together with the community.

Regarding community, I hear you. We're going to work as hard as we can to launch ccm.redhat.com this week in beta for everyone. If it looks like we're not going to be able to launch a Beta this week, then I'll set up a mailing list.

On an unrelated note, PG hackers might be interested that we've uncovered a number of unorthodox behaviors in PG that have been fixed on the tip of the PG CVS tree (mostly related to warning messages and inconsistencies between the published API and implementation). We've also been talking to the RHDB team about CONNECT BY (we're encouraging them to implement something like DB2's recursive queries, but the end result is that we're hoping that by 7.3 PG will have a solution for tree queries).

Collapse
Posted by Jonathan Ellis on
Can't access pinds.com.  archive.org only has up to 9-26-01, and even then doesn't appear to have crawled the bboard. :/
Collapse
Posted by Don Baccus on
We've also been talking to the RHDB team about CONNECT BY (we're encouraging them to implement something like DB2's recursive queries, but the end result is that we're hoping that by 7.3 PG will have a solution for tree queries)
The tree sortkey approach we've taken is a lot more flexible than Oracle's CONNECT BY and appears to be roughly comparable in performance. There is a cost in storage, but our BIT VARYING implementation is quite economical.

In fact Open Force likes this approach so much that they've begun using it rather than CONNECT BY in Oracle, using the RAW datatype to hold the hierarchical keys.

While I don't forsee us abandoning CONNECT BY queries in the near future due to the large number of queries involved and the tediousness of generating upgrade scripts, if we were to do so we could get rid of parent ids altogether and just use the tree sortkeys to generate parents (one nice thing is that you can generate the full set of parent keys rather than just the immediate parent without selecting against any db table).

If I were designing from scratch, I'm about 90% convinced that I'd use the tree sortkey approach in both PG and Oracle.

PG 7.3 will be in beta in five days so I doubt CONNECT BY will be implemented. There is a contrib extension that implements tree operators which was developed after we did our tree sortkey implementation, but frankly I don't see that it gives us anything that we don't already have in our implementation using the standard PG BIT VARYING type.

Collapse
Posted by Roberto Mello on
We really need someone to document our tree sortkey approach. New developers need to understand how it works if they are to use it, and currently our "documentation" consists of pointing them to a bboard thread that talks about other things besides the approach we're using, plus it doesn't describe well how it's supposed to be used.

Would someone with experience with this volunteer to document it please? Don and Dan are th natural candidates, but I'm sure several folks in OpenForce, Musea, Flurfly, etc. are familiar with it and could do a good service to the community by documenting it.

Collapse
Posted by Jun Yamog on
Hi Richard,

Thanks very much for the informative post.  We really need some bits and pieces of information.  I am glad CCM is still in good hands.  I am sorry if I am really pushing hard for the mailing list thanks for hearing our concerns.

Thanks for posting and participating, I very much appreciate it and I think others too.

All,

Yeap I think tree_sortkey is much much better than connect by.  It does takes some getting used to, even right now I can't still do a tree_sortkey query on the first try.  But I sure love it and use it as much as I can.

Collapse
Posted by Nick Ager on

I've developed sites using both ACS 4.x classic and CCM and agree with most of the comments so far namely:

* I found the CCM learning curve steeper than ACS/tcl.

* I find ACS/tcl supports a more iterative style of development which is probably more productive.

* The persistence layer is excellent and does a good job of persisting java objects into relational tables eg it maps object -> party -> user -> mysiteuser from a java hierarchy into a set of related tables, writing the queries for you.

* Bebop supports a new model of web page development over the traditional page flow web programming (list -> new entry form -> confirm -> list). Bebop's model is particularly suited to building complex multistate interfaces.

* Bebop supports development of powerful reuseable components (eg the calendar package). Unfortunately I found that standard components, such as List and Table, difficult to use and the result didn't seem to justify the effort expended on using them. I found other components such as the tabbed view were simpler to use and the result was more impressive. (I think more work is needed raising bebop's "bang for your buck")

* Using CCM doesn't force you to use bebop. Sometimes I use the persistance layer with vanilla JSP, but mostly I mix JSP with bebop.

* One major problem I have which limits my productivity is the need for frequent server restarts while developing. I believe this can be alleviated by using Resin rather than Tomcat.

* Java IDEs such as eclipse are great for browsing and understanding the API.

* A concrete example of the utility of the JDK is the support the java provided (java.util.DateFormat) for localising the calendar. The calendar makes uses of the user's browser language preference.

I'm looking forward to the resumption of the CCM community and the release of CCM for postgres and hope that the two communities can be complementary.

Collapse
Posted by Andrew Grumet on
* One major problem I have which limits my productivity is the need for frequent server restarts while developing. I believe this can be alleviated by using Resin rather than Tomcat.
Yes, it can. You do this by setting the <class-update-interval> element in resin.conf.
Collapse
Posted by Michael Bryzek on
I'm not sure I follow how the class update interval actually helps
address the server restart problem. In my experience, I have been
unable to dynamically reload only modified UI classes. If I modify a
class and deploy it to my webapp, my servlet container will see the
modified file and will dynamically reload the webapp. This ends up
running the ACS initializer again which reloads all the PDL code among
other things. In the end, it may be 30 seconds or longer before I see
my change.

Has somebody already found a solution here? We experimented briefly
with a custom classloader that would be smart enough to throw away
references only to ui classes, but we did not invest too much time
here.

One other thought about the CCM - The initializer concept itself has a
few major problems:

  * The concepts of initialize, install, and upgrade are all muddled
    together. This means each time you start ccm it has to check if every
    component needs to be installed/initialized/etc. We build lots of
    stuff that needs no custom initialization once installed.

  * There is no support for upgrading.

  * The initializer file itself is written in a custom format which
    does not provide a clear advantage over xml. Why don't we just use
    xml for configuration files of this sort?

I remember the initializers being a short term solution until a
package manager could be integrated or built. Any update here?

Collapse
Posted by Jun Yamog on
I don't think I have a 100% work around on the no server restart issue.  I used jdk 1.4 ability to do hotswap.  Sometimes works... sometimes not.  I think it depends on how dramatically you changed the code.  If that does not work I use resin class reload.  Still not 100% perfect.

The good solution is to have a scripting languange for CCM.  Like tcl or beanshell.  Nope JSP won't do since some stuff are not really jsp besides.  Jsp is still uses java which is not good at iterative coding.

Collapse
Posted by Andrew Grumet on
I'm not sure I follow how the class update interval actually helps address the server restart problem. In my experience, I have been unable to dynamically reload only modified UI classes.
Whoops, you caught me. I had only tried a few simple cases and thought this worked generally. I guess not.
Collapse
Posted by Richard Li on
Our DBAs are hosed right now, so ccm.redhat.com won't be up this week. In the interim, I've set up a mailing list for CCM discussion. You can subscribe by going to: https://listman.redhat.com/mailman/listinfo/redhat-ccm-list or sending email to redhat-ccm-list-request@redhat.com (with "help" in the subject or body). I'm disappointed by that we won't have ccm.redhat.com up this week and we're not eating our own dogfood, but I'm optimistic that we can do this soon.

Re: Mike's comments, good points. As part of the revamping of dispatcher, we're looking at deploying each application as its own webapp, which would enable dynamic class reloading without rerunning all the initializers. We are working on a data model initializer that versions the data model and will generate the necessary upgrade scripts for your DBA to run. The enterprise.init as an XML file is a bit further out, just because changing the formats doesn't seem to be a huge win in terms of functionality (although it is the right thing to do). There's a lot of other stuff we want to clean up first.

Collapse
Posted by Jun Yamog on
Hi Richard,

Thank you very much.