Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [CDO] Code Review for a faster Horizontal Mapping
[CDO] Code Review for a faster Horizontal Mapping [message #1130094] Wed, 09 October 2013 08:19 Go to next message
Christophe MOINE is currently offline Christophe MOINEFriend
Messages: 34
Registered: February 2012
Member
Dear All,

We've been working on a new mapping strategy (with MySQL) to fix performance issues on 0-* references. It seems to work so far, but has a few drawbacks:
- It works only with containment features and the order is then not garanted (We rely on the cdo_containment column instead of the A_B_list table) For other features, we simply delegate to the standard mapping strategy.
- Major drawback: we cannot iterate over CDOResource.getContent(): we cannot read it, just write to it. It needs some adjustements in the applications, but it was not really blocking for us since we are widely using CDOView.createQuery(SQL, SQL_QUERY) method. I think we could easily make it work by delegating to the standard mapping strategy, otherwise we would need the check all cdo_resource of all tables... Simply awfull.
- The type of the containment feature must not be too generic Surprised The more it is generic, the more table/cdo_contaiment we need to check (this is the same problem as previously)

The advantages are the following:
- We don't bother with the order of containment feature which seriously improve performances.
- Remove redunduncy between A_B_list and the cdo_containment column if we don't mind about order (we have a few of DB corruption, this is less to repair then)
- Using the cdo_contament instead of the A_B_list is simply more Relationnal DB compliant in my point of view.

We would like to port this principle for non containment features, but this is more tricky. We would need an additionnal column (equivalent to cdo_containment) to replace the A_B_list table.

We haven't done serious benchmarking so far even if the gain is notifiable. I can try to do that if you are interested with this.

Before sending this into production, we would appreciate a lot some code review on the NonAuditListTableMapping2 especially.

Thank you in advance for your comments,

Cheers,

Christophe.
Re: [CDO] Code Review for a faster Horizontal Mapping [message #1130585 is a reply to message #1130094] Wed, 09 October 2013 18:30 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 5591
Registered: July 2009
Senior Member
Hi Christoph,

CDO topics should be discussed in the EMF newsgroup, which I've added to this conversation.

It sounds as if you've invested considerable analysis and development effort into this new list mapping, even if it
seems a bit incomplete and even if there are (still?) some drawbacks. So I will want to look more closely at your code,
but right now is a bad time for me because I'm with a customer this week and that's pretty exhaustive already. I suggest
that you submit a bugzilla and attach your changes in form of a workspace patch for easier application. Until I come to
review it you can easily add new patches when you have more changes.

That said, it strikes me that some of the restrictions you outline below are hard to accept (some even hard to
understand), e.g. not being able to read a collection while you can write to it.

To make it easier to test your mapping it would be nice to also patch the typical test scenario IConfigs so that we can
run the regression tests.

So much for now in my limited time ;-)

Cheers
/Eike

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


Am 09.10.2013 10:19, schrieb Christophe MOINE:
> Dear All,
>
> We've been working on a new mapping strategy (with MySQL) to fix performance issues on 0-* references. It seems to work so far, but has a few drawbacks:
> - It works only with containment features and the order is then not garanted (We rely on the cdo_containment column instead of the A_B_list table) For other features, we simply delegate to the standard mapping strategy.
> - Major drawback: we cannot iterate over CDOResource.getContent(): we cannot read it, just write to it. It needs some adjustements in the applications, but it was not really blocking for us since we are widely using CDOView.createQuery(SQL, SQL_QUERY) method. I think we could easily make it work by delegating to the standard mapping strategy, otherwise we would need the check all cdo_resource of all tables... Simply awfull.
> - The type of the containment feature must not be too generic :o The more it is generic, the more table/cdo_contaiment we need to check (this is the same problem as previously)
>
> The advantages are the following:
> - We don't bother with the order of containment feature which seriously improve performances.
> - Remove redunduncy between A_B_list and the cdo_containment column if we don't mind about order (we have a few of DB corruption, this is less to repair then)
> - Using the cdo_contament instead of the A_B_list is simply more Relationnal DB compliant in my point of view.
>
> We would like to port this principle for non containment features, but this is more tricky. We would need an additionnal column (equivalent to cdo_containment) to replace the A_B_list table.
>
> We haven't done serious benchmarking so far even if the gain is notifiable. I can try to do that if you are interested with this.
>
> Before sending this into production, we would appreciate a lot some code review on the NonAuditListTableMapping2 especially.
>
> Thank you in advance for your comments,
>
> Cheers,
>
> Christophe.
Re: [CDO] Code Review for a faster Horizontal Mapping [message #1132486 is a reply to message #1130585] Fri, 11 October 2013 07:18 Go to previous messageGo to next message
Christophe MOINE is currently offline Christophe MOINEFriend
Messages: 34
Registered: February 2012
Member
Hi,

oups thanks for putting the topic in EMF, I was maybe not well waken up Smile

The CDOResource.getContents() still remains, but I can delegate it in the next version. I'll work on it and send the patch soon (I'll try at least Smile ) But as I told you, this is not very annoying when we think twice. Reading the CDOResource.getContents() is just not feasable most a the times because it usually has too many elements in a real case imo Smile

Could you give me the link to the link to the bugzilla issue please so I could post my patch please ?

Regards,

Christophe.
Re: [CDO] Code Review for a faster Horizontal Mapping [message #1132524 is a reply to message #1132486] Fri, 11 October 2013 07:47 Go to previous messageGo to next message
Christophe MOINE is currently offline Christophe MOINEFriend
Messages: 34
Registered: February 2012
Member
I attached the horizontal mapping below, that was actually easier than what I thought: just delegate Smile

I didn't put yet the extension in the plugin.xml.... Because I have other stuffs in my plugin.

Cheers.

Christophe.
Re: [CDO] Code Review for a faster Horizontal Mapping [message #1138910 is a reply to message #1132486] Tue, 15 October 2013 12:04 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 5591
Registered: July 2009
Senior Member
Am 11.10.2013 09:18, schrieb Christophe MOINE:
> Hi,
>
> oups thanks for putting the topic in EMF, I was maybe not well waken up :)
>
> The CDOResource.getContents() still remains, but I can delegate it in the next version. I'll work on it and send the
> patch soon (I'll try at least :) ) But as I told you, this is not very annoying when we think twice. Reading the
> CDOResource.getContents() is just not feasable most a the times because it usually has too many elements in a real
> case imo :)
>
> Could you give me the link to the link to the bugzilla issue please so I could post my patch please ?
Please just create a bugzilla.

And please stop to post to the emfT newsgroup. I don't look at it frequently ;-)

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
Previous Topic:[EMFStore] access to EditingDomain in EMFStore
Next Topic:TEXO based application architecture
Goto Forum:
  


Current Time: Thu Dec 25 05:51:31 GMT 2014

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

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