[Cubicweb] About cwuri

Sylvain Thénault sylvain.thenault at logilab.fr
Wed Feb 12 16:55:54 CET 2014

On 12 février 16:25, Nicolas Chauvat wrote:
> Hi,
> On Wed, Feb 12, 2014 at 03:51:36PM +0100, Aurélien Campéas wrote:
> > `cwuri`
> >   Reference URL of the entity, which is not expected to change.
> CWURI was introduced during a sprint back in 2009. Another object born at
> about the same time is ExternalUri (see cube datafeed).
> The goal was more or less to handle local copies of remote data, while
> keeping the "true" location of these copied objects, in order for
> example to be able to refresh the data regurlarly.
> Hence, the fact that when creating new objects in the database, you
> initialize their cwuri to something like base_url+xyz is not the key
> point.
> Remark: please let us keep in mind that URIs *are* the global unique
> keys of the distributed database that is called the web of data. Easy
> manipulation of URIs is a required feature for CubicWeb to be called a
> *semantic* web framework. But maybe there is a better solution than
> cwuri...

there has been some discussion about that on the list, though unfortunatly
google doesn't seems to index the whole archive list.
http://lists.cubicweb.org/pipermail/cubicweb/2010-January/000161.html may be of

Anyway I agree cwuri is currently far from satisfying. We should define what we
expect/nee for both local and distant (cached) entities and see if it fits cwuri
or not.

I've been thinking recently that what could be nice about local entities would
be to have a 'canonical path' attribute, relative to the base url. When the
entity is accessed from another url, we should raise 303 using the canonical
url. In its current form, cwuri is indeed useless/painful for local entities.

Still, we need something for distant entities and iirc datafeed use cwuri as
foreign key. Valid usage but probably not matched by the 'cwuri' name...

Sylvain Thénault, LOGILAB, Paris ( - Toulouse (
Formations Python, Debian, Méth. Agiles: http://www.logilab.fr/formations
Développement logiciel sur mesure:       http://www.logilab.fr/services
CubicWeb, the semantic web framework:    http://www.cubicweb.org

More information about the Cubicweb mailing list