Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » CDO Custom store type
CDO Custom store type [message #754032] Mon, 31 October 2011 14:49 Go to next message
Shumy Mising name is currently offline Shumy Mising nameFriend
Messages: 24
Registered: March 2010
Location: Aveiro, Portugal
Junior Member
I was thinking in use CDO as a kind of Enterprise Service Bus, but for this I need to implement my own store type. Is there any docs for this type of development?

[Updated on: Mon, 31 October 2011 14:50]

Report message to a moderator

Re: CDO Custom store type [message #754085 is a reply to message #754032] Mon, 31 October 2011 17:01 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Am 31.10.2011 15:49, schrieb Shumy:
> I was thinking in use CDO as a kind of Enterprise Service Bus,
Why not ;-)

> but for this I need to implements my own store type.
Why?

> Is there any docs for this type of development?
There is a slightly outdated doc in our 3.0 stream:
http://git.eclipse.org/c/cdo/cdo.git/plain/plugins/org.eclipse.emf.cdo.doc/help/extenders/developing_custom_stores.html?h=streams/3.0-maintenance

And some discussion in http://www.eclipse.org/forums/index.php/mv/tree/161052

For example code look for the subclasses of IStore.

Cheers
/Eike

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


Re: CDO Custom store type [message #754411 is a reply to message #754085] Wed, 02 November 2011 13:27 Go to previous messageGo to next message
Shumy Mising name is currently offline Shumy Mising nameFriend
Messages: 24
Registered: March 2010
Location: Aveiro, Portugal
Junior Member
Between Store and StoreAccessor, there are more than 40 methods that need implementations... and without proper tutorials, there's no way I'm gone do that!
Re: CDO Custom store type [message #754424 is a reply to message #754411] Wed, 02 November 2011 14:07 Go to previous messageGo to next message
Erdal Karaca is currently offline Erdal KaracaFriend
Messages: 854
Registered: July 2009
Senior Member
Shumy wrote on Wed, 02 November 2011 09:27
Between Store and StoreAccessor, there are more than 40 methods that need implementations... and without proper tutorials, there's no way I'm gone do that!


I am sure there are better ways to implement a service bus... did you have a look at osgi remote services or ECF or maybe the EventAdmin?

Though, I am curious about what you would like to solve by that service bus...
Re: CDO Custom store type [message #754446 is a reply to message #754424] Wed, 02 November 2011 14:50 Go to previous messageGo to next message
Shumy Mising name is currently offline Shumy Mising nameFriend
Messages: 24
Registered: March 2010
Location: Aveiro, Portugal
Junior Member
Ok, I'll explain what my intention is with this service. Maybe there are diferent solutions...
I want something that I call "data uniformization service". A service that will shield, data sources and implementations from the client. For the client is all about 3 main services: EMF + CRUD + Query.
For the server: is about translation of client requests to any other kind of data provider with distributed transaction resolution. For example, I'm able to mix RDBMS + File System + DICOM + ... in a way that provides a kind of Virtual File System to the client. Remember that the client only has knowledge of EMF + CRUD + Query, with these it will be able to search for DICOM or other files, indexed by a RDBMS, load and upload these files.

Another advantage is that, I have now 2 development teams => one with implementation domain knowledge, and other for client UI.

When I use JPA, I'm able to do these with listeners PrePersist, PreUpdate, etc.
I don't know if this is possible with CDO, the documentation is scarse on that!
Re: CDO Custom store type [message #754487 is a reply to message #754446] Wed, 02 November 2011 17:40 Go to previous messageGo to next message
Erdal Karaca is currently offline Erdal KaracaFriend
Messages: 854
Registered: July 2009
Senior Member
Shumy wrote on Wed, 02 November 2011 10:50
Ok, I'll explain what my intention is with this service. Maybe there are diferent solutions...
I want something that I call "data uniformization service". A service that will shield, data sources and implementations from the client. For the client is all about 3 main services: EMF + CRUD + Query.
For the server: is about translation of client requests to any other kind of data provider with distributed transaction resolution. For example, I'm able to mix RDBMS + File System + DICOM + ... in a way that provides a kind of Virtual File System to the client. Remember that the client only has knowledge of EMF + CRUD + Query, with these it will be able to search for DICOM or other files, indexed by a RDBMS, load and upload these files.

Another advantage is that, I have now 2 development teams => one with implementation domain knowledge, and other for client UI.

When I use JPA, I'm able to do these with listeners PrePersist, PreUpdate, etc.
I don't know if this is possible with CDO, the documentation is scarse on that!


What a coincidence Smile

I recently ended implementing such a feature: Query any data source on the server side to use CDO to transport the result to the client.
E.g.: I needed to query User data (name, phone, mail, etc.) from a LDAP server. This was done on the server side and the results went back to the client to be joined to another data set (just user ids)...

I used a custom query handler which I registered on the server side and use this to query the "foreign query":

q = transaction.createQuery("myCustomQueryHandler", "named.query.on.server");
q.setParameter("userId", "MYSAMACCOUNTNAME");


Just have a look at how the sql and/or ocl query handlers are implemented...
Re: CDO Custom store type [message #754504 is a reply to message #754487] Wed, 02 November 2011 19:27 Go to previous message
Shumy Mising name is currently offline Shumy Mising nameFriend
Messages: 24
Registered: March 2010
Location: Aveiro, Portugal
Junior Member
Erdal Karaca:
Yes, but it doesn't feel like the same!

Has I understand you are merging in the client, different sources of data. I don't want that, I just want the correct model (EMF) and data in the client. If you change LDAP to other data provider you need to config your client for this new adapter, and for all your clients (althought Update Manager can help here).
What the "Uniformization Data Service" is supose to do, is just avoid that.

In the case of the Virtual File System, is a bit more complex than simple ID merge, and I don't want that kind of merge responsabilities on the client.
I think I will bypass CDO and build my own CRUD + Query API. It was something I was trying to avoid, but Store and StoreAccessor overrides seems to complex without proper documentation.

Maybe I will use ECF, thanks for that info Smile
Previous Topic:populating an EList : thread safety: ConcurrentModificationException
Next Topic:best way to get latest EMF fixes into existing 3.7.1 installation
Goto Forum:
  


Current Time: Fri Apr 26 00:42:11 GMT 2024

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

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

Back to the top