Bug 214526 - Make accessible context to the StoreWriter
Summary: Make accessible context to the StoreWriter
Status: CLOSED FIXED
Alias: None
Product: EMF
Classification: Modeling
Component: cdo.core (show other bugs)
Version: 1.0   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Eike Stepper CLA
QA Contact:
URL:
Whiteboard:
Keywords: readme
Depends on:
Blocks:
 
Reported: 2008-01-07 14:09 EST by Simon Mc Duff CLA
Modified: 2010-06-29 09:22 EDT (History)
1 user (show)

See Also:


Attachments
Beta1 (2.70 KB, patch)
2008-01-07 14:26 EST, Simon Mc Duff CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Mc Duff CLA 2008-01-07 14:09:44 EST
> Simon McDuff schrieb:
>> "Eike Stepper" <stepper@sympedia.de> wrote in message 
>> news:fltnv4$ci7$2@build.eclipse.org...
>>   
>>> Simon McDuff schrieb:
>>>     
>>>>> If so, I'd propose a different solution:
>>>>> By passing all together the values down before passing them down 
>>>>> separately again I'd rather pass a sort of "revisionDataFinished" event 
>>>>> down to the store writer. Then it's up to your store implementation to 
>>>>> gather all the needed infos (without updating the database) within the 
>>>>> separate data calls and finally do the database update in one chunk at 
>>>>> the end (revisionDataFinished event).
>>>>>
>>>>> Would that be ok?
>>>>>
>>>>>
>>>>>         
>>>> Sounds goods...
>>>>
>>>> Right now as we read the data from the stream we call primeNewObjects.
>>>> This would have to change ? Right ? Because I want to make these call 
>>>> after I gather all the infos.
>>>>
>>>>       
>> I  don't have a problem with primeNewObjects... it is when we call it that I 
>> have a problem with.
>> We seems to mix up serialization and processing at many places.
>>
>> Should not we unserialize data... and then apply changes to have a real 
>> transaction scope.
>> Right now we do both of them at the same time.
>> I would like to see a separation between two different processes.
>> It is strange because we create ITransaction.. and in fact we already did 
>> apply some changes to the graph.
>>
>> If we do all modifications after reading from the stream.. it will be easier 
>> to manage stuff in my StoreWriter.
>>
>>   
>>> Funny that it was you who wanted to have the primeNewObject method in the 
>>> storage API ;-)
>>> I see your problem but I don't see an easy solution for it. For all your 
>>> optimizations I see more and more repository responsibilities walking down 
>>> to the store. In the end we can spare it completely and simply pass an 
>>> InputStream down to the store. Just joking!
>>>
>>> But seriously, can you tell me, how the mapping of tempIDs and metaIDs 
>>> should work then?
>>>
>>> Regards,
>>> Eike Stepper
>>> ----
>>> http://wiki.eclipse.org/CDO
>>> http://wiki.eclipse.org/Net4j
>>>
Comment 1 Simon Mc Duff CLA 2008-01-07 14:26:41 EST
Created attachment 86338 [details]
Beta1

This is where we can do the mapping of temporary objects.

Now, we need to inform the storeWriter about the context of our changes.
Comment 2 Simon Mc Duff CLA 2008-01-07 14:37:17 EST
What I would like to see from this enhancement is really to detach 
CommitTransactionIndication from what does the job of applying change to the graph.

Let say I received newPackages,newResources,newObjects,dirtyObjects from somewhere else... I would like to be able to re-use that code wihout having to use CommitTransactionIndication.

It will be good also for our 2 phases commit enhancement.





Comment 3 Eike Stepper CLA 2008-04-07 09:35:25 EDT
Simon, Can this one be closed as well?
Comment 4 Simon Mc Duff CLA 2008-04-07 11:53:59 EDT
(In reply to comment #3)
> Simon, Can this one be closed as well?

Yes, with the latest changes.. I'm very happy!!!
Comment 5 Eike Stepper CLA 2008-04-07 14:51:30 EDT
cleanup
Comment 6 Eike Stepper CLA 2008-04-19 04:48:34 EDT
Fixed in S200804140606
Comment 7 Eike Stepper CLA 2008-06-10 02:30:05 EDT
Reversioned due to graduation