Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [stellation-res] Location option

On Mon, 2002-12-30 at 12:49, Jonathan Gossage wrote:
> I have some conceptual problems with the CLI "location" option. I find the
> syntax is arbitrary and somewhat painful. It forces order dependencies in
> the constituent parts and depending on the target the order of the parts
> changes. It is also a little ugly to parse in code.
> 
> I would like to suggest that this option be replaced by a set of options,
> one for each of the parts. Thus you would wind up
> with --host, --port, --protocol and --dbname options. Since in most cases
> only one of these options needs to be specified, (the defaults are
> sensible), the user interface is simplified.

I agree that the current locations are really pretty ugly, and we should
really do something to clean them up.

My main concern is adding too many options for overlapping things. The
original reason for the location string was that different databases
need different information to identify a local database; and we may add
different protocols, each of which might need different information to
establish a connection. To cover all of this potentially explodes the
number of options, and the kinds of checking that needs to be done to
ensure that the set of options provided don't conflict in any way.

One alternative would be to switch to using URLs. That gets rid of a lot
of the arbitrariness of the locations, and Java has builtin support for
parsing URL format stuff in java.net.URL, so it gets rid of the parsing
issue.

	-Mark

> If there is consensus on this proposal, I would implement this as part of
> the work I am doing on Firebird.
-- 
Mark Craig Chu-Carroll,  IBM T.J. Watson Research Center  
*** The Stellation project: Advanced SCM for Collaboration
***		http://www.eclipse.org/stellation
*** Work Email: mcc@xxxxxxxxxxxxxx  ------- Personal Email: markcc@xxxxxxxxxxx




Back to the top