Question

I'm writing a desktop app using Gnome technologies, and I reached the stage I started planning Semantic Desktop support.

After a lot of brainstorming, sketching ideas and models, writing notes and reading a lot about RDF and related topics, I finally came up with a plan draft.

The first thing I decided to do is to define the way I give URIs to resources, and this is where I'd like to hear your advice.

My program consists of two parts:

1) On the lower level, an RDF schema is defined. It's a standard set of classes and properties, possible extended by users who want more options (using a definition language translated to RDF).

2) On the high level, the user defines resources using those classes and properties.

There's no problem with the lower level, because the data model is public: Even if a user decides to add new content, she's very welcome to share it and make other people's apps have more features. The problem is with the second part. In the higher level, the user defines tasks, meetings, appointments, plans and schedules. These may be private, and the user may prefer to to have any info in the URI revealing the source of the information.

So here are the questions I have on my mind:

1) Which URI scheme should I use? I don't have a website or any web pages, so using http doesn't make sense. It also doesn't seem to make sense to use any other standard IANA-registered URI. I've been considering two options: Use some custom, my own, URI scheme name for public resources, and use a bare URN for private ones, something like this:

urn : random_name_i_made_up : some_private_resource_uuid

But I was wondering whether a custom URI scheme is a good decision, I'm open to hear ideas from you :)

2) How to hide the private resources? On one hand, it may be very useful for the URI to tell where a task came from, especially when tasks are shared and delegated between people. On the other hand, it doesn't consider privacy. Then I was thinking, can I/should I use two different URI styles depending on user settings? This would create some inconsistency. I'm not sure what to do here, since I don't have any experience with URIs. Hopefully you have some advice for me.

Was it helpful?

Solution

1) Which URI scheme should I use?

I would advise the standard urn:uuid: followed by your resource UUID. Using standards is generally to be preferred over home-grown solutions!

2) How to hide the private resources?

Don't use different identifier schemes. Trying to bake authorization and access control into the identity scheme is mixing the layers in a way that's bound to cause you pain in the future. For example, what happens if a user makes some currently private content (e.g. a draft) into public (it's now in its publishable form)?

Have a single, uniform identifier solution, then provide one or more services that may or may not resolve a given identifier to a document, depending on context (user identity, metadata about the content itself, etc etc). Yes this is much like an HTTP server would do, so you may want to reconsider whether to have an embedded HTTP service in your architecture. If not, the service you need will have many similarities to HTTP, you just need to be clear the circumstances in which an identifier may be resolved to a document, what happens when that is either not possible or not permitted, etc.

You may also want to consider where you're going to add the most value. Re-inventing the basic service access protocols may be a fun exercise, but your users may get more value if you re-use standard components at the basic service level, and concentrate instead on innovating and adding features once the user actually has access to the content objects.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top