CdmBrainstorm » History » Version 4
Andreas Müller, 09/03/2012 04:01 PM
1 | 1 | Andreas Kohlbecker | |
---|---|---|---|
2 | 4 | Andreas Müller | |
3 | |||
4 | |||
5 | 1 | Andreas Kohlbecker | # CDM Brainstorm |
6 | |||
7 | |||
8 | _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._ |
||
9 | 4 | Andreas Müller | |
10 | |||
11 | {{>toc}} |
||
12 | |||
13 | 1 | Andreas Kohlbecker | |
14 | |||
15 | |||
16 | ## Benefit of smaller transaction borders |
||
17 | |||
18 | |||
19 | _[[summary|from a skype call with Andreas Kohlbecker and Andreas Müller on September 3rd 2012]]_ |
||
20 | |||
21 | |||
22 | 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: |
||
23 | |||
24 | * if something goes wrong the whole transaction is rolled back. |
||
25 | |||
26 | * easier development of the Taxonomic Editor |
||
27 | |||
28 | |||
29 | Long running sessions with far reaching transaction borders also have drawbacks which now seem to outweigh the benefits: |
||
30 | |||
31 | * 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 |
||
32 | |||
33 | * 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. |
||
34 | |||
35 | |||
36 | 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. |
||
37 | |||
38 | |||
39 | The shorter transaction borders could still enclose cdm object sub-graphs like the following (only a quickly scribbled list): |
||
40 | |||
41 | * TaxonNode + Taxon |
||
42 | |||
43 | * TaxonName |
||
44 | |||
45 | 3 | Andreas Kohlbecker | * Description + DescriptionElement |
46 | 1 | Andreas Kohlbecker | |
47 | * References + AuthorTeam |
||
48 | |||
49 | * Media |