Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [Teneo] Client - Server on demand transference of EObjects
[Teneo] Client - Server on demand transference of EObjects [message #757134] Wed, 16 November 2011 16:56 Go to next message
Mauricio Reyes is currently offline Mauricio ReyesFriend
Messages: 26
Registered: August 2011
Junior Member
Hello, we are trying to use Teneo in a Client-Server architecture, where Client will ask for persisted EMF model to Server and modify it and Server will contain the logic to validate the model and persist it if everything goes well or raise warnings and exceptions to the client when some validation doesn't goes through so the client can show them to the final user.
At server side we'll use JBoss and the idea is to transfer the objects when client demand in the same way that Teneo does with its implementation of PersistableList (when the attribute isLoaded is false)
At client side the idea is to divide the model in several resources, and the strategy to do it is to have a resource for every level of the tree. Maybe an example is better to explain this:

Suppose that we have with this simple Library model and the following example:

Library (composed by a list of Books)
Book (composed by a list of Writers)
Writer

Library
|__ Book 1
	|__ Writer 1
|__ Book 2
	|__ Writer 2
|__ Book 3
	|__ Writer 3
	|__ Writer 4


At client side the first resource should contain only the library, and when we want to see the list of Books we need to call the server to retrieve them, and put all them in a new resource. With the list of writers we should work in the same way, asking them to server only when they are required, and making a new resource that contain them. So the ResourceSet, when all the model is loaded, would be like this:

ResourceSet
|__ Resource1 {Library}
|__ Resource2 {Book 1, Book 2, Book 3}
|__ Resource3 {Writer 1}
|__ Resource4 {Writer 2}
|__ Resource5 {Writer 3, Writer 4}


We evaluated CDO and discard it because has many things we're not interested, and we're trying to resolve how do we recognize that we need to load objects at client side. We are thinking of a similar implementation of HibernatePersistableList, asking the server for the objects when the list is required and isn't loaded yet, but at server side we'll work with Teneo, using HibernatePersistableEList, so we probably will need to adapt the EObjects to do the transference from server to client and again when they come from client and we want to persist them with Teneo.

To sum up, we need some help to achieve the transference in the way we are thinking or have another point of view on how we should face the problem (maybe just with regular EObject Proxies or something else).


Thanks in advance

Mauricio
Re: [Teneo] Client - Server on demand transference of EObjects [message #757950 is a reply to message #757134] Thu, 17 November 2011 05:57 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Mauricio,
Afaics you don't need to put types in different resources. I think you can work on the client with EMF proxies which can
be loaded from the server on request. The objects can be in one resource (but multiple resources will also work fine).
You have to study the EMF resource to see how proxy loading can be controlled.

Another interesting project (next to Teneo) to use on the server can be the Texo project, it generates JPA annotated
code from EMF models and can integrate with EMF, I am working on a REST XML/JSON server solution in combination with
Texo. But not yet finished there. The idea would then be:
- on the client use EMF and resources
- the proxy/resource loading calls the server's REST api to retrieve data
- on the server you have real pojo's with JPA annotations which are available through the rest api

For more information:
http://wiki.eclipse.org/Texo

gr. Martin

On 11/16/2011 05:56 PM, maureyeslopez wrote:
> Hello, we are trying to use Teneo in a Client-Server architecture, where Client will ask for persisted EMF model to
> Server and modify it and Server will contain the logic to validate the model and persist it if everything goes well or
> raise warnings and exceptions to the client when some validation doesn't goes through so the client can show them to the
> final user. At server side we'll use JBoss and the idea is to transfer the objects when client demand in the same way
> that Teneo does with its implementation of PersistableList (when the attribute isLoaded is false)
> At client side the idea is to divide the model in several resources, and the strategy to do it is to have a resource for
> every level of the tree. Maybe an example is better to explain this:
>
> Suppose that we have with this simple Library model and the following example:
>
> Library (composed by a list of Books)
> Book (composed by a list of Writers)
> Writer
>
>
> Library
> |__ Book 1
> |__ Writer 1
> |__ Book 2
> |__ Writer 2
> |__ Book 3
> |__ Writer 3
> |__ Writer 4
>
>
> At client side the first resource should contain only the library, and when we want to see the list of Books we need to
> call the server to retrieve them, and put all them in a new resource. With the list of writers we should work in the
> same way, asking them to server only when they are required, and making a new resource that contain them. So the
> ResourceSet, when all the model is loaded, would be like this:
>
>
> ResourceSet
> |__ Resource1 {Library}
> |__ Resource2 {Book 1, Book 2, Book 3}
> |__ Resource3 {Writer 1}
> |__ Resource4 {Writer 2}
> |__ Resource5 {Writer 3, Writer 4}
>
>
> We evaluated CDO and discard it because has many things we're not interested, and we're trying to resolve how do we
> recognize that we need to load objects at client side. We are thinking of a similar implementation of
> HibernatePersistableList, asking the server for the objects when the list is required and isn't loaded yet, but at
> server side we'll work with Teneo, using HibernatePersistableEList, so we probably will need to adapt the EObjects to do
> the transference from server to client and again when they come from client and we want to persist them with Teneo.
>
> To sum up, we need some help to achieve the transference in the way we are thinking or have another point of view on how
> we should face the problem (maybe just with regular EObject Proxies or something else).
>
> Thanks in advance
>
> Mauricio


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Previous Topic:[CDO] Not Active: Transaction #
Next Topic:programmatically create model, edit and editor code and register editor plugin
Goto Forum:
  


Current Time: Fri Apr 19 22:24:14 GMT 2024

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

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

Back to the top