buda-base / editserv

Editing services of the buda platform
Apache License 2.0
0 stars 0 forks source link

creating new IDs #20

Closed eroux closed 1 year ago

eroux commented 3 years ago

@xristy I'm designing the system to create new IDs, and before I commit to a solution, can you tell me how the DLMS creates new IDs?

xristy commented 3 years ago

The DLMS Editor has two user properties:

each time the editor needs an id it concatenates type+prefix+counter and then counter++.

Since the user may have multiple editor installs care must be taken to ensure that prefixes don't clash. In the old days there were so few editor users that ensuring prefixes didn't clash among users was pretty much simply by using the user's initials.

Obviously with a web-based editor this sort of approach is much easier to manage at the server.

eroux commented 3 years ago

ah yes, thanks! the approach will need to be adapted indeed...

xristy commented 3 years ago

I forgot to mention that the DLMS convention required at least one digit between the type and the letters so that it would be easy to add type ids unambiguously.

The use of the initials of the user was a simple way to see who created the id w/o checking the record