Mixin Replacement
This is the Blueprint to remove the Mixins from OpenQuake.
Blueprint information
- Status:
- Complete
- Approver:
- Lars Butler
- Priority:
- High
- Drafter:
- John Tarter
- Direction:
- Approved
- Assignee:
- Lars Butler
- Definition:
- Approved
- Series goal:
- None
- Implementation:
- Implemented
- Milestone target:
- 0.5.0
- Started by
- John Tarter
- Completed by
- Lars Butler
Related branches
Related bugs
Sprints
Whiteboard
Notes from Lars Butler:
I quickly threw together some drawings of the current mixin architecture [1] and a possible replacement [2]. The main selling points of this replacement are: separate concepts of 'Job' and 'Calculation', no magic, reduced clutter in the codebase, easy to understand.
In separating the concepts of 'Job' and 'Calculation', I think it would appropriate to make the same separation in the OQ database. uiapi.oq_job should contain job configurations; we could create uiapi.oq_
Also, we could remove the current openquake.job.Job class and replace this with uses of the Django model classes.
We will need to implement a new concept of the 'Engine', which parses the input files and constructs OqJob, OqCalculation, and Calculator objects. The 'Engine' is basically the glue code.
[1] - https:/
[2] - https:/
John T - I have raised this priority as we have implemented many new features over the past few months and our technical debt is growing significantly. My suggestion is that we takle this piece of work before the end of 2011. As noted by Lars separating out the Job configuration and actual calculation would be a wise steps toward system stability and ease of maintenance. I also suggest that unanimously the Development team would agree this would be a step forwards in the quality and stability of our code base.