Bug 511890 - Allow the contribution of resource synchronization backends by another plugin
Summary: Allow the contribution of resource synchronization backends by another plugin
Status: NEW
Alias: None
Product: Sirius
Classification: Modeling
Component: Core (show other bugs)
Version: 4.1.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: Next   Edit
Assignee: Project inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2017-02-08 04:26 EST by Cedric Brun CLA
Modified: 2018-09-03 08:49 EDT (History)
2 users (show)

See Also:


Attachments
plugins introducing a 'myprotocol' protocol and the corresponding backend (13.04 KB, application/zip)
2017-02-08 09:55 EST, Cedric Brun CLA
no flags Details
modeling project using the "myprotocol" protocol (1.20 KB, application/zip)
2017-02-08 09:56 EST, Cedric Brun CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Cedric Brun CLA 2017-02-08 04:26:51 EST
In general the Sirius runtime try to avoid assumptions about the serialization format of a model as long as the EMF Core contract is fullfiled. This genericity is often leveraged by users to integrate models and data from other sources (web services, DB's...) through specific URI schemes contributed in EMF and Sirius handle those resources and refers to the objects using this URI scheme.

This capability can also be seen as an “EMF Core compliant” solution to introduce a logical reference to model elements which has to be resolved then to actual physical files. To illustrate this, one could contribute an xtext://some.logical.name.of.Object scheme and use the indexer to find and load the underlying file. This might not be the only solution as EMF also allow to declare URI mappings.

Currently when setting up an environment with a custom URI scheme the user is faced with the current limitation: all the infrastructure which is listening to the workspace change and proceeds to the reload/discard/save changes of the model will ignore this new scheme and he has no way to integrate with this existing infrastructure. 

This ticket is about enabling the contribution of what is currently called in the framework "resource synchronization backends" which are responsible for notifying when a resource has been externally changed or deleted. There is only one backend implementation right now: the WorkspaceBackend which listen for notification from the Eclipse Workspace to notify. 

This change would increase the potential of a seamless integration with other sources of data. We could probably come up with a backend which would handle the file:// URIs and use Java’s filesystem notifications, another potentially useful backend would be one which would handle http:// URIs and by using ETags and regular polling.

Looking at the code everything is already “split and abstracted”, the only missing piece is an extension point so that other plugins can contribute new backends. I’ll give it a shot.
Comment 1 Eclipse Genie CLA 2017-02-08 09:24:28 EST
New Gerrit change created: https://git.eclipse.org/r/90636
Comment 2 Cedric Brun CLA 2017-02-08 09:55:29 EST
Created attachment 266732 [details]
plugins introducing a 'myprotocol' protocol and the corresponding backend
Comment 3 Cedric Brun CLA 2017-02-08 09:56:08 EST
Created attachment 266733 [details]
modeling project using the "myprotocol" protocol
Comment 4 Pierre-Charles David CLA 2017-03-22 06:42:41 EDT
Agreed with the general idea, though I have not yet had time to review the current patch. I'm putting this in 5.0, but this is not a commitment to implement this in this timeframe, it's more as a reminder that I need to evaluate this.
Comment 5 Pierre-Charles David CLA 2017-05-04 11:28:50 EDT
Moving to 5.1.