Home » Modeling » EMF » How do YOU lazily load EMF objects from a server?
| How do YOU lazily load EMF objects from a server? [message #396823] |
Tue, 15 November 2005 16:54  |
|
Originally posted by: jerry_frain.yahoo.com
Hi,
I'm working on a tiered application that's using Eclipse RCP for the
client. We're modeling the business objects in EMF. The model is
currently one big graph of about 120 classes. I'm trying to figure out
a good way to provide remote access to the business objects.
One possibility is to use SDO, and send serialized datagraphs around
over the wire. I do like the notion of a disconnected graph.
However, SDO and big graphs don't seem to go together well due to the
closure constraint. I don't want to make everything a containment
reference due to good modeling practices, and even if I did I don't
really want to ship my whole repository around whenever I perform some
operation.
I thought about leaving the non-containment references the way they are
and just try to be smart on the client when resolving proxy references
to go hit the server and, e.g., load up a new resource on the client.
However, SDO datagraphs doesn't even serialize proxies, due to the
closure constrating.
So what I proabably want is a EMF Resource that creates nice proxy URIs
that point to an object implementation and id on a server -- and then
construct my own version of an SDO change summary to keep track of
changes to send back to the server.
Is anyone else trying to do something similar?
Jerry
|
|
|
| Re: How do YOU lazily load EMF objects from a server? [message #396824 is a reply to message #396823] |
Tue, 15 November 2005 17:11   |
Ed Merks Messages: 24560 Registered: July 2009 |
Senior Member |
|
|
Jerry,
We don't have direct experience with this, so I can only provide general
comments.
You probably should have a look at CDO and Elver; links are on the EMF
Corner page: http://eclipse.org/emf/models/models.xml
A change summary is implemented using the Change model (from
org.eclipse.emf.ecore.change) so you can get exactly that same type of
support directly in EMF.
The proxy URI of an object x is determined by
x.eResource().getURI().appendFragment(x.eResource().getURIFr agment(x))
so you can control the proxy URI by controlling the URI of the resource
containing the object and by controlling what that resource
implementation returns for getURIFragment.
Jerry Frain wrote:
>Hi,
>
>I'm working on a tiered application that's using Eclipse RCP for the
>client. We're modeling the business objects in EMF. The model is
>currently one big graph of about 120 classes. I'm trying to figure out
>a good way to provide remote access to the business objects.
>
>One possibility is to use SDO, and send serialized datagraphs around
>over the wire. I do like the notion of a disconnected graph.
>
>However, SDO and big graphs don't seem to go together well due to the
>closure constraint. I don't want to make everything a containment
>reference due to good modeling practices, and even if I did I don't
>really want to ship my whole repository around whenever I perform some
>operation.
>
>I thought about leaving the non-containment references the way they are
>and just try to be smart on the client when resolving proxy references
>to go hit the server and, e.g., load up a new resource on the client.
>
>However, SDO datagraphs doesn't even serialize proxies, due to the
>closure constrating.
>
>So what I proabably want is a EMF Resource that creates nice proxy URIs
>that point to an object implementation and id on a server -- and then
>construct my own version of an SDO change summary to keep track of
>changes to send back to the server.
>
>Is anyone else trying to do something similar?
>
>Jerry
>
>
|
|
|
| Re: How do YOU lazily load EMF objects from a server? [message #396825 is a reply to message #396824] |
Tue, 15 November 2005 17:26   |
|
Originally posted by: jerry_frain.yahoo.com
Ed Merks wrote:
> Jerry,
>
> We don't have direct experience with this, so I can only provide
> general comments.
>
> You probably should have a look at CDO and Elver; links are on the
> EMF Corner page: http://eclipse.org/emf/models/models.xml
Yeah, I'm using the Elver hibernate store for persistence, and it works
pretty well. Martin's doing a great job with it.
> A change summary is implemented using the Change model (from
> org.eclipse.emf.ecore.change) so you can get exactly that same type
> of support directly in EMF.
Cool. I'll take a look at this.
> The proxy URI of an object x is determined by
> x.eResource().getURI().appendFragment(x.eResource().getURIFr agment(x))
> so you can control the proxy URI by controlling the URI of the
> resource containing the object and by controlling what that resource
> implementation returns for getURIFragment.
That helps a lot.
Thanks for the quick response, I'll take a look at these ideas.
Jerry
|
|
|
| Re: How do YOU lazily load EMF objects from a server? [message #396827 is a reply to message #396823] |
Wed, 16 November 2005 05:34   |
|
Originally posted by: marchign.fastmail.fm
Jerry Frain wrote:
> Hi,
>
> I'm working on a tiered application that's using Eclipse RCP for the
> client. We're modeling the business objects in EMF. The model is
> currently one big graph of about 120 classes. I'm trying to figure out
> a good way to provide remote access to the business objects.
>
> One possibility is to use SDO, and send serialized datagraphs around
> over the wire. I do like the notion of a disconnected graph.
>
> However, SDO and big graphs don't seem to go together well due to the
> closure constraint. I don't want to make everything a containment
> reference due to good modeling practices, and even if I did I don't
> really want to ship my whole repository around whenever I perform some
> operation.
>
> I thought about leaving the non-containment references the way they are
> and just try to be smart on the client when resolving proxy references
> to go hit the server and, e.g., load up a new resource on the client.
>
> However, SDO datagraphs doesn't even serialize proxies, due to the
> closure constrating.
>
> So what I proabably want is a EMF Resource that creates nice proxy URIs
> that point to an object implementation and id on a server -- and then
> construct my own version of an SDO change summary to keep track of
> changes to send back to the server.
>
> Is anyone else trying to do something similar?
>
> Jerry
The feature you are asking for (IMO) could be implemented on top of Ed
Merks patch 105937.
Martin Taal is working on taking advantage of such patch in his
implementation of Hibernate integration. Once his work will be finished
you will find in his implementation a lot of hints on how implementing
remotization.
At the moment anyway it is not clear if and how remote repositories can
share the same interface of Resource.
Bye,
Davide
|
|
|
| Re: How do YOU lazily load EMF objects from a server? [message #396832 is a reply to message #396827] |
Wed, 16 November 2005 11:01  |
Martin Taal Messages: 5054 Registered: July 2009 |
Senior Member |
|
|
Hi,
Just to clarify a bit more on this. What I am adding in elver is a
combination of emf proxying (and resolving) with lazy/delayed loading
from the datastore (based on proposals from Davide). Currently in elver
elists (containment and non-containment) are lazily loaded, however
single (container) references are not lazily loaded. EMF proxying will
add support for single reference lazy loading (and have other advantages
also).
As far as I know the patch (105937) mentioned by Davide is not yet in
the standard EMF release but is planned for 2.2M4 (according to
bugzilla, correct me Ed if I am wrong here). I will add EMF proxies in
the next Elver release (about 2 weeks from now) and when 2.2M4 comes out
it will be adapted for containment relations (I need to study the patch
much more also). So, I will probably have a development version with emf
proxies for containment relations available but this will not be a real
elver release until 2.2M4 comes out.
gr. Martin
Davide Marchignoli wrote:
> Jerry Frain wrote:
>
>> Hi,
>>
>> I'm working on a tiered application that's using Eclipse RCP for the
>> client. We're modeling the business objects in EMF. The model is
>> currently one big graph of about 120 classes. I'm trying to figure out
>> a good way to provide remote access to the business objects.
>>
>> One possibility is to use SDO, and send serialized datagraphs around
>> over the wire. I do like the notion of a disconnected graph.
>>
>> However, SDO and big graphs don't seem to go together well due to the
>> closure constraint. I don't want to make everything a containment
>> reference due to good modeling practices, and even if I did I don't
>> really want to ship my whole repository around whenever I perform some
>> operation.
>>
>> I thought about leaving the non-containment references the way they are
>> and just try to be smart on the client when resolving proxy references
>> to go hit the server and, e.g., load up a new resource on the client.
>>
>> However, SDO datagraphs doesn't even serialize proxies, due to the
>> closure constrating.
>>
>> So what I proabably want is a EMF Resource that creates nice proxy URIs
>> that point to an object implementation and id on a server -- and then
>> construct my own version of an SDO change summary to keep track of
>> changes to send back to the server.
>>
>> Is anyone else trying to do something similar?
>>
>> Jerry
>
>
>
> The feature you are asking for (IMO) could be implemented on top of Ed
> Merks patch 105937.
>
> Martin Taal is working on taking advantage of such patch in his
> implementation of Hibernate integration. Once his work will be finished
> you will find in his implementation a lot of hints on how implementing
> remotization.
>
> At the moment anyway it is not clear if and how remote repositories can
> share the same interface of Resource.
>
> Bye,
> Davide
|
|
|
| Re: How do YOU lazily load EMF objects from a server? [message #396833 is a reply to message #396832] |
Wed, 16 November 2005 10:48  |
Ed Merks Messages: 24560 Registered: July 2009 |
Senior Member |
|
|
Martin,
I'm hoping/expecting to commit the cross resource containment support
shortly after this week's integration build, i.e., hopefully by the end
of this week.
Martin Taal wrote:
> Hi,
> Just to clarify a bit more on this. What I am adding in elver is a
> combination of emf proxying (and resolving) with lazy/delayed loading
> from the datastore (based on proposals from Davide). Currently in
> elver elists (containment and non-containment) are lazily loaded,
> however single (container) references are not lazily loaded. EMF
> proxying will add support for single reference lazy loading (and have
> other advantages also).
>
> As far as I know the patch (105937) mentioned by Davide is not yet in
> the standard EMF release but is planned for 2.2M4 (according to
> bugzilla, correct me Ed if I am wrong here). I will add EMF proxies in
> the next Elver release (about 2 weeks from now) and when 2.2M4 comes
> out it will be adapted for containment relations (I need to study the
> patch much more also). So, I will probably have a development version
> with emf proxies for containment relations available but this will not
> be a real elver release until 2.2M4 comes out.
>
> gr. Martin
>
> Davide Marchignoli wrote:
>
>> Jerry Frain wrote:
>>
>>> Hi,
>>>
>>> I'm working on a tiered application that's using Eclipse RCP for the
>>> client. We're modeling the business objects in EMF. The model is
>>> currently one big graph of about 120 classes. I'm trying to figure out
>>> a good way to provide remote access to the business objects.
>>>
>>> One possibility is to use SDO, and send serialized datagraphs around
>>> over the wire. I do like the notion of a disconnected graph.
>>>
>>> However, SDO and big graphs don't seem to go together well due to the
>>> closure constraint. I don't want to make everything a containment
>>> reference due to good modeling practices, and even if I did I don't
>>> really want to ship my whole repository around whenever I perform some
>>> operation.
>>>
>>> I thought about leaving the non-containment references the way they are
>>> and just try to be smart on the client when resolving proxy references
>>> to go hit the server and, e.g., load up a new resource on the client.
>>>
>>> However, SDO datagraphs doesn't even serialize proxies, due to the
>>> closure constrating.
>>>
>>> So what I proabably want is a EMF Resource that creates nice proxy URIs
>>> that point to an object implementation and id on a server -- and then
>>> construct my own version of an SDO change summary to keep track of
>>> changes to send back to the server.
>>>
>>> Is anyone else trying to do something similar?
>>>
>>> Jerry
>>
>>
>>
>>
>> The feature you are asking for (IMO) could be implemented on top of
>> Ed Merks patch 105937.
>>
>> Martin Taal is working on taking advantage of such patch in his
>> implementation of Hibernate integration. Once his work will be
>> finished you will find in his implementation a lot of hints on how
>> implementing remotization.
>>
>> At the moment anyway it is not clear if and how remote repositories
>> can share the same interface of Resource.
>>
>> Bye,
>> Davide
>
|
|
|
Goto Forum:
Current Time: Sat May 25 02:13:37 EDT 2013
Powered by FUDForum. Page generated in 0.06762 seconds
|