Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » CDO offline mode
CDO offline mode [message #422353] Tue, 02 September 2008 14:10 Go to next message
Saulius Tvarijonas is currently offline Saulius TvarijonasFriend
Messages: 34
Registered: July 2009
Member
Hello,

Does anybody tried to use CDO in offline mode? For example I open CDO
transaction session and connection to server is lost. Is it possible to
save CDO objects on client side and load later to continue work?
It is very important when we have long write transactions. As I
understand there is no traffic between client and server from
transaction opening until commit.

1. Can I open CDO transaction and edit model in offline (no connection
to server) mode?
2. What happens when for some reason connection is lost?
3. Is it possible to persist changed model locally and restore later? In
case I do not want to commit immediately and show these changes to
other. If such feature is not available, how difficult would be to
support it?

Saulius
Re: CDO offline mode [message #422355 is a reply to message #422353] Tue, 02 September 2008 16:47 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6690
Registered: July 2009
Senior Member
Hi Saulius,

Although this question has been asked several times and the wish itself
is understandeable, no, this is currently not possible with CDO.
The "C" in CDO stands for "connected", indicating the original focus of
CDO.
While I can imagine to start concrete discussions about how to deliver
such a feature I don't expect a solution to appear within a day or two.

More comments below...


Saulius Tvarijonas schrieb:
> Hello,
>
> Does anybody tried to use CDO in offline mode? For example I open CDO
> transaction session and connection to server is lost. Is it possible
> to save CDO objects on client side and load later to continue work?
You can "export" object on client sied (e.g. to an xml file) but you can
not make these objects appear in a different CDOSession as "existent"
objects. Adding them to another session would duplicate them in the
repository.

> It is very important when we have long write transactions. As I
> understand there is no traffic between client and server from
> transaction opening until commit.
There is no transaction related traffic (i.e. no id queries for new
objects, no deltas written to the server, etc).
BUT: Usually there's a whole lot of traffic to load objects on demand
from the server and possibly even server initiated invalidation or
update requests for objects that have changed remotely.

>
> 1. Can I open CDO transaction and edit model in offline (no connection
> to server) mode?
Currently not.

> 2. What happens when for some reason connection is lost?
If the connection is lost, the Net4j IConnector (i.e. TCPConnector) is
deactivated, which, in turn deactivates all virtual communication
IChannels, which, in case of an IChannel with the CDOProtocol,
deactivates the CDOSession.
You can register listeners to all these events to react *before* you
access the model at client side the next time and run into an exception.


> 3. Is it possible to persist changed model locally and restore later?
> In case I do not want to commit immediately and show these changes to
> other. If such feature is not available, how difficult would be to
> support it?
No, this is currently not possible with CDO.

As I said at the beginning, I think these are all interesting features
and I can imagine that, theoretically, they're not imporssible (e.g.
there's already an optimistic locking strategy at server side).
But as CDO originally had different requirements, it's IMHO not the
easiest undertaking.
Would you be willing to examine CDO and come up with concrete design
proposals for this feature?
Our assistance is guaranteed wherever possible...

Cheers
/Eike


Re: CDO offline mode [message #422357 is a reply to message #422355] Tue, 02 September 2008 18:25 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6690
Registered: July 2009
Senior Member
Saulius,

Thinking once more, I think that an offline mode for CDO has at least
become a bit easier to develop now that this feature is implemented:

230832: Make remote invalidation configurable
https://bugs.eclipse.org/bugs/show_bug.cgi?id=230832

With this feature it's now possible to temporarily switch off the remote
notifications for changd objects and switch it on again and resync the
session with the repository.

Cheers
/Eike


Eike Stepper schrieb:
> Hi Saulius,
>
> Although this question has been asked several times and the wish
> itself is understandeable, no, this is currently not possible with CDO.
> The "C" in CDO stands for "connected", indicating the original focus
> of CDO.
> While I can imagine to start concrete discussions about how to deliver
> such a feature I don't expect a solution to appear within a day or two.
>
> More comments below...
>
>
> Saulius Tvarijonas schrieb:
>> Hello,
>>
>> Does anybody tried to use CDO in offline mode? For example I open CDO
>> transaction session and connection to server is lost. Is it possible
>> to save CDO objects on client side and load later to continue work?
> You can "export" object on client sied (e.g. to an xml file) but you
> can not make these objects appear in a different CDOSession as
> "existent" objects. Adding them to another session would duplicate
> them in the repository.
>
>> It is very important when we have long write transactions. As I
>> understand there is no traffic between client and server from
>> transaction opening until commit.
> There is no transaction related traffic (i.e. no id queries for new
> objects, no deltas written to the server, etc).
> BUT: Usually there's a whole lot of traffic to load objects on demand
> from the server and possibly even server initiated invalidation or
> update requests for objects that have changed remotely.
>
>>
>> 1. Can I open CDO transaction and edit model in offline (no
>> connection to server) mode?
> Currently not.
>
>> 2. What happens when for some reason connection is lost?
> If the connection is lost, the Net4j IConnector (i.e. TCPConnector) is
> deactivated, which, in turn deactivates all virtual communication
> IChannels, which, in case of an IChannel with the CDOProtocol,
> deactivates the CDOSession.
> You can register listeners to all these events to react *before* you
> access the model at client side the next time and run into an exception.
>
>
>> 3. Is it possible to persist changed model locally and restore later?
>> In case I do not want to commit immediately and show these changes to
>> other. If such feature is not available, how difficult would be to
>> support it?
> No, this is currently not possible with CDO.
>
> As I said at the beginning, I think these are all interesting features
> and I can imagine that, theoretically, they're not imporssible (e.g.
> there's already an optimistic locking strategy at server side).
> But as CDO originally had different requirements, it's IMHO not the
> easiest undertaking.
> Would you be willing to examine CDO and come up with concrete design
> proposals for this feature?
> Our assistance is guaranteed wherever possible...
>
> Cheers
> /Eike
>
>


Previous Topic:Initialize an attribute with another attribute
Next Topic:[Teneo] Attempting thread-bound sessions
Goto Forum:
  


Current Time: Wed Sep 25 03:45:14 GMT 2024

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

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

Back to the top