Bug 543858 - Reduce the number of adapters/listeners
Summary: Reduce the number of adapters/listeners
Status: NEW
Alias: None
Product: Sirius
Classification: Modeling
Component: Core (show other bugs)
Version: 6.0.0   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2019-01-26 11:00 EST by Pierre-Charles David CLA
Modified: 2019-01-28 09:47 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pierre-Charles David CLA 2019-01-26 11:00:57 EST
Because the frameworks we rely on (EMF and EMF Tx in particular) support it, we have had a tendency to solve a lot of individual issues by just adding a new adapter/listener. This has several drawbacks:
* each adapter has (or can have) a slightly different scope and lifecyle that must be managed individually;
* some adapters depend on others ones to be present, and sometimes even to be activated before them (typical case: an adapter/listener which needs up-to-date inverse cross-references to do its job, but maintaining these is done by another adapter, which must be present and executed first);
* the global system behavior is almost impossible to completely understand and reason about, as it depends on so many parts which have no clear relations to each other in the code;
* some listeners (in particulier pre/post-commit listener) have to perform sometimes complex and costly analyses of the changed which occurred inside a transaction. Because the listeners do not know about each other they all have to redo some common parts of the analysis that can not be shared.

This concerns both EMF Adapters and EMF Transaction ResourceSetListeners, used as pre or post-commit listeners, and our own ModelChangeTrigger (built on top of ResourceSetListeners).