I 've been hacking around in the MyDMS code when I got the thought to lose some "redundant" database configuration. This rang a warning bell (we don't want to be limited as to the where the DMS database would be; it's not necessary that it will be the main Moodle database) because of things that have been said in discussions on this matter.
So I sat down and thought about it. The scenarios I can think of for interoperability between the DMS and Moodle are:
- DMS is ran as a Moodle component, and reads its data from tables in the same Moodle database. This is the simplest case. The database can of course be located on a different server; Moodle provides support for this out of the box.
- DMS is ran as a Moodle component as before, but the database used is not the Moodle database. There are three possibilities:
- The "other" database is part of another Moodle installation; we want to centralize our file repository, so we have "satellite" Moodlesites that depend on it.
- The "other" database is a subset of the database of this installation (for example, when using a more powerful server to host multimedia content, place the DMS tables and BLOBs there).
- The "other" database is a full-fledged MyDMS installation, and we just want to leech its information and make it accessible through Moodle.
- MyDMS runs stand-alone, and reads its data from the DMS database of some Moodle installation (this is scenario 2.3 reversed).
Important notes for the above scenarios:
Scenario 1 is of course the most obvious. We 're in the process of implementing it.
Scenario 2.1 presents some trouble: files can be organized and the access controlled by course, by user, by group etc. What if the "other" Moodlesite differs from ours? What is "our" DMS supposed to do in this case?
Scenario 2.2 does not present many technical difficulties, since we can do as we please with the "other" database. The only problem is that Moodle itself will have to be modified if we are to support this option (the "other" db needs to be kept current, so it must be updated by Moodle when courses/users are created, deleted etc), resulting in a complexity increase just for this. Would that be justified?
Scenario 2.3 presents a whole set of problems we also encounter in scenario 2.1. We aren't allowed to do "as we please" with the other database, so how do we handle permissions, organization etc etc when the "other" MyDMS installation knows nothing about courses, groups, etc? You could argue that in theory, things in the "other" installation will always be kept in conformance to some standards that we can agree on, but that's not possible in practice. We need to provide for erroneous cases anyway, so the standard might as well not exist.
Scenario 3, in order to be implemented, requires that we:
a) keep all tables, even redundant, of the MyDMS schema and painstakingly maintain constant synchronization between them and the normal Moodle tables (this will require changes in the Moodle core and, as any programmer knows, is asking for trouble),
b) be constrained in what we do with group access rights, roles etc by the functionality we can squeeze out of the existing MyDMS schema.
Not a good prospect, overall.
It should be clear by now that all scenarios except 1 are problematic in some way. However, instead of just going ahead and customizing DMS for scenario 1, it's time for me to pop the big questions:
1. Which of the above scenarios do you think that we have to support? How do you propose to support them? The "how" is especially important, though people without technical backgrounds will understandably not be able to answer it. Please document your opinion as best you can.
2. Is there some case I have forgotten or misunderstood? (these scenarios are based on my reading of the older discussions).
I cannot stress how deeply these matters will affect the development of the DMS, so I urge everyone to express their views on this subject. It will be much easier to make a good decision now that to change a dubious decision once it has been made.
Regards,
Jon