[ 
https://issues.apache.org/jira/browse/ARIA-165?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16004303#comment-16004303
 ] 

Ran Ziv commented on ARIA-165:
------------------------------

Several solutions for the node name's suffix have been proposed:

1) Shorter auto-generated IDs - The downside of which is that it's still less 
readable, and also that its probabilistic.
2) Using sequential IDs for nodes of a specific node-template (e.g. 
{{mynode_1}}, {{mynode_2}}, etc.) - Probably the clearest and most 
straightforward way, but it'd require storing additional information on the 
node-template's table.
3) Using the node IDs (e.g. {{mynode_20}}, {{mynode_52}}, etc.) - This would 
not require any additional information, keep node names unique, and be 
relatively straightforward, but might also seem a bit confusing as the IDs 
don't really represent the number of nodes a node-template might have. This is 
where what Maxim mentioned about SQLAlchemy's events mechanism comes into play 
by the way.
4) Finding the maximum suffix of existing nodes and increasing that value by 1 
- This is similar to (2), only that it doesn't require storing additional 
information - at the price of potentially having nodes with the same name as 
nodes which have existed in the past in the same service, which could happen at 
the event of a scale down of nodes followed by scaling back up.

As Maxim's mentioned, we've decided to go with (4) at this time. The downside 
doesn't seem too terrible since there's always the ability to differentiate 
between old and new nodes by their ID, and it allows for readability and 
clarity on the likely amount of nodes of a given node-template a service has 
had.


> Make node name suffix UUIDs become more readable
> ------------------------------------------------
>
>                 Key: ARIA-165
>                 URL: https://issues.apache.org/jira/browse/ARIA-165
>             Project: AriaTosca
>          Issue Type: Story
>            Reporter: Ran Ziv
>            Assignee: Maxim Orlov
>            Priority: Minor
>             Fix For: 0.1.0
>
>
> Node names are currently constructed of the node template name with a UUID 
> suffix. While this makes the node name unique across all services, it also 
> makes the node names less readable, and since nodes are already unique via 
> their ID, it might be better to use a different type of suffix.
> One option would be to generate a shorter, no capital letters string, which 
> would be more readable, and (in very high probability) unique in a single 
> service.
> Another option would be to go for a running number suffix for each node of a 
> given node template, which could be simple, unique and readable.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to