[WF-Infra] Re: [WF-General] System wide unique ID's proposal

Bryce Harrington bryce at neptune.net
Sat Oct 27 14:37:20 PDT 2001

On Sat, 27 Oct 2001, Philippe Jadin wrote:
> Hello,
> As we all noticed, broken links are a constant problem when refering to
> content on worldforge servers. Someone moved a page, an image has been
> renamed, the irc logs have moved to another server, ... (well it's a
> problem on every site of course)
> For example : what will happen when moria.mit.edu:8080/wf will become
> worldforge.org ? This will be a pure (I really mean "pure") mess ;-). Of
> course we can use relative links, but what happens when a page is moved,
> because it makes more sense?

We had gone through this when we changed from altima.org to
worldforge.org.  At that time we took care to make all the links
relative.  It would surprise me greatly if this were a problem in the
zope site.

But that's not to detract from the good ideas in this post...
> So, I'd like to introduce a simple idea that would help keeping those
> links working.
> Every element we can link to should have a unique ID. This ID would be
> independant from the physical location of the element. This way, an
> element can be moved to another location, or it's server may change it's
> url without problem.

Okay, this is getting *eerily* similar to how Eidetic manages articles.
I'll explain below:

> 1. The unique ID
> I thought that it would be a good idea to add a prefix to the unique id,
> depending on the nature of the content :
> - Web pages (zope) : web-xxxxxxxx (generated by zope)
> - RT tickets : rt-xxxxxx (using existing tickets numbers of course -
> generated by postgresql)
> - Media : media-xxxxxxx (generated by the media repository -> same
> system as for webpages)
> - IRC logs : irc-xxxxx (either a date or a bookmark I guess. Any other
> idea ?)
> - News item : news-xxxxxx (either from eidetic or zope)
> - Forum thread : forum-xxxxxxx (when there will be one for discussing
> media needs for example)

Articles in Eidetic are stored as flatfiles, but there is a 'metadata'
entry in the database associated with them.  Each and every article
receives a unique id number when it is added to the system.

One of the pieces of the metadata is an "Article_type" field.  A
separate table holds all of the various article types.  New types can be
added dynamically.  

Articles are rendered into html flatfiles by the build system, so that
you can have simple, "clean" hyperlinks and so the website "appears" to
be all static HTML (nice for performance).  However, underneath
everything is dynamically generated, and any article can be
programmatically found by doing a query or search in Eidetic.  Once you
know the ID # of an article, you can find it regardless of what file
system path it appears to be in.

[Having the article "split" between database and file system feels kinda
funky to me and I worry about its maintainability, but the amount of
flexibility I gain is very cool, so I'm going to continue with this

> 2. How to use it?
> In our webpages, we would put something like :
> <a href="/link?id=web-123456">Link to web page 123456</a>
> This could even be : 
> <a href="web-123456">Link to web page 123456</a>
> ... if we added a custom handler for 404 in zope (it's a possibility
> we'll need to test)

In Eidetic the syntax is:
<a href="eidetic.cgi?modulename=articles&on=123456">Link to web page</a>

> There would be also a search system that would gives you the right page
> (or element) simply by typing the id in a search box.

Eidetic has a search capability for the metadata.  You can do searches
against any of the parameters in the metadata fields - title, author,
topic, summary, or filename.  Wildcards are permitted to.  Later I
intend to add searching based on date ranges of created or last

> In discussions, we could refer to anything easily:
> <Billy> Hey Joe, look at my new media : www.worldforge.org/media-123456
> <Joe> Looks nice, Billy ;-)

With Eidetic, you can either access through ID #'s or by a static URL or
via a search on title...

<Billy> Hey Joe, look at my new media!
Joe does a search on "Billy", sorted by last modified date and sees.
<Joe> Looks nice; I see you did a dragon yesterday, too!  Wow.
> What do you think of this idea|id ? (or sould I say id|idea...)

Well of course I think it's a great idea, because I implemented it this
way in Eidetic already!  ;-)

Catch me on IRC and I can give demos.  


More information about the Infra mailing list