jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Bauer <peter.ba...@apus.co.at>
Subject Design questions regarding reference handling
Date Sat, 14 Jun 2008 07:14:36 GMT

Hi all,

please consider the following example. There are about 1000 User nodes with their properties
like password and so on and about the same number of roles which can be associated with the
users to indicate that the specific user is allowed to use the role.
Since i found some postings in the mailing list from people having performance issues with
REFERENCE properties, my question is what would be the best method linking the users to the

1. REFERENCEs: The worst-case scenario is that every user is linked to every role which means
1000 * 1000 = 1M REFERENCE properties. If a role shall be deleted, the REFERENCE property
of all 1000 users has to be found by back-referencing (very fast i think) and removed programmatically,
since there is no cascaded delete available. What are the operations performed on the database
regarding the REFERENCEs if operations are performed on the user or role nodes?

2. Bi-directional PATHs, UUIDs as String: Every user stores the PATHs or the UUIDs of the
associated roles in a String property. To allow efficient back-referencing to all users associated
with a role (for deleting the linking properties from the users), every role would additionally
have to keep the UUID or PATH of all associated roles. This potentially means that every user
has 1000 PATHs or UUIDs as well as each role -> 1000 * 1000 + 1000 * 1000 = 2M PATH or
UUID properties.



|      +allowedroles[MULTIVALUED PATH/STRING] only in case of option 2
|      +allowedroles[MULTIVALUED PATH/STRING] only in case of option 2
|      +allowedroles[MULTIVALUED PATH/STRING] only in case of option 2

View raw message