RE: Uniquely identifying instances

On Saturday, June 30, 2018 11:50 AM, Lorenzo Moriondo wrote:
> Client and server may need to uniquely identify an instance to keep track of its
> updates and possibly updated relations, but since now the only way to address an
> instance on the server is to use its primary key as generated by the SQL database
> underneath; this may obviously lead to confusion if a pk is dropped and later
> readded assigned to a different instance. Also for synchronisation purposes between
> relations stored in the server and in the client, this may be relevant.
> We are discussing the problem here: https://github.com/HTTP-APIs/hydrus/issues/215

Typically you never re-assign a primary key for pretty much the same reason. Any specific reason why you can't simply ensure that it isn't reassigned? The most trivial solution I can think of in case you can't simply store the last ID you assigned is to pair each ID with a timestamp to make it unique.


> What do you think about? This may be defined at spec-level instead of left to single implementations?

The semantics of an identifier shouldn't change.. otherwise pretty much all bets are off.


Cheers,
Markus



--
Markus Lanthaler
@markuslanthaler

Received on Monday, 2 July 2018 19:09:37 UTC