I've been quiet for a while, mostly because of the mega refactoring that CDO is currently undergoing. Did you know that until now a CDO server did not have any dependencies on EMF? The following diagram summarizes what had been the status quo in this context for over two years:
As you can see, all EMF concepts had been converted to CDO concepts directly under the visible surface. It turned out that this approach had several drawbacks:
- No generated EOperation logic on the server
- No generated EDataType serialization
- No EMF tools on the server (Compare, OCL, ...)
- Backend integrators can not use EObject
- Server extenders can not use EModelElement
So we decided to eliminate these restrictions by applying a two-step refactoring. The first step was to abandon CDOPackage completely and replace it with EPackage everywhere. This included replacements of CDOClass, CDOAttrbute and CDOReference as well. And CDOPackageManager was replaced by a new, very sophisticated version of CDOPackageRegistry. After one month of refactoring and testing the new status quo looks as follows:
In fact this was the biggest and most impacting refactoring since the complete re-write of version 0.7. Here are some numbers:
- 69378 changed lines of code
- 1736 changed files
- 2.8 MB patch file size
- 13% performance increase
The deployment of the new design will require re-creation of the backends, i.e. export data, re-create database, import data! Most clients will not be affected if they are properly coded against EMF APIs. The HibernateStore will be excluded from the builds for some time and then re-appear as a separate download to compensate p2 issues with missing, non-EPL dependencies.
Kudos go to Simon, who took over when I fell asleep, to Vik, who adjusted the UI and to Martin, who will adjust the HibernateStore. And apologies for the maintenance congestion that was caused by a locked HEAD.
After the merge to HEAD we'll be able to face the second step of the refactoring and make CDO-controlled EObjects available on the server:
This will open the door to some exciting new functionality on the server like:
- Commit validation based on OCL
- Common query based on OCL
- Annotation-driven model mappings
- Easier embedding into clients
Don't forget to block an hour for my
CDO talk at the EclipseCon!