Subject: [apps-discuss] [WF/SWD] about variable names in templates

From: Goix Laurent Walter <[email-masked]>
Date: Fri, 1 Jun 2012 11:39:36 +0200

Hi all,

I'd like to discuss the introduction of a new variable name to be defined in WF/SWD beyond the {uri} variable defined in RFC6415, in relation to the use of templates in xrd/jrd descriptors. This variable name should capture the username part only for more flexibility.

This is based on implementation experience for social network federation (ie server to server discovery) where large provider islands need perform discovery on many users of remote islands to discover some endpoints.

Currently in various implementations a first host-meta call is issued to discover the lrdd template, followed by the actual lrdd query for a specific resource. The host-meta of that domain is typically cached to save a call for the next user discovery, but a lrdd query is sent each time for a new user (the response for the specific resource can be cached to limit queries).
On the other hand most of the endpoints discovered through lrdd queries for different resources on the same domain share the same pattern.

The host-meta can typically already contain a number of templates (right now lrdd is clearly the most popular), but lrdd typically contains actual uris. It would be useful (up to the service provider policy of course) to inform the "client" (in this case the querying server) that a specific endpoint uri actually follows a pattern that can be used for any user of that domain (whenever applicable of course).
This could be already achieved for example by exposing such endpoints already in the host-meta using templates.

However currently the only template variable name defined is "{uri}", which gives very little flexibility to servers to create patterns. I'd like to get your feedback on the introduction in the WF draft of a new variable name related to the userpart only (eg. for "acct:[email-masked]", the userpart is "joe"). This could be "{uri.userpart}" or "{username}" etc  and would enable to express templates like:

<Link rel='http://schemas.google.com/g/2010#updates-from'
          template='http://example.com/activities/{uri.userpart}'
          type='application/atom+xml'/>
<Link rel='http://portablecontacts.net/spec/1.0#me'
          template= 'http://example.com/api/people/{uri.userpart}'/>

The client would thus know that this template is generalizable for other users. In case the single href is provided, the client would not know (and may not assume) that the actual url is built according to a specific pattern.

Walter
Questo messaggio e i suoi allegati sono indirizzati esclusivamente alle persone indicate. La diffusione, copia o qualsiasi altra azione derivante dalla conoscenza di queste informazioni sono rigorosamente vietate. Qualora abbiate ricevuto questo documento per errore siete cortesemente pregati di darne immediata comunicazione al mittente e di provvedere alla sua distruzione, Grazie.

This e-mail and any attachments is confidential and may contain privileged information intended for the addressee(s) only. Dissemination, copying, printing or use by anybody else is unauthorised. If you are not the intended recipient, please delete this message and any attachments and advise the sender by return e-mail, Thanks.

Rispetta l'ambiente. Non stampare questa mail se non ? necessario.