[Developers] GUIDs considered harmful

Alec Flett alecf at metaweb.com
Fri Aug 17 16:49:52 UTC 2007


We're working on a couple different approaches to solving the problem:

1) The old ?id= syntax is still supported - and it is perfectly legal 
(and probably more common) to have escaped characters in the 
CGI-parameter section of the URL. If forums are barfing on either form 
(?id or not) then their URL parsing is busted, but it's probably less 
likely to bust with the "?id=" syntax, even if it is uglier.

2) There is a new '/topic/en' namespace - this is a managed namespace 
(currently managed by one or two Metaweb staffers) seeded initially from 
wikipedia. There are roughly 1 million keys in there, and we expect to 
add more soon. Jamie finished the bulk of the seed a few days ago.

This means that The Simpsons, in addition to being 
'#9202a8c04000641f800000000003ace2' can also be referred to as 
/topic/en/the_simpsons, as in
http://www.freebase.com/view/topic/en/the_simpsons

3) In the next 7 days or so, we'll be deploying a new version of the 
software where the "view/" url automatically looks stuff up in 
/topic/en, so The Simpsons will soon be available at:
http://www.freebase.com/view/the_simpsons

As a part of this update, MQL will also start trying to resolve all 
guids into /topic/en when returning. MQL requests themselves are going 
to start returning "/topic/en/the_simpsons" in the JSON result, rather 
than "#9202a8c04000641f800000000003ace2"

Note that other urls, like /view/filter, will still require a full path, 
as in /view/filter/topic/en/the_simpsons

4) All of that said, this solves the general problem for topics that 
exist in the managed namespace /topic/en, but what about the others? I 
am a big fan of removing %23, but we have simply been more focused on 
the stuff in /topic/en over the last few weeks. I suspect we'll be able 
to remove the %23 reasonably soon.

We're actually trying to decide how far to go with this. For instance, 
It's going to be a long, long time before we have guids that *don't* 
begin with "9202a8c04000641f80" - we should have a way to remove much of 
that as well.. but once we drop that prefix, then there is the 
possibility of some ambiguity...what does '/view/deadbeef' resolve to?

Should we look that up in /topic/en, or should we assume it's 
"#9202a8c04000641f80000000deadbeef"? Fortunately we're only 0.25% of the 
way to guid #9202a8c04000641f80000000deadbeef :)

Alec

Will Moffat wrote:
> Dear Metaweb developers,
>
> I wrote a bookmarklet for injecting Freebase content into other websites.
> You can see its output on this Gaia-Online forum:
> http://www.gaiaonline.com/forum/viewtopic.php?t=31225865
>
> Unfortunately the links back to Freebase.com topics are broken. Gaia
> uses a redirect script that barfs on both '#' and the escaped form
> '%23'
>
> Could Freebase.com provide another entry point? Something like
> freebase.com/view/8411f1
> would be so much better than
> freebase.com/view/?id=%239202a8c04000641f80000000008411f1
>
> Of course, this would be less of an issue if we had human-readable
> IDs. Is this happening sometime soon? All the GUID stuff makes me feel
> like I'm editing a Windows Registry . Takes the fun out of Freebasing
> ;-)
>
> regards,
> --Will
> _______________________________________________
> Developers mailing list
> Developers at freebase.com
> http://lists.freebase.com/mailman/listinfo/developers
>   



More information about the Developers mailing list