Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Slim Model Instance Backup
Slim Model Instance Backup [message #900567] Tue, 07 August 2012 14:48 Go to next message
Hauke Fuhrmann is currently offline Hauke Fuhrmann
Messages: 324
Registered: July 2009
Senior Member
Hi there,

I want to work with EMF model instances in memory mainly, i.e. I don't
need files to load the model from; I get most data from external messages.

Only in case the computer or JVM crashes, I need to restore the EMF
model where it was left before the crash.
Hence, I need a slim mechanism to synchronize all changes of the model
into a persistency solution (file, database...) which I can read in
again when starting up the application.

An EMF-framework to databases seems to be overkill, isn't it?
However, the plain XML persistency seems to be not very performant if
you save the ressource with every little change of the model.

Something like storing only the small deltas of the model would be good,
which would have very good write performance (done very often) and only
bad/medium read performance (done quite seldom).

Is there any suggestion/best practice?

Cheers,
Hauke
Re: Slim Model Instance Backup [message #900666 is a reply to message #900567] Wed, 08 August 2012 06:13 Go to previous message
Ed Merks is currently offline Ed Merks
Messages: 26152
Registered: July 2009
Senior Member
Hauke,

Comments below.

On 07/08/2012 4:48 PM, Hauke Fuhrmann wrote:
> Hi there,
>
> I want to work with EMF model instances in memory mainly, i.e. I don't
> need files to load the model from; I get most data from external
> messages.
>
> Only in case the computer or JVM crashes, I need to restore the EMF
> model where it was left before the crash.
> Hence, I need a slim mechanism to synchronize all changes of the model
> into a persistency solution (file, database...) which I can read in
> again when starting up the application.
>
> An EMF-framework to databases seems to be overkill, isn't it?
> However, the plain XML persistency seems to be not very performant if
> you save the ressource with every little change of the model.
BinaryResourceImpl produces a very compact representation that's
generally an order of magnitude faster to read and write.
>
> Something like storing only the small deltas of the model would be
> good, which would have very good write performance (done very often)
> and only bad/medium read performance (done quite seldom).
A ChangeRecorder which is able to produce a ChangeDescription which can
be serialized could serve that purpose. Perhaps looking at the JUnit
tests for that will give you the idea how to use it.
>
> Is there any suggestion/best practice?
>
> Cheers,
> Hauke
Previous Topic:How to create Bookmark in skeleton JET
Next Topic:[CDO 4.1]Security Manager Problem
Goto Forum:
  


Current Time: Fri Oct 31 09:58:01 GMT 2014

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

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