November 8, 2011

Collaborative modeling @ EclipseCon Europe 2011

Last week I presented with Martin and Benjamin why collaboration in modeling becomes an important concern, the issues we currently encounter, and the eclipse technologies which are improving to provide seamless collaboration.

In the last five years models usage generalizes, modeling tools matured a lot, but often they have not be designed to allow one to work efficiently in team.

On the same time, collaboration, in a general manner, took a predominant place in tools and medias. Successes of Wikipedia and the Huffington Post show that trend.

Modeling or not, working with others is a challenge. Which separation of work ? Which rules to set up to keep the coherence ? How to deal with the different concerns people may have ? Answers are often most organizational than technical, however tools, technologies may constraint your organization and you way to work in collaboration.

Model together is first dealing with a large amount of information and depending of your manner to represent them it could become quite tricky.

For graphical representations, beyond layout problems, from a certain number of elements, we are not able to focus on the useful information, the signal noise ratio becomes to low.
 Even without representation scalability remains an issue, as by default EMF load the entire model in memory. 
 How many times are we not able to understand legacy code or models done by others ?

It is necessary to document your models and explains your choice behind design decision, but it is as important to keep documentation synchronized across the changes and refactorings you made.
To collaborate means dealing with concurrent accesses, and often end users do not want to have to compare or to merge. Starting from that requirement you quite easily ends up with some kind of pessimistic strategy.
 The most simple implementation of this strategy is an instant messaging discussion. As long as your model is not changing too often its bearable.  Sophisticated versions of that implementation are directly integrated in an SCM supporting file locking, but that remains a not very elegant solution.

From that you'll try to avoid blocking the whole team and then you'll split your model into many files. It's slightly better but it's not that easy to do, as you have to carefully design your Ecore model avoiding most of the cross references.

More over EMF fragments are not correctly supported by many tools.
The other strategy, called the optimistic one, is to allow conflict happens and to deal with them when they occur. It looks like a dice game, and depending on the frequency, it could become hard to deal with conflicts.
Those problems could be tackled with several technologies which enable one to work more naturally in collaboration. 
How to deal with large diagrams ?

Thanks to EMF Mylyn bridge we are able to focus in the diagram on the information which matters, the information contextual to a change you have to do or that somebody else did.
How keeping documentation and model synchronized ?

Thanks to Mylyn Intent we could mix natural and formal language. This is some kind of literate programming adapted to modeling with one specificity : you can update the model, or the doc, it doesn't matter, the tool help you keeping them synchronized anyway
How to support better models fragmentation ?

Model tools could be behaving like the tools we are used to when programming. They should not  make the assumption that every referenced element will always be there. This is possible by playing nicely with the EMF proxy mechanism.

Keeping models coherent with fragmentation could be ensured through platform logical models. That API enables components to trigger changes on any file operation.

How to avoid models splitting ?

CDO is an impressive technology which have been around in Eclipse for a few years now. It keeps getting better and provides, as a model repository, every service you might dream of. Using it, one is able to build a solution based on pessimistic locking at the model element level, with live updates when you are connected.
If you are more interested by the optimistic strategy, CDO offers the possibility to provide conflict resolver, to solve conflicts in the more automatic way, when they happend.

CDO does not enable only efficient collaborative strategies, it solves the scalabilty issue, by loading only necessary model elements and unloading them automatically. 
I would like to share with you what is happening on a broader scale. Those technologies are only a start in collaborative modeling, and there are many ways to get inspiration about collaboration, github or google docs for instance.

Of course a large part of this talk was reserved for demos of the improvements in Mylyn, EMF Compare, EGit, and Dawn, but I have currently no video of them to share.

No comments:

Post a Comment