Mixin Replacement

Registered by John Tarter

This is the Blueprint to remove the Mixins from OpenQuake.

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_calculation to represent the instance of a calculation run. (This would clarify some of the key concepts required to "re-run jobs". The configuration stays the same; we simply kick of a new calculation.) uiapi.oq_job would contain the job profile (config params, input models, etc.). uiapi.oq_calculation would capture job supervisor info, stats, and runtime information.

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://docs.google.com/a/openquake.org/drawings/d/1fexdkbh3z0xPt5AnrNTGfcxTDPd5d_CXAMmZhfuLzFw/edit?hl=en_US
[2] - https://docs.google.com/a/openquake.org/drawings/d/1wn6XmLzvGEOPB5DaoQb7w78uHjuaLPQ-XcIwlu-DJhE/edit?hl=en_US

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.

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.