Re: [Specifications] Semantics to define constraints and/or globally unique ids

My 2ยข on this

- Making the structure of IDs *contractual* between the client and the server is strengthening the coupling between them, which sounds like a bad idea in a hypermedia system.

- In my experience, embedding semantics in IDs always comes back later to bite you when your system evolves (e.g., when you decide to add one field to your objects, which participates to their identity). That's why, in RDB, most people use auto-incremented opaque identifiers.

- A better way for the client to discover the ID of an object would be, IMHO, to *query* the server for that object based on functional dependencies. E.g.: find the book with ISBN 123456 ; find all sensors on network X with serial number Y. That way, the client does not have to know how the server generates ID, and the server does not have to commit forever to a given way of generating IDs. All the server has to do is to provide the "search" functionality described above.

-- 
GitHub Notification of comment by pchampin
Please view or discuss this issue at https://github.com/HydraCG/Specifications/issues/168#issuecomment-404415370 using your GitHub account

Received on Thursday, 12 July 2018 07:24:02 UTC