[Mulgara-dev] Problem with the local scheme.

Life is hard, and then you die ronald at innovation.ch
Mon Jul 9 12:57:17 UTC 2007


On Mon, Jul 09, 2007 at 08:50:43PM +1000, Andrae Muys wrote:
> 
> Well I have just finished spending an annoying day working on  
> cleaning up the model name resolution code - it really is amazing  
> just how much redundancy and ad-hoc code there is currently  
> implementing this.
> 
> Good news is that at the end of the day I should be deleting lots of  
> code.
> 
> Bad news is that to do it I am going to run into backwards  
> compatibility issues.
> 
> The current issue that I need to raise here, are concerns with the  
> 'local' scheme.  Currently we support 'local' and 'rmi', where rmi is  
> used for any remote reference, and local is available when mulgara is  
> embedded within another application.
> 
> At the moment the local scheme is used as an opaque URI  
> (local:database#model) - unfortunately opaque URI's cannot contain a  
> query string, so they cannot be used to reference View or Relational  
> resolver definitions (?def models).

When you say opaque URI's can't contain a query string, I presume
you're talking about Java's URI class? Hmm, yes, that doesn't parse
the query unless it thinks the scheme follows the generic uri format.

> Fixing this will affect any  
> existing code that uses the 'local' scheme.  Specifically to convert  
> the current approach to use hierarchical URI's will require  
> converting all references:
> 
> from 'local:database#model' to 'local://database#model'

Maybe a typo, but this doesn't look right: it should be

  local:/database#model

or

  local:///database#model

(well, you can define // to mean anything you want since you're
defining the scheme, but it would be far more consistent with existing
schemes and I think less surprise to users to use the "path" as the
database specifier).

> This email is to ask if there are any objections to this change?

Not from us. We already use local:///database because we ran into
some problems with the local:database form.


  Cheers,

  Ronald




More information about the Mulgara-dev mailing list