Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » VIATRA » Persistence of internal state
Persistence of internal state [message #1759504] Wed, 12 April 2017 12:13 Go to next message
Lars Fritsche is currently offline Lars FritscheFriend
Messages: 10
Registered: April 2017
Junior Member
Hi,

just wanted to ask if there exists the functionality to persist the internal state of VIATRA?
Example: my model becomes big and/or I have quite a lot of patterns but then I restart and have to collect all matches from anew.

Can I circumvent this somehow?

Regards,
Lars
Re: Persistence of internal state [message #1759512 is a reply to message #1759504] Wed, 12 April 2017 04:54 Go to previous messageGo to next message
Zoltan Ujhelyi is currently offline Zoltan UjhelyiFriend
Messages: 392
Registered: July 2015
Senior Member
Hi Lars,

thanks for your interest in VIATRA. Sadly, persisting the internal state of VIATRA is not available, although we are thinking about how to support such cases.

The main reason for this is the complexity of the task: we have to make sure that after the restart the models are opened the same way (that is non-trivial by itself, e.g. some models require specific services being registered), and then both the serialization/deserialization and the in-memory model access should have high performance (Interestingly, we have seen cases where it is much cheaper to reconstruct the models then deserialize it).

If the initialization of the internals is too slow (but the model loading is still fast enough), it might be worthwhile to check which patterns are causing such issues. The documentation pages [1] and [2] provide some related ideas. However, if model loading is already slow, then sadly I cannot suggest anything actionable here, as VIATRA expects the model to be available in-memory, and it is traversed to initialize indexes.

Best regards,
Zoltán

[1] https://wiki.eclipse.org/VIATRA/Query/FAQ#Optimizing_queries_and_transformations
[2] https://wiki.eclipse.org/VIATRA/Query/UserDocumentation/SDK/QueryHotspotTesting
Re: Persistence of internal state [message #1759570 is a reply to message #1759512] Thu, 13 April 2017 09:20 Go to previous message
Lars Fritsche is currently offline Lars FritscheFriend
Messages: 10
Registered: April 2017
Junior Member
Hi Zoltán,

thanks for the answer.
I was afraid you'd say that Smile
I guess I have some space for optimization but in general my patterns should comply with the performance tips.

I just thought about a use case where you may want to transform a Java project to another programming language (using a tool like MoDisco).
In case that I'd build a tool for that purpose it would mean that the user might never want to shut down his system to keep all matches in memory as these models quickly become quite huge.

Regards,
Lars
Previous Topic:Self-reference in viatra
Next Topic:VIATRA - Query Generic API
Goto Forum:
  


Current Time: Wed Apr 24 23:03:00 GMT 2024

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

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

Back to the top