Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [EMF] [CDO] Versioned Resources in EMF([EMF] [CDO] Versioned Resources in EMF)
[EMF] [CDO] Versioned Resources in EMF [message #1769018] Tue, 25 July 2017 17:28 Go to next message
Neil Mackenzie is currently offline Neil MackenzieFriend
Messages: 131
Registered: December 2013
Senior Member
Hello,
I was wondering if anyone has ever done work on 'versioned resources' in EMF.
The idea being that a linked (i.e. loaded) EMF resource has a version in the same way that an OSGI bundle has a version. Similarly, a resource could have a 'Manifest.MF' describing its version and which version of a resource it links to (i.e. loads).
This would allow EMF resources which refer to each other to evolve at a different pace (much like OSGI bundles can)
It would be useful for a project I am working on, so I might look at creating it.
It requires the concepts of versioning and Identity which might mean that ideas that exist in CDO could be useful.
Regards,
Neil
Re: [EMF] [CDO] Versioned Resources in EMF [message #1769039 is a reply to message #1769018] Wed, 26 July 2017 05:12 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

UML Profiles, once expressed in EMF, have versions with the result that UML models have a growing list of EAnnotations that bloat the model with confusing derived stale content. A really bad design IMHO; the UML file should be UML. A generated Ecore should be Ecore.

Papyrus tries to make versioning practical by extending Profile versions. IMHO a really bad design cannot be made good.

The MOFFOL and MOFVD specifications handle LIfecycles and Versions. I am not aware that they contribute more than good thoughts.

I strongly recommend that you look towards a CM tool such as GIT and branches to manage multiple versions.

Regards

Ed Willink

Re: [EMF] [CDO] Versioned Resources in EMF [message #1769045 is a reply to message #1769018] Wed, 26 July 2017 05:21 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Certainly clients maintain resources in repositories and in that sense, the resources exist as different versions in the repository. So EMF Compare, for example, can load resources as they exist in the workspace and compare them to the corresponding resources as they exist in some historical state in a Git repository. In this case, that's accomplished by specialized URI converters that redirect the loading of URIs to use what's in the workspace or to use the bytes loaded from the repository provider. But that sounds different from what you have in mind, though what exactly you have in mind isn't all that clear. I imagine information about versions could be represented in the URIs themselves...

Ed Merks
Professional Support: https://www.macromodeling.com/
Re: [EMF] [CDO] Versioned Resources in EMF [message #1769081 is a reply to message #1769045] Wed, 26 July 2017 10:34 Go to previous messageGo to next message
Neil Mackenzie is currently offline Neil MackenzieFriend
Messages: 131
Registered: December 2013
Senior Member
index.php/fa/30141/0/
Thanks for the advice, I have attached an example screenshot which I hope will give a clearer description of what I a trying to achieve using a simple example.

I have an EClass Called Requirement, and an EClass called AllRequirements which contains multiple requirements. A requirement just contains some text.

I have an EClass Called Process, and an EClass called AllProcesses which contains multiple processes. A Processes contains some text and a link to one requirement.

I haven XMI file containing Processes, and an XMI file containing Requirements. The processes in the process xmi file refer to the requirements in the requirements XMI file.

Imagine that the Requirements xmi file is Version1 of the xmi file and the Process xmi file is Version 1 of that xmi file.

Let us say that the 'requirements expert' updates the requirements xmi file to add /amend/delete some requirements and then saves this amended requirements file as requirments xmi version 2.
I would like the process xmi file to not be affected and still refer to requirements file v1. The 'process expert' can later do the work to update the process xmi file to use version 2 of the requirements xmi file if he wishes.

This can perhaps be done with storing multiple versions in git. However I would like to add some nice features to make it easy to use. e.g. manifests files describing exactly which version a resource is and which verion of resources it refers to. Also I would like the ability to ask the question 'what items in version 1 of the processes file will be affected if we link to version 2 of the Requirements file instead of version 1' and how will they be affected (e.g a process will refer to a deleted requirement, or refer to an amended requirement).

I hope this is a bit clearer. I think such features available in a UI would help in the maintaining of a certain kind of model instance where there are dependancies are similar to those found on modular programming.

[Updated on: Wed, 26 July 2017 10:35]

Report message to a moderator

Re: [EMF] [CDO] Versioned Resources in EMF [message #1769083 is a reply to message #1769081] Wed, 26 July 2017 11:18 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

All good things to want to do, but remarkably difficult in practice. Perhaps you can just churn nsURIs, but you will notice that today's http://www.eclipse.org/emf/2002/Ecore differs considerably from what was available in 2002; changed nsURIs ensure you know what is in use at the expense of breaking everything at every opportunity. You might want to look at the Edapt project. Overall, be aware that you are venturing into what is still a research area.

Regards

Ed Willink
Re: [EMF] [CDO] Versioned Resources in EMF [message #1769085 is a reply to message #1769081] Wed, 26 July 2017 11:44 Go to previous messageGo to next message
Neil Mackenzie is currently offline Neil MackenzieFriend
Messages: 131
Registered: December 2013
Senior Member
Thanks for the advice,
I will spend some time trying to find a good solution. First stop some kind of special virtual URI that can be completed with version info from somewhere.
Currently I am thinking that the ecore file would never change but only the contents of model instances, but there might be a special case for that too.
I do like edapts migrations, they might be useful here.
Regards,
Neil
Re: [EMF] [CDO] Versioned Resources in EMF [message #1769109 is a reply to message #1769085] Wed, 26 July 2017 15:07 Go to previous messageGo to next message
Neil Mackenzie is currently offline Neil MackenzieFriend
Messages: 131
Registered: December 2013
Senior Member
Also another way of addressing this problem could be the following:
Every resource has its own git repository.
Each of these git repositories has an xmi file for the resource, and 'Manifest' file which says which versions of the dependant resources are required
(e.g. in the repository for Processes, we might have a 'Manifest' file that says that we require version 2 of the Requirements resource)
When a resource is opened in an empty eclipse workspace a program could be run which will recursively checkout the correct version of each required resource.
I will try and implement this and see if it works.
Re: [EMF] [CDO] Versioned Resources in EMF [message #1769116 is a reply to message #1769109] Wed, 26 July 2017 16:50 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

Why not just have one file per file, and one branch per useful combination. Tags can identify combinations of long term utility. If you want more granularity you can investigate composite EMF resources.

Regards

Ed Willink
Re: [EMF] [CDO] Versioned Resources in EMF [message #1769122 is a reply to message #1769116] Wed, 26 July 2017 20:21 Go to previous message
Neil Mackenzie is currently offline Neil MackenzieFriend
Messages: 131
Registered: December 2013
Senior Member
Thanks for the suggestion, I will try it out.
Neil
Previous Topic:Loading model slowly
Next Topic:[CDO] Standalone Java Client - Help!
Goto Forum:
  


Current Time: Tue Apr 23 13:53:15 GMT 2024

Powered by FUDForum. Page generated in 0.03344 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top