Skip to content
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

Clearance among Name, Source Name, SourceIdentifier, ID, UUID #49

Open
jbkoh opened this issue Jul 12, 2017 · 4 comments
Open

Clearance among Name, Source Name, SourceIdentifier, ID, UUID #49

jbkoh opened this issue Jul 12, 2017 · 4 comments

Comments

@jbkoh
Copy link
Contributor

jbkoh commented Jul 12, 2017

There are currently four different 'names' of an entity in BuildingDepot as Name, Source Name, SourceIdentifier, ID, UUID (UUID is currently a combination of Type and Name.)

Do we have any clear definitions distinguishing those items? I think we just need one of them and a random string UUID.

@bbalaji-ucsd
Copy link

bbalaji-ucsd commented Jul 12, 2017 via email

@jbkoh
Copy link
Contributor Author

jbkoh commented Jul 12, 2017

I see. We'd better document this at some point.

Btw, what was the reasoning of putting this as columns instead of using Tags?

@joshuagluck
Copy link
Contributor

UUID is currently a combination of Type and Name as a part of Brick integration. An easy to understand label (Name) was needed to perform searches on, so that Users could potentially search through the Brick graph (e.g. the results would have meaningful names, not just random UUIDs).

We combined Type and Name (Type:Name) to provide additional description to these values, as well as to increase the size of the namespace (so you know the Brick type of whatever you're working with, at the very least, and you can name multiple different entities with different types the same thing, if you want, without it being a problem).

It was additionally decided we wanted to ensure that these Type:Name's were unique, to avoid redundant and extraneous sensors from being created (how do you know which one is the one you want, otherwise). Since Type:Name had to apply to every entity, and Type:Name had to be unique, there was no reason to generate a separate random UUID. No reason we couldn't have an additional random UUID, I just don't know what the point would be?

@jbkoh
Copy link
Contributor Author

jbkoh commented Jul 13, 2017

There are redundant information in those columns and I am trying to understand the differences. A user would have more difficulties. For example, you put "identifier" to both "source_name" and "source_identifier", which has no usage and is different from their original purposes that Bharath described. Another discomfort is that a user can't search a sensor with the name that the user provided as it vanishes with the combination of EntType. I do not think we need to combine EntType and user-given name for UUID but it'd better using the user-given name directly. The uniqueness requirement remains at the same level (I don't think people would use a same name for different EntTypes.) If we separate out Name and EntType from UUID, it will be clearer for a user while both information is reachable from anywhere else both through REST APIs and the web UI. I would suggest in the future

  1. a user provides UUID (or call "name"). If not given, generate a random string (standard UUID)
  2. other information is encoded as Tags (or in further future, no tags but edges.)

Removing redundancies and clearing up the usage will be more attractive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants