Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Is there parallel operation in Sirius?(parallel operations in Sirius)
Is there parallel operation in Sirius? [message #1784524] Thu, 29 March 2018 02:01 Go to next message
jingjing wang is currently offline jingjing wangFriend
Messages: 28
Registered: July 2017
Junior Member
Hi,
I want to know some information about parallel operations in Sirius.
1. Are there some parallel oprations in Sirius?
2. If there are, Which operations are in parallel?
3. About parallel operations, how does Obeo thinks about it?

In our scenario, the application is a large scale project, and it will create several thousands of diagrams, so we think about creating these diagrams in parallel in order to improve creating performance. Except creating diagram, there are also other operations, we also want to make it in parallel to improve performance.

So is there anyone can answer my question and give me some relevant advise?
Thank you very much!
Re: Is there parallel operation in Sirius? [message #1784532 is a reply to message #1784524] Thu, 29 March 2018 06:55 Go to previous messageGo to next message
Pierre-Charles David is currently offline Pierre-Charles DavidFriend
Messages: 554
Registered: July 2009
Senior Member
Hi,
We do not currently leverage parallelism or multiple threads, beside the basic pattern of moving long running operations outside of the UI thread using the Eclipse Jobs API. While we agree this would be a nice possibility, EMF itself is not really designed for that, see https://wiki.eclipse.org/EMF/FAQ#Is_EMF_thread-safe.3F. In the context of a given Sirius session (which maps to a ResourceSet in terms of EMF), trying to make changes (for example creating representations) from multiple threads is not supported. It's probably possible to manipulate different sessions in parallel, but because this is not a common use case we can not guarantee that this will work. Of cours if you try and find bugs, please report them and we'll try to fix them.

Can I ask why you feel that you need to create "several thousands of diagrams"? Diagrams (as opposed to the underlying semantic models) are only useful for actual human beings. I don't know what your use case is, but I'd recommend to only create the ones that will be used at the time they are first needed.

Regards,


Pierre-Charles David - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius

[Updated on: Thu, 29 March 2018 06:56]

Report message to a moderator

Re: Is there parallel operation in Sirius? [message #1784553 is a reply to message #1784532] Thu, 29 March 2018 09:59 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 6996
Registered: July 2009
Senior Member
Hi

Basic EMF code can often work on multiple threads, and so, provided you do a warm execution in which all code paths and registries are exercised on a single thread before you start additional threads, it might work.

However it is very common to have some global context and or caches that will be shared across threads. Unless the developers have made diligent attempts to synchronize this access you are almost sure to have a difficult time.

For comparison, in the Pivot-based Eclipse OCL, I have tried to synchronize shared context, but since IMHO such code cannot be produced by human best endeavours, I do not claim that the code is thread safe; just open to research and bug reporting. I will not be claiming thread safety until I have an automated generation of the synchronization code.

For Sirius, the previous answer suggests that synchronization has not been a major design concern. Sirius has too much complexity to see if it might just happen to work for you.

Regards

Ed Willink
Re: Is there parallel operation in Sirius? [message #1784597 is a reply to message #1784532] Fri, 30 March 2018 02:19 Go to previous messageGo to next message
jingjing wang is currently offline jingjing wangFriend
Messages: 28
Registered: July 2017
Junior Member
Hi, Pierre-Charles
Thank you for your explanation. I got some useful information.
About your question, creating "several thousands of diagram" is not a practical requirement in our use test. We just find the problem in one scenario: choose "initialization" property of the diagram in *.Odesign, select the viewpoint in the project. Then it will create all the diagrams in the project, if the it is a large scale model, it will cost a lot time to create the whole diagrams.

[Updated on: Fri, 30 March 2018 02:21]

Report message to a moderator

Re: Is there parallel operation in Sirius? [message #1784598 is a reply to message #1784553] Fri, 30 March 2018 02:30 Go to previous messageGo to next message
jingjing wang is currently offline jingjing wangFriend
Messages: 28
Registered: July 2017
Junior Member
Hi, Ed
Thank you very much.
Sychronize shared context and thread safe are really important and difficult. We will try it, maybe there is a chance.
Re: Is there parallel operation in Sirius? [message #1784719 is a reply to message #1784597] Tue, 03 April 2018 08:18 Go to previous messageGo to next message
Pierre-Charles David is currently offline Pierre-Charles DavidFriend
Messages: 554
Registered: July 2009
Senior Member
jingjing wang wrote on Fri, 30 March 2018 04:19

We just find the problem in one scenario: choose "initialization" property of the diagram in *.Odesign, select the viewpoint in the project. Then it will create all the diagrams in the project, if the it is a large scale model, it will cost a lot time to create the whole diagrams.


Yes, this is a known issue with that particular property. It was introduced a long time ago, when large scale models where not yet in our use cases. The original goal at the time was to automatically create some kind of initial top-level diagram to help end users get started (a kind of "dashboard"). It was not designed to initialize a large number of diagrams, and it's hard to change the way it works now without breaking things.

May I ask why you want the diagrams to be all created initially? If we understand the need better, maybe we could propose alternate mechanisms that do not have these issues.


Pierre-Charles David - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Is there parallel operation in Sirius? [message #1785063 is a reply to message #1784719] Mon, 09 April 2018 02:04 Go to previous message
jingjing wang is currently offline jingjing wangFriend
Messages: 28
Registered: July 2017
Junior Member
Acctually, we don't have the explicit requirement of creating all diagrams intially. Maybe in the future, if we have the specific similar scenario of this requirement, i will update this topic.
Previous Topic:The judgement of DDiagramElementSynchronizer.isSameDescription()
Next Topic:View/Open Diagram in a SWT shell
Goto Forum:
  


Current Time: Wed Jan 27 11:32:19 GMT 2021

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

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

Back to the top