Difference between revisions of "DB layer 2.0 implementation plan"

From MoodleDocs
 
m (Extra milestone1 - delegated transactions)
 
(16 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Work in progress}}
+
{{Template:Development:dmllib 2.0}}{{Moodle_2.0}}__NOTOC__This page contains information related to the process of development of the new xmldb/ddl/dml stuff coming with Moodle 2.0. It describes how the process has been split into some well identified milestones, and includes the summary of all the meetings and discussions about the new Moodle 2.0 DB layer.
{{Development:dmllib 2.0}}
 
  
DRAFT-DRAFT-DRAFT
+
For a complete list of tasks related with this development you can go to MDL-14679 (everything is there). Also, don't forget to visit the [[dmllib 2.0 problems|problems page]] if you are curious about the main stoppers we have found in the project.
  
done:
+
Last, and not less important, the due date for all this stuff is '''June 24th 2008'''. Just in time to continue with all the rest of amazing features coming with [[Roadmap|next Moodle 2.0 release]].
# import latest adodb for PHP5
 
  
in patch MDL-14679:
+
== Milestones ==
# implement basic API as abstract moodle_database class and moodle_recordset interface
 
# tweak lib/setup.php and related files - place all $DB setup code into one function setup_DB()
 
# keep old global $db until everything is converted to new global $DB
 
# all dmllib functions that do not accept $sql or $select can be rewritten to use new $DB - move those classes to lib/dmllib_deprecated.php for now - this allows us to run moodle in hybrid mode for testing purposes
 
# move all unused dmllib functions to lib/dmllib_removed.php and remove body - this could be useful during the migration phase of contrib (make them to act as wrappers over new dmllib and emit debugging messages!)
 
# implement basic mysql and postgresql classes
 
  
todo:
+
=== M1: initial commit (due date: May 15th) - HEAD ===
# test, refactor, rewrite, improve, etc. the new dmllib classes
+
:1. API should be stable, tested during conversion of several parts or moodle
# implement classes for all supported backends - oracle, mssql
+
:2. $db-> references are gone
# majority of code can be converted to new classes while keeping magic quotes on (we are dealing with numbers mostly), the formslib can already return unslashed data and we can add new parameter to data_submitted() too
+
:3. direct adodb function calls should be all gone (except auth and enrol)
# kill the magic quotes and convert the rest
+
:4. some functions from dmllib are deprecated/removed
 +
:5. old ddllib function are not used at all now
 +
:6. XMLDB editor should fully work now
 +
:7. BC compatible 100%
  
We could also prepare an experimental mysql pdo driver in parallel - this could help to uncover potential problems in API design or implementation.
+
=== M2: 4 DBs passing all tests (due date: May 27th) - HEAD ===
 +
 
 +
:1. mssql and ora related work
 +
:2. use of adodb in enrol and auth plugins
 +
:3. functional unit tests (own-db and multi-db)
 +
:4. logging/profiling/exceptions
 +
:5. xmldb public API refactoring
 +
:6. install
 +
:7. BC compatible 100%
 +
:8. In general everything titled as [http://tracker.moodle.org/browse/MDL-14679 "M2" in the Bug Tracker].
 +
 
 +
=== M3: core stuff, pre magic_quotes off tasks (due date: June 24th) - HEAD ===
 +
 
 +
:1. Needs to be detailed in [[dmllib 2.0 migration docs|dmllib 2.0 migration docs]].
 +
:2. Tasks between May28th and June 11th
 +
:3. API should be available in the [http://phpdocs.moodle.org phpdocs site]
 +
:4. BC compatible 100%
 +
:5. In general everything titled as [http://tracker.moodle.org/browse/MDL-14679 "M3" in the Bug Tracker].
 +
 
 +
=== M4: big hacking, post magic_quotes off tasks (due date: June 24th) - In parallel with M3 - (HEAD, BRANCH, PATCH??) ===
 +
 
 +
:1. BREAKAGE with old code.
 +
:2. Documentation finished (Docs (examples, architecture, migration guide...), PHP Docs).
 +
:3. In general everything titled as [http://tracker.moodle.org/browse/MDL-14679 "M4" in the Bug Tracker].
 +
 
 +
=== M5: Moodle tests using real & mockup dmllib (starting on May 27th...) - In parallel and after M3 and M4 - HEAD ===
 +
 
 +
:1. Needs good documentation for developers
 +
:2. Will be huge but useful
 +
:3. Always try to be able to run tests from cli script (apart from UI) to be able to execute them daily and report status in some URL (html output).
 +
 
 +
=== ME1: Discuss/decide/implement/test logically nested (delegated) transactions ===
 +
 
 +
See these for more info:
 +
 
 +
# [http://moodle.org/mod/forum/discuss.php?d=135847 moodle.org initial discussion].
 +
# MDL-20625 - Bug in the Tracker with different alternatives and agreement process.
 +
# [[DB layer 2.0 delegated transactions|DB layer 2.0 delegated transactions]] article in Moodle Docs, where final implementation is detailed.
 +
 
 +
== Meetings ==
 +
 
 +
* [http://docs.google.com/Doc?id=dgzf39jp_1gkks3pd3 MDM-20080501 Dmllib 2.0] - Penny, Petr and Eloy.
 +
* [http://docs.google.com/Doc?id=dgzf39jp_5fv3j3jd7 MDM-20080508 Dmllib 2.0] - Penny, Petr, Nicolas and Eloy.
 +
* [http://docs.google.com/Doc?id=dgzf39jp_7tmcr5jc5 MDM-20080513 Dmllib 2.0] - Penny, Petr, Nicolas and Eloy.
 +
* [http://docs.google.com/Doc?id=dgzf39jp_11fdj3jhg8 MDM-20080515 Dmllib 2.0] - Penny, Petr, Nicolas, Martin and Eloy.
 +
* [http://docs.google.com/Doc?id=dgzf39jp_12hmwjmzfq MDM-20080522 Dmllib 2.0] - Penny, Petr, Nicolas, Martin and Eloy.
 +
* MDM-20080526 Dmllib 2.0 - Penny, Petr, Nicolas, Martin and Eloy.

Latest revision as of 15:28, 4 November 2009

Moodle 2.0

This page contains information related to the process of development of the new xmldb/ddl/dml stuff coming with Moodle 2.0. It describes how the process has been split into some well identified milestones, and includes the summary of all the meetings and discussions about the new Moodle 2.0 DB layer.

For a complete list of tasks related with this development you can go to MDL-14679 (everything is there). Also, don't forget to visit the problems page if you are curious about the main stoppers we have found in the project.

Last, and not less important, the due date for all this stuff is June 24th 2008. Just in time to continue with all the rest of amazing features coming with next Moodle 2.0 release.

Milestones

M1: initial commit (due date: May 15th) - HEAD

1. API should be stable, tested during conversion of several parts or moodle
2. $db-> references are gone
3. direct adodb function calls should be all gone (except auth and enrol)
4. some functions from dmllib are deprecated/removed
5. old ddllib function are not used at all now
6. XMLDB editor should fully work now
7. BC compatible 100%

M2: 4 DBs passing all tests (due date: May 27th) - HEAD

1. mssql and ora related work
2. use of adodb in enrol and auth plugins
3. functional unit tests (own-db and multi-db)
4. logging/profiling/exceptions
5. xmldb public API refactoring
6. install
7. BC compatible 100%
8. In general everything titled as "M2" in the Bug Tracker.

M3: core stuff, pre magic_quotes off tasks (due date: June 24th) - HEAD

1. Needs to be detailed in dmllib 2.0 migration docs.
2. Tasks between May28th and June 11th
3. API should be available in the phpdocs site
4. BC compatible 100%
5. In general everything titled as "M3" in the Bug Tracker.

M4: big hacking, post magic_quotes off tasks (due date: June 24th) - In parallel with M3 - (HEAD, BRANCH, PATCH??)

1. BREAKAGE with old code.
2. Documentation finished (Docs (examples, architecture, migration guide...), PHP Docs).
3. In general everything titled as "M4" in the Bug Tracker.

M5: Moodle tests using real & mockup dmllib (starting on May 27th...) - In parallel and after M3 and M4 - HEAD

1. Needs good documentation for developers
2. Will be huge but useful
3. Always try to be able to run tests from cli script (apart from UI) to be able to execute them daily and report status in some URL (html output).

ME1: Discuss/decide/implement/test logically nested (delegated) transactions

See these for more info:

  1. moodle.org initial discussion.
  2. MDL-20625 - Bug in the Tracker with different alternatives and agreement process.
  3. DB layer 2.0 delegated transactions article in Moodle Docs, where final implementation is detailed.

Meetings