sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Desruisseaux (JIRA)" <j...@apache.org>
Subject [jira] [Created] (SIS-73) Remove the automatic mapping of UUIDs to objects
Date Wed, 26 Dec 2012 09:38:14 GMT
Martin Desruisseaux created SIS-73:
--------------------------------------

             Summary: Remove the automatic mapping of UUIDs to objects
                 Key: SIS-73
                 URL: https://issues.apache.org/jira/browse/SIS-73
             Project: Spatial Information Systems
          Issue Type: Task
          Components: Utilities
            Reporter: Martin Desruisseaux
            Assignee: Martin Desruisseaux
            Priority: Minor
             Fix For: 0.3


For every UUID (_Unique Universal Identifier_) assigned to an {{IdentifiedObject}}, SIS automatically
keeps the association using weak references in an internal map. This allow to retrieve the
object by UUID if the object is still alive in the JVM. The rational was that if UUID are
truly unique, then there is few risk of ID clash even if we use a system-wide map. However
this cause a number of risks:

* The "truly unique" hypothesis may not hold in practice. Consider for example the case were
the user reloads many times the same ISO 19139 document. If the document contains an object
with {{gco:uuid}} attribute, then the same UUID will be assigned many times - admitely to
equivalent objects, but the user could have edited a previously loaded instance.

* In order to be truly effective, developers need to provide their own "UUID to object" mapping
anyway, because the universe of UUIDs is large and the developers probably have some database
for them. Our own management of "UUID assigned in the current JVM" is likely to overlap with
the developer's database.

Applying the prudential rule "_in case of doubt, leave it out_", the proposal is to remove
the automatic "UUIDs to objects" mapping, but keep this JIRA task in the archive in order
to make easier to find the Subversion revision number to revert if this functionality is considered
useful in a future SIS version.

As a minor side effect, the {{putIfAbsent}} method from {{WeakValueHashMap}} should also be
removed. It was added for supporting the feature documented in this JIRA task at the cost
of slight complication of implementation. Given that {{WeakValueHashMap}} is not real concurrent
map, we may be better to avoid any {{ConcurrentMap}} method.


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message