this post was submitted on 26 Nov 2023
756 points (96.8% liked)

Fediverse

17717 readers
3 users here now

A community dedicated to fediverse news and discussion.

Fediverse is a portmanteau of "federation" and "universe".

Getting started on Fediverse;

founded 5 years ago
MODERATORS
 

nerdica.net/photos/masimatutu/…

91 boosts and still going strong. Federation works, everyone!

@fediverse

you are viewing a single comment's thread
view the rest of the comments
[–] Dave@lemmy.nz 4 points 11 months ago (3 children)

It could just be a GUID. The community's host instance assigns a GUID (which by definition is unique in all GUIDs) and then when sending the post or comment out to federate to other servers it includes the GUID for the other instances to use.

[–] Knusper@feddit.de 9 points 11 months ago

I'm a massive fan of GUIDs, too, but you'd have no protection from rogue instances reusing GUIDs of existing posts...

[–] BeefPiano@lemmy.world 6 points 11 months ago

But I still need a host to know where to retrieve the comment from. A GUID on its own doesn’t help if my instance hasn’t seen that comment. So if there’s a host already on the comment id, why bother with an ugly long GUID?

[–] TWeaK@lemm.ee 5 points 11 months ago (1 children)

I don't think there's a need for a GUID, in fact it would be quite difficult - every instance would have to check with every other instance to ensure that the ID's are unique. Meanwhile, if we just have the federated host picking a number, then every other host uses that number followed by @hostinstance, we don't need cross-checking but still have unique ID's for everything.

For example, https://lemm.ee/comment/123456 would be a different comment to https://lemmy.nz/comment/123456 (as it is currently also), but the first comment could be found on the 2nd instance as https://lemmy.nz/comment/123456@lemm.ee.

[–] Dave@lemmy.nz 3 points 11 months ago (1 children)

every instance would have to check with every other instance to ensure that the ID’s are unique.

No they wouldn't, that's the point of a GUID - they are globally unique.

However, I've changed my mind. For the nice-URL factor, having @instance is better and provides extra info.

[–] TWeaK@lemm.ee 2 points 11 months ago (1 children)

But they can only be globally unique if each instance has its own range of unique ID's, otherwise they'll have to check with the other instances to make sure the GUID they want to use hasn't already been used. With new instances spinning up all the time you can't really manage this.

I agree that the @instance provides a little more info, and it fits nicely in line with how user profile and community URLs are handled.

There was also a github issue report about putting the title in the URL, like reddit does, but I think this goes too far - lemmy has the ability to change the title and putting the title in the URL would just confuse things or lead to exploits (eg you put naughty words in the title then change it afterwards, but the URL still has the original title).

[–] Dave@lemmy.nz 4 points 11 months ago (1 children)

GUIDs are globally unique because of maths and clocks not because of checking. When you generate a GUID you can be confident no GUID the same has ever been generated using that algorithm, ever, anywhere, and you don't have to check.

However, someone pointed out you could run a malicious instance that copies GUIDs from other instances and federates them out to deliberately cause issues, so this idea is out.

[–] TWeaK@lemm.ee 2 points 11 months ago

Ah fair, I guess I misunderstood GUID's.