[Mulgara-dev] db-uri/model-uri matching
Alex Hall
alexhall at revelytix.com
Tue Apr 15 15:28:04 UTC 2008
Life is hard, and then you die wrote:
> The requirement that the model-uri's be "compatible" with the db-uri
> is becoming more and more annoying for us. We're using the new
> 'Connection' API's, not ItqlInterpreterBean, so in theory from a
> client perspective the db-uri and model-uri don't need correlation.
> But there's still
> org.mulgara.resolver.CreateModelOperation.verifyGraphUriIsRelative
> which is requiring the two to be related. I'd basically like to get
> rid of this check.
What precisely is the format of the model URI's you would like to use?
The create operation does allow for non-relative URI's, as long as they
are opaque (e.g. "urn:model:12345"). I am using model URI's of this
form with the Connection API and everything works fine.
> I've briefly talk to Paul privately about it, but what are other folks
> opinions? I guess it might let folks create bad model-uri's if they're
> still using ItqlInterpreterBean.
I'm not fundamentally opposed to allowing non-opaque model URI's that
are not relative to the server URI, but we should be careful about doing
so. Disabling the check altogether would allow you to do something
silly like create a model called "rmi://host-a/server1#foo" on a server
located at rmi://host-b/server1. Since an iTQL client with no initial
context will attempt to use the model URI as a locator, it would attempt
to resolve a query against this model against the wrong server. Granted
the same client would not be able to resolve a query against an opaque
model URI either, but I would rather have no results than (potentially)
incorrect results.
Alex
More information about the Mulgara-dev
mailing list