On Tuesday, July 30, 2013 02:38:28 PM Steve Dougherty wrote: > At p0s' request here's some information about how Infocalypse currently > uses WoT. > > Infocalypse sets a "vcs" context on identities when they create a > repository, and inserts a list of repositories under the identity's > subspace at /vcs/.
"VCS" as in "Version control system" is a general term and hg/Infocalypse for sure is not the only one. I think you should use "Infocalypse" as context name and as part of the URI. This would be coherent with "Freetalk" as Freetalk context name and URI subspace and "WebOfTrust" as WOT subspace. > To do this it uses the insert URI from > GetOwnIdentities. It also checks for a Freemail context before trying to > send something from the identity. Fine. > To find local identities it performs its own parsing on the > GetOwnIdentities response to find them by enough of the nickname and > identity ID to be unambiguous. Fine. > To find remote identities it first > attempts to use LessCrappyWebOfTrust's support for > GetIdentitiesByPartialNickname. [0] If that fails, it looks for an exact > identity ID with GetIdentity. At first look (and this is important, there is a second look below as well), this does not sound fine. The primary key for an identity, i.e. the primary object which identities it uniquely, is the ID. You should store identities by ID and identify them by ID. NOT by nickname. You can then just include the ID in the "Infocalypse address" of the identity similar to Freetalk: Freetalk does "<nickname>@<identity-id>.freetalk". Where do you get the nicknames from? The source where you get them from should provide you with the ID. And WOT itself should be the source of remote identities: For example with Freetalk, we want to receive messages from everyone, so we obtain all identities with positive score (= positive rating "you are not a spammer") by using GetIdentitiesByScore with chosing positive score as filter. HOWEVER there is the second look: I suppose version control does NOT imply fetching stuff from ALL identities which have a positive score from WOT. I suppose the user selects a few identities to fetch from. How do you obtain the list of identities which you offer the user to chose from? You should use GetIdentitiesByScore with positive score filter (and context filter "Infocalypse", I think it supports that as well). Where do you present him with the list? Ideally, the UI which shows the list should pass through the ID so you don't have to filter by nickname. But I guess you might be using command line only so the user needs to be free to pass nicknames without ID? In that case, I should probably implement "GetIdentitiesByPartialNickname". I think such a function is mandatory for WOT anyway: There can be multiple identities with the same nickname but the UI needs to display unique nicknames. The de-facto solution for that is to amend the nickname by including "@<part of identity ID long enough to make it unique>". Freetalk does this already in its own code. Instead WOT should compute those amended nicknames and store them. They would also be suitable as Freemail addresses. > It also checks that Freemail recipients > have a Freemail context. Good. > It would be useful to publish a property containing the edition of the > repository list. A property would allow that information to propagate > through WoT, instead of boostrapping by fetching edition 0 and storing > the latest known edition. Using a property is currently not practical > because setting any property triggers a trust list insert. There is a > bug for this. [1] I will take care of implementing this in ~1 month I suppose. It is a suitable optimization for doing after event-notifications, and event-notification will take up the month. Thank you. > > [0] > https://github.com/tmarkus/LessCrappyWebOfTrust/blob/master/src/main/java/pl > ugins/WebOfTrust/fcp/GetIdentitiesByPartialNickname.java#L25 [1] > https://bugs.freenetproject.org/view.php?id=5789