Project

General

Profile

CdmBrainstorm » History » Version 1

Andreas Kohlbecker, 09/03/2012 03:07 PM

1 1 Andreas Kohlbecker
2
# CDM Brainstorm
3
4
5
_This page contains discussions on problems & ideas for the future of the CDM. Once one of the idea and solutions discussed herein becomes mature it is recommended to create a separate page for it._
6
7
8
9
## Benefit of smaller transaction borders
10
11
12
_[[summary|from a skype call with Andreas Kohlbecker and Andreas Müller on September 3rd 2012]]_
13
14
15
Inspired by the specific needs of the Taxonomic Editor the we are using long running sessions. That is a session is opened and editing of taxon starts. During the editing session the taxon and almost all of the associated objects can be modified and will be stored in the end by calling for example @ITaxonNodeService.saveOrUpdate()@. The whole quite long ranging object graph is stored at once, that is in one single transaction. This has some compelling advantages:
16
17
* if something goes wrong the whole transaction is rolled back.
18
19
* easier development of the Taxonomic Editor 
20
21
22
Long running sessions with far reaching transaction borders also have drawbacks which now seem to outweigh the benefits:
23
24
* long running sessions make it hard to use Spring's HTTP invokers since it would require to mimic hibernate lazy loading trough the HTTP invokers
25
26
* for a fine grained access control and authorization mechanism it seems beneficial to have smaller transaction borders. It then would be possible to apply the authorization directly to the according service methods like. `ITaxonNodeService.saveOrUpdate()@, @IDescriptionService.saveOrUpdate()` etc.
27
28
29
Shorter running sessions with smaller transaction borders would mean to partially dissolve the cascading strategies which are currently used during create, update and delete operations.
30
31
32
The shorter transaction borders could still enclose cdm object sub-graphs like the following (only a quickly scribbled list):
33
34
* TaxonNode + Taxon
35
36
* TaxonName
37
38
* Description + Description Element
39
40
* References + AuthorTeam
41
42
* Media