[ckan-dev] dataset urls

David Raznick kindly at gmail.com
Tue Apr 24 22:26:00 UTC 2012


On Tue, Apr 24, 2012 at 7:52 PM, Rufus Pollock <rufus.pollock at okfn.org>wrote:

> On 24 April 2012 15:32, David Raznick <kindly at gmail.com> wrote:
> >
> >
> > On Fri, Apr 20, 2012 at 1:50 PM, Rufus Pollock <rufus.pollock at okfn.org>
> >
> >
> > My take on this is that we should just have a slightly less ugly
> permanent
> > url based off the uuid.  This would look like something base64 encoded
> and
> > have a one to one mapping with the uuid.  I have not worked out the
> mapping
> > yet but as uuids are in hex you could get them shorter and without the
> > hyphens. So the url would be /dataset/~afdXZz34rfdsafewrA.
>
> At best you can get from 36 characters to ~20:
>

I think we can actually make it much shorter by only taking part of the
uuid.  We could very simply check for collision at dataset create time.

Also Toby had the idea of allowing /dataset/~afdXfds/the-name-or-whatever

The name part would be optional and meaningless but at least you can see
the name.


> <https://github.com/okfn/datautil/blob/master/datautil/id.py#L4>
>
> It's still terrible from a UX point of view [1].


I think its not a terrible as broken links.  It pretty bad UX to make name
changing *HARD* because the last thing we want to do is confront users with
with more choices then necessary.  They should not be forced to think
through the consequences of their actions and read some blurb as why its
bad if we can make it avoidable.

I certainly agree
> disqus identifier should run off pure id but don't think disqus_url
> should as I have said :-)
>
> rufus
>
> [1]: http://trac.ckan.org/ticket/2321
>
>
> > The other option in to readd an auto id column to the dataset table and
> use
> > that.  I still think we should keep the uuid though for harvesting
> purposes.
>
> Looking back I wouldn't use uuid's again unless we had to for some
> reason. I would certainly argue that related stuff and anything else
> should use auto-increment if at all possible.
>
> Personally I like uuids for join keys as they mean that you have to do
less round trips to the database when using them properly.  I think there
is nothing wrong with also having an auto id column for nicer urls.  We
could add them to resources too.

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20120424/74d34959/attachment-0001.html>


More information about the ckan-dev mailing list