Forum .LRN Q&A: few questions about data model and implementation
I saw a few strange things and behaviour, and I would like some explanation about it if you can provide me some (this is about last stable tarball 2.1.1) ?
1) I've seen in the database a few tables with "test" names (aa_test_*) and they are empty. Obviously they were used for some testing 😊 Shouldn't they be removed from a stable release ?
2) I don't understand the data model where you create an object in a table (acs_objects) and then create the same object in another table (portals, portal_pages in what I'm concerned about). What I read (and what teachers taught my girlfriend) is that redundancy is always a bad idea in a database, so as I am not an expert at all in the database world, I was wondering what are the reasons for such a choice ?
3) Yesterday I added one user to my server (running on my laptop just for developping purposes) and when I logged out from the admin account I saw that there were still one member online. As I am the only user, I was wondering this could be ? 😊 Although I ay understand this is not a big gotcha )
4) So I created the user account : first there was an error (because I created a few objects by hand, so that it violates a primary key constraint), but then the user appeared twice in the list of membership to proceed ?
5) So I removed my odd stuff, deleted the 2 users, and added my user. Then I realised that my user (when he is in my opinion a member, as I created him an account) was always redirected to a url with "non-member" in it. Did I do something wrong ?
6) The user creation : When I go to the dotlrn site-wide admin > users, I have 2 fields : search and add a new user. I have not been able to understand what "add a user" did, as the button is "search" and there is a link above to add a new user ? When I enter a name in it, the result is : " The results of your search are:" and nothing below. And no user is created of course ....
Any help would be appreciated ! 😊
-> When I subscribe to a post, I receive on my email account when somebody posts, which is what I want. But Wouldn't it better if I don't receive my own postings ? This is always tricky : I post, I see I have new mail, and then it's me ! 😟
-> This is terrible to be obliged to go to a specific post to answer to this one particularly. I mean, when you read a thread, and press the reply button, you reply to first post of the list. If you want to reply to the 3rd comment, you need to click to the 3 comment, wait for it, and then you can reply to it. It would be better if we can reply directly to a post (most forums do this by adding a reply link to every post, like linuxfr.org forums, or phpbb2 forums). And I spent 2 hours trying to figure out how I could do it (answer to a post) just because the behaviour was unexpected (at least I was not expecting it, but because I've learned with other forums)
Either way, the reply to a specific posting function is enabled when installing forums with threaded interface. It is just disabled on openacs.org.
On #2, there should be little if any redundancy. You're right that the same object is being created in more than one table, but the tables store different data. The acs_objects table stores information that any interesting object in the system should have, whereas tables like portal_pages store data that is very specific to the portal system.
On #3, "online" means that the user loaded a page in the last 10 minutes. The system could in theory purge a user from this list when they log out, but at present I don't think it does.
On #6, yes it's confusing. "Add a user" means adding an OpenACS user to dotlrn. The button is labelled "Search" because if the person is already an OpenACS user, they should be locate-able in the user database. For creating a brand new user, try Create a New User, just above "Search dotLRN users for user:".
Splitting data among tables may be new to you, but it enables a lot of powerful querying (among other things).
You can do things like query for all objects created in the last few days, e.g.
select object_id from acs_objects where sysdate - creation_date < 3;
or query for all the different types of objects in the system
select object_type, count(object_type) from acs_objects group by object_type;
Have fun, and feel free to ask more questions, and to visit the openacs IRC chatroom (irc.freenode.net:6667, #openacs channel).
Thanks for all your answers ! 😊
Do you know if there is one document describing the data model and the reasons it as been designed this way ? (I mean in human readable language, because understanding what it does is not so hard, but understanding why is a bit more difficult)
I'm also thinking about making the dotlrn easier (This is the top priority for Rafael, and I think he's right : when user don't understand, they don't use) : Is there a big reason to keep both the openacs and dotlrn site-wide admin ?
This is really confusing as you don't know (I'm giving the view of the very beginner I am) what does what ... I think if people needs to access a few features from openacs, they should be mapped from the dotlrn admin. For example when I install "just" the dotlrn, why should I need to create an openacs user ? Should I even need to be aware of the full architecture to use the dotlrn ?
Regaring site-wide administation vs. dotlrn administartion:
First, some people use dotlrn alongside other non-dotlrn packages so we need to make sure nothing is lost.
Second, you want to reuse as much as possible between dotlrn and openacs by using reusable pages, includes etc.
Third, dotlrn has some issues where the dotlrn mounted under the main subsite acts like a replacement for site wide admin, and all the other dotlrn instances act like a replacement for acs-subsite. Jeff Davis has added support in OpenACS 5.2 to make it possible for a dotlrn instance (or another other package) to logically replace a subsite, and appear to the site node code as a subsite. So the missing piece is overriding the build in acs-admin site-wide administration pages without losing access to any of the default functionality.
I didn't talk about modifying the way it was mounted, or the features of dotlrn or openacs. I just said it would be easier to start if (this is just a case example) you removed the "OpenACS Site-Wide Administration" link from the dotlrn admin panel. If there are specific features of the OACS admin needed, you could just add a direct link to the very component, so people (newcomers) would still think they are still in dotlrn. If that is possible to link it directly of course ...
I also may understand that people using openacs alone, with dotlrn as just "another" application will fully understand the way OACS works, and they will not argue about whether the user is a dotlrn or OACS user. As I said, I am a very beginner in the dotlrn/OACS/aolserver/TCL technologies and applications.
I am just reporting my point of view as most of you are for so long in the business that you may have forgotten how difficult it is to understand such a big system 😉