-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UUID Generation in General, for example how to make a tracker for widgets #17
Comments
This is one of the reason the project reached a deadlock: sometimes finding a UUID is too difficult or imposes limits. If I have time and some help (you seem to be a good candidate and, by the way, thank you for your feedback so far) I would re-engineer the process of assigning UUIDs, demanding it to external centralized service which could bind specific environment IDs to global UUIDs, avoiding the different (and sometimes difficult/limiting) "conversion" phase implemented in Action Trackers. What do you think? |
Sound's cool but also I don't have so much time. |
Sure but a few time from some people is more than a few time from only one :-) |
Also that approach sounds like additional work for the setup of the system. Am I right, that there will be a problem currently if I have different blocks with the same identifier? |
Why you need a central service for the UUID? Can't we just add a column mageploy_uuid to all necessary tables and generate a random UUID? I don't think there is a risk for any collisions if the UUIDs are long enough. Why might add hostname and path to the entropy. |
--- EXAMPLE Every time both A and B modifies XYZ Mageploy uses UUID to refer to the same entity on different envs. As you know, UUIDs result from a (sometimes difficult or limiting) conversion. This is how it works now in extreme summary. For some entities it is not so simple to identify robust conversion algorithm; widgets suffer from this issue as you spotted out. Thus the idea of centralizing UUID generation: the first env which creates a new entity causes the centralized generator to generate a UUID for that entity. Let's see how the previous example works with centralized UUID generator: --- EXAMPLE When env B gets in sync and realizes that a new entity XYZ should be created it creates it and tells centralized generator which is its generated ID (32). Centralized generator saves the relation "B:32:8b7a0bf". At this point entity XYZ is mapped and can be identified by both A and B without any complicated (or limiting) ID conversions by simply querying the centralized UUID generator. This is the idea but I like to hear feedback from anyone. |
One more thing: the idea a centralized generator is based on the need to avoid collisions.
if it is viable we can get rid of centralized generator; |
For example we could use the sha1 hash of microseconds timestamp + local entity ID + system IP. This should sufficiently avoid collisions. |
sounds good |
How would you do the tracking for widgets? There seems to be no field for a proper unique ID?
Or we use the title.
What happens if someone changes the title?
The text was updated successfully, but these errors were encountered: