You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xindice-dev@xml.apache.org by "Vladimir R. Bossicard" <vl...@apache.org> on 2002/12/27 11:01:26 UTC
Xindice configuration
Hi all,
glad to see some posts on the ml. Apparently you have survived the XMas
dinner :-)
As you know, I started to look at the configuration of Xindice. Well,
here's where I am (in my local cvs, of course).
- the embed driver is now configured via the setProperty method (the
entire configuration is passed as a String). This method is defined in
the xmldb.Database interface but never really used (except in the
CommonConfigurable class). This solution solves the ugly
"System.setProperty" fix I implemented some times ago. This is of
course not the ideal solution but until the XMLDB:API introduces a
method "init(...)", I think it's the best one.
- the XMLTools now loads the configuration file defined via the command
line arg. and passes it to the DatabaseImpl, which passes it to the
Embed driver (when the driver is created). But what about the XMLRPC
driver? Currently the XMLRPC driver only has a server-side
configuration file, but no client-side. Looking at the xmlrpc driver I
think it could take advantage of some client-side configuration too
(like specifying the default port).
- it's obvious that the xmlrpc driver must have different configuration
files for the client and the server (for security reason). For example,
the server conf. file could contain additional rpc classes (like the
Grep.java class).
To summarize, I think that each driver should have a client and/or a
server configuration file(s). It's up to the driver's developer to
decide his strategy.
What we will gain:
- more flexibility
- better understanding since every driver will now have to document it's
client and/or server-side configuration files.
Thoughts?
-Vladimir
--
Vladimir R. Bossicard
Apache Xindice - http://xml.apache.org/xindice
Re: Xindice configuration
Posted by "Vladimir R. Bossicard" <vl...@apache.org>.
> Isn't the centralized configuration management simplified in the Xindice
> world by using the system.xml file? I mean, isn't that the place where new
> or extended configuration information should go?
the system.xml file _is_ the place for the configuration of Xindice. No
question about that.
The first problem is that the embed driver also needs this configuration
and we had no clean way to pass the configuration file to the
DatabaseImpl class. First a global variable was used (one of the
ugliest thing I ever programmed) and now the setProperty method could be
used. This is a much cleaner way, but now that we use the setProperty
for the embed driver, couldn't we also use if for the xmlrpc driver (and
pass some client-side configurations)? In that case, we wouldn't pass
the system.xml file but another (optional) configuration file.
To understand how I go there, simply try to remove the
System.setProperty(Xindice.PROP...) I used to pass the system.xml file
to the embed driver. You'll see what I mean.
> I am thinking about adding some more config information there regarding the
> xmlrpc server (which I'll post when I have something ready).
Thank you for giving me arguments :-)
The additions you're about to do are only valid for the xmlrpc driver.
So if we have more drivers (webdav, xmlrpc-ssl, jmx) chances are that
they all will need additional configuration values.
Question is: how to organize them?
Every driver into one file:
<root-database...
<drivers>
<driver name="xmlrpc">
...
</driver>
<driver name="xmlrpc-ssl">
...
</driver>
</drivers>
or one file per driver:
xmlrcp-system.xml
<root-database...
<prop1...
<prop2...
What would you prefer?
-Vladimir
--
Vladimir R. Bossicard
Apache Xindice - http://xml.apache.org/xindice
RE: Xindice configuration
Posted by Dave Viner <dv...@yahoo-inc.com>.
Isn't the centralized configuration management simplified in the Xindice
world by using the system.xml file? I mean, isn't that the place where new
or extended configuration information should go?
I am thinking about adding some more config information there regarding the
xmlrpc server (which I'll post when I have something ready). Should I
pursue a configuration style other than adding more lines into the
system.xml file?
dave
-----Original Message-----
From: Vladimir R. Bossicard [mailto:vladimir@apache.org]
Sent: Friday, December 27, 2002 4:47 AM
To: xindice-dev@xml.apache.org
Subject: Re: Xindice configuration
> Does this mean that a configuration file must be explicitly passed on
> the CLI or is there a default value?
No, but it can. Currently the embed driver _requires_ (AFAIK) a
configuration file to be explicitely passed.
> if we have to configure the driver we lose in usability
well I'm not convinced about that. If you look at the users-ml, the
users have a hard time configuring xindice for their needs. How many
users complained to not know where their database was created?
> I see the point, but I'm not sure that I like this total anarchy. I
> might agree that each driver developer might specify her own
> configuration file format, but in the end there must be some sort of
> centralized configuration management system.
"total anarchy" is not how I would caracterize the proposed solution.
Xindice has currently 2 drivers: one requires a configuration file on
the CLI and the other one not. On the opposite, the xmlrpc driver needs
a configuration on the server side.
I think a good test would would be to develop the webdav driver and see
what kind of configuration we need.
I'm not opposed of going with default values, but I want to at least
give the user some configuration options (which is not case at the moment).
-Vladimir
--
Vladimir R. Bossicard
Apache Xindice - http://xml.apache.org/xindice
Re: Xindice configuration
Posted by "Vladimir R. Bossicard" <vl...@apache.org>.
> Does this mean that a configuration file must be explicitly passed on
> the CLI or is there a default value?
No, but it can. Currently the embed driver _requires_ (AFAIK) a
configuration file to be explicitely passed.
> if we have to configure the driver we lose in usability
well I'm not convinced about that. If you look at the users-ml, the
users have a hard time configuring xindice for their needs. How many
users complained to not know where their database was created?
> I see the point, but I'm not sure that I like this total anarchy. I
> might agree that each driver developer might specify her own
> configuration file format, but in the end there must be some sort of
> centralized configuration management system.
"total anarchy" is not how I would caracterize the proposed solution.
Xindice has currently 2 drivers: one requires a configuration file on
the CLI and the other one not. On the opposite, the xmlrpc driver needs
a configuration on the server side.
I think a good test would would be to develop the webdav driver and see
what kind of configuration we need.
I'm not opposed of going with default values, but I want to at least
give the user some configuration options (which is not case at the moment).
-Vladimir
--
Vladimir R. Bossicard
Apache Xindice - http://xml.apache.org/xindice
Re: Xindice configuration
Posted by Gianugo Rabellino <gi...@apache.org>.
Vladimir R. Bossicard wrote:
> - the XMLTools now loads the configuration file defined via the command
> line arg. and passes it to the DatabaseImpl, which passes it to the
> Embed driver (when the driver is created).
Does this mean that a configuration file must be explicitly passed on
the CLI or is there a default value?
> But what about the XMLRPC
> driver? Currently the XMLRPC driver only has a server-side
> configuration file, but no client-side. Looking at the xmlrpc driver I
> think it could take advantage of some client-side configuration too
> (like specifying the default port).
It sure would (the port can be overridden actually, the real problem is
the endpoint that must be /Xindice). But I'm not sure that this is a
good thing: if we have to configure the driver (this is true for any
driver, actually), we lose in usability, and I'm not that much willing
to do that. Maybe a simple set of properties might do the trick, but I
don't really want to go much further than that.
> To summarize, I think that each driver should have a client and/or a
> server configuration file(s). It's up to the driver's developer to
> decide his strategy.
I see the point, but I'm not sure that I like this total anarchy. I
might agree that each driver developer might specify her own
configuration file format, but in the end there must be some sort of
centralized configuration management system (which is one of the many
reasons why I'm +1000 to stick Avalon in).
Ciao,
--
Gianugo