User:Amc1/peer id

From AzureusWiki

Jump to: navigation, search

This is mainly a note to myself.

Given that I rewrote the entire logic for peer ID decoding, I've decided that the best style of peer ID is a combination of Azureus style of peer format, Shad0w style of mapping ASCII to version components and Whallop's style of having three version components plus one mnemonic.

I like Az style because it stands out more, it is much more easy to determine whether a peer ID is Az style or not ('-' character at byte 0 and byte 7). It also gives two components for client identification, which feels a lot better than Shadow's one letter.

I like Shadow's style of numbering because you can say, quite clearly, that one byte represents one version component. That's very clean rather than having Az's ambiguous style (2500 -> 25.00? 2.5.0.0? 2.500? 250.0?)

I like Whallop's style of having a mnemonic at the end too. Alpha, beta, dev, release - nice. :)

In fact, my ideal peer ID format is what Whallop uses, except that I prefer to use ASCII for the version numbers rather than the byte value as an integer (since its more readable and doesn't require encoding).

Not that I'm ever going to be in a position to come up with my own peer ID scheme...

Example: -AC2B1b-123456789012 (client is AC, version is 2.11.1, it is a beta release)

OK, maybe that's not the most readable, since it's not clear that the first 'B' is a version component and the last 'b' is a mnemonic. But if you don't allow components to go past 9, then it's still readable. More importantly, it's much more straight forward to parse, since you know what the version format is.

Of course, it looks like a normal Az peer ID, so you can't make that assumption at all...

Alright, here's attempt two:

Example: [AC251b]123456789012

We could change the delimiters to make it clear it is my own completely unused style. I think that maybe we should just put a space if it's a release, rather than r - makes it a bit more straight forward, people understand v1.2a and v1.2b, but v1.2r is confusiing.

Of course, people might not want to use the same number of version components, so here's some alternatives I've been thinking about.. [AC21 b]2.1 beta

[AC23 ]2.3

[AC3024]3.0.2.4

[AC302b]3.0.2 beta

The only thing which will look strange is if you only use one version component and a mnemonic: [AC3 b]3 beta

But who does that? :)

Personal tools