Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] MemStore with file-based backend
[CDO] MemStore with file-based backend [message #1461193] Tue, 04 November 2014 09:51 Go to next message
Stephane  Fournier is currently offline Stephane FournierFriend
Messages: 299
Registered: July 2009
Senior Member
Hi,
I would like to know if CDO provides out-of-the-box an equivalent store to the MemStore with a file-based persistence as XML or binary ?

Thanks,
St├ęphane.
Re: [CDO] MemStore with file-based backend [message #1461214 is a reply to message #1461193] Tue, 04 November 2014 10:24 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6433
Registered: July 2009
Senior Member
Am 04.11.2014 um 10:51 schrieb Stephane Fournier:
> Hi,
> I would like to know if CDO provides out-of-the-box an equivalent store to the MemStore with a file-based persistence
> as XML or binary ?
No, it doesn't. Several people (including myself) have tried this but in the end the different locking granularity of
files (i.e. different from single EObjects) makes it not so trivial as it might seem at a first glance.

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Re: [CDO] MemStore with file-based backend [message #1461254 is a reply to message #1461214] Tue, 04 November 2014 11:24 Go to previous messageGo to next message
Erdal Karaca is currently offline Erdal KaracaFriend
Messages: 853
Registered: July 2009
Senior Member
Do you assume that Stephane wants each commit to be persisted to the file or does Stephane want to "dump" the contents (of the repository) of the MEMStore to a file and restore from it after a restart?

Eike Stepper wrote on Tue, 04 November 2014 11:24
Am 04.11.2014 um 10:51 schrieb Stephane Fournier:
> Hi,
> I would like to know if CDO provides out-of-the-box an equivalent store to the MemStore with a file-based persistence
> as XML or binary ?
No, it doesn't. Several people (including myself) have tried this but in the end the different locking granularity of
files (i.e. different from single EObjects) makes it not so trivial as it might seem at a first glance.

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper

Re: [CDO] MemStore with file-based backend [message #1461324 is a reply to message #1461254] Tue, 04 November 2014 12:49 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6433
Registered: July 2009
Senior Member
Am 04.11.2014 um 12:24 schrieb Erdal Karaca:
> Do you assume that Stephane wants each commit to be persisted to the file or does Stephane want to "dump" the contents
> (of the repository) of the MEMStore to a file and restore from it after a restart?
The former, but I may be wrong ;-)

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


>
> Eike Stepper wrote on Tue, 04 November 2014 11:24
>> Am 04.11.2014 um 10:51 schrieb Stephane Fournier:
>> > Hi,
>> > I would like to know if CDO provides out-of-the-box an equivalent store to the MemStore with a file-based
>> persistence > as XML or binary ?
>> No, it doesn't. Several people (including myself) have tried this but in the end the different locking granularity of
>> files (i.e. different from single EObjects) makes it not so trivial as it might seem at a first glance.
>>
>> Cheers
>> /Eike
>>
>> ----
>> http://www.esc-net.de
>> http://thegordian.blogspot.com
>> http://twitter.com/eikestepper
>
>


Re: [CDO] MemStore with file-based backend [message #1463475 is a reply to message #1461324] Thu, 06 November 2014 15:52 Go to previous messageGo to next message
Stephane  Fournier is currently offline Stephane FournierFriend
Messages: 299
Registered: July 2009
Senior Member
Hi,
Indeed, my need was not cristal clear Smile
Hence, my needs are both :
1) make a dump of a MemStore as files (XML content would be perfect as EMF serialisation does,) every XX minutes. I found out CDOCommandProvider that provides an ExportCommand, but I don't know how to call it from CDO views ? Is it possible ? Do you have an example how to use this command ?

2) on commits, dump only the modified resources. Indeed, my model is split in many CDOResources (according to initial XmlResources) to minimize the number of resources to serialize as XML files.
Re: [CDO] MemStore with file-based backend [message #1471429 is a reply to message #1463475] Thu, 13 November 2014 04:31 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6433
Registered: July 2009
Senior Member
Am 06.11.2014 um 16:52 schrieb Stephane Fournier:
> Hi,
> Indeed, my need was not cristal clear :)
> Hence, my needs are both :
> 1) make a dump of a MemStore as files (XML content would be perfect as EMF serialisation does,) every XX minutes. I
> found out CDOCommandProvider that provides an ExportCommand, but I don't know how to call it from CDO views ? Is it
> possible ?
The server-side entry point is org.eclipse.emf.cdo.server.CDOServerExporter.exportRepository(OutputStream). You can see
that it's only called by the CDOCommandProvider, but you could

1) Implement your own client/server protocol (e.g. with Net4j) to trigger a CDOServerExporter from a client.
2) Implement a CDORemoteSessionMessage-based protocol between a client and a server-embedded client to do the same.
3) Use telnet or something to gain access to the server console and use the shipped CDOCommandProvider.

> Do you have an example how to use this command ?
No, but syntax help is displayed on the console.

>
> 2) on commits, dump only the modified resources. Indeed, my model is split in many CDOResources (according to initial
> XmlResources) to minimize the number of resources to serialize as XML files.
This could be comparingly simple if you make use of the newer IRepository.Props.SERIALIZE_COMMITS option/feature. Could
be a nice contribution to CDO ;-)

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Previous Topic:[CDO] MemStore always supports Audits ?
Next Topic:[CDO] Persistance Strategy for Java Objects
Goto Forum:
  


Current Time: Fri May 24 21:53:42 GMT 2019

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

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

Back to the top