Redirection Engine for USGIN-Compliant URI Resolution

A common problem we run into is the unique identification of resources. This is a very broad statement because it represents a very broad problem. We have identification schemes for all kinds of things: people have names, web pages have URLs, books have ISBN numbers, etc. For the USGIN system to work smoothly, we need an identification scheme for resources that are part of the network. In USGIN we use Universal Resource Identifiers (URIs) which follow a specific format. For more information about the format, and for more background, see this post on lab.usgin.org.  

Once we have this identification scheme built, it is important that the URIs can be dereferenced, or in other words that they are resolvable. We would like a user to be able to put the URI of a particular feature into the address bar of their web browser, push enter, and be presented with some sort of representation of their resource of interest. This is the niche that our Django-based redirection engine it trying to fill.

Basically, the engine recognizes USGIN URIs, and redirects them to an appropriate URL. This is a very straightforward process, and it can be done in any number of different ways. The benefits of setting this up as a Django app are:

  • Django's database backend allows for easy maintenance of a registry that may contain a large numbers of redirections.
  • The Django App can be easily distributed across multiple servers, allowing others to easily provide a service that resolves USGIN URIs.
  • Django's flexibility allows the engine to provide a basic representation of non-information resources that may otherwise have no web-accessible representation. 
  • Using a framework like Django allows users to make changes to the server's redirection rules without having to adjust HTTP Server config files, as you would in order to implement a similar system using Apache's mod_rewrite.
  • The engine conveniently allows you to configure the server to negotiate appropriate content-types. That is, it listens to the accept header in the incoming request, and responds with an appropriate representation of the resource, if available.
While I built the engine specifically for USGIN-specific URIs, it was easy to generalize it for any http-based URI scheme. Preliminary versions of both are available on GitHub (https://github.com/azgs/uriresolve) and can be downloaded below.
Once you've downloaded the Django App, follow the instructions to install the app into an existing Django project. If you need help setting up a Django project, you might read this post I made earlier.