[OpenSER-Devel] [ openser-Patches-1927301 ] add SQL support to dbtext
SourceForge.net
noreply at sourceforge.net
Tue Apr 22 10:31:39 CEST 2008
Patches item #1927301, was opened at 2008-03-27 10:32
Message generated for change (Comment added) made by nobody
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=743022&aid=1927301&group_id=139143
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: tools
Group: ver devel
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Herman Sheremetyev (has207)
Assigned to: Henning Westerholt (henningw)
Summary: add SQL support to dbtext
Initial Comment:
Add SQL support to dbtext using a python module and integrate it into openserctl getting rid of the special case handling of dbtext. The dbtextdb python module is written in a generic enough way that it can be used by other tools as well or called from the command line directly (the way openserctl does it now).
----------------------------------------------------------------------
Comment By: Nobody/Anonymous (nobody)
Date: 2008-04-22 01:31
Message:
Logged In: NO
Regarding the dbtext - python dependency, this is not much of an issue
with a standard server where python is most likely available. The issue
with it, is that as far as I understand dbtext is mnostly useful on
embedded platforms, where python may not be available.
----------------------------------------------------------------------
Comment By: Henning Westerholt (henningw)
Date: 2008-04-22 01:20
Message:
Logged In: YES
user_id=337916
Originator: NO
Hi Daniel,
i think we discussed this previously some time ago.. Yes, moving this
rarely used modules into an extra package is definitely better then adding
just one more module deb.
Henning
----------------------------------------------------------------------
Comment By: Daniel-Constantin Mierla (miconda)
Date: 2008-04-21 10:39
Message:
Logged In: YES
user_id=1246013
Originator: NO
Hello Henning,
I guess there will be some religious discussions as with most of such
subjects ... but I think we should look at having openser-extra-modules
package that will bundle several of them, cause we are going to get too
many packages if we stick to keep one package to one (more or less)
dependency.
So with openser package to ship the common used modules, in openser-extra
to ship modules that have no extra dependency but are rarely used (imc,
flatstore, ...) or the dependency is found in most of the systems (like
this one with python).
----------------------------------------------------------------------
Comment By: Henning Westerholt (henningw)
Date: 2008-04-21 04:39
Message:
Logged In: YES
user_id=337916
Originator: NO
Hi Herman,
thank you for the update, i'll later look into this.
Daniel, i think that most people nowadays have python installed in a
standard server installation. But perhaps it makes sense to split the
db_text from the standard install anyway, even if the python argument don't
apply. Most people uses another database, or no DB at all, so this clutters
only the standard installation somewhat.
Cheers,
Henning
----------------------------------------------------------------------
Comment By: Nobody/Anonymous (nobody)
Date: 2008-04-17 04:49
Message:
Logged In: NO
Disclaimer: I don't maintain any official packages since I've been having
to make my own debs due to all the local patches I added.
That said, why would this cause dbtext to be moved into its own package?
Not that there's anything wrong with it, and the other db modules are
treated that way already, but adding a "Suggests: python-2.4" to the
package definition and updating module docs should do the trick IMO (and
should be done either way I suppose). This patch doesn't actually add any
extra dependencies to openser itself so asking people to install python in
the module README should probably suffice..
-Herman
----------------------------------------------------------------------
Comment By: Daniel-Constantin Mierla (miconda)
Date: 2008-04-17 04:41
Message:
Logged In: YES
user_id=1246013
Originator: NO
Hello,
we should have in mind that db_text module was included in the default
openser package, now it has to be shipped as a separate one, together with
the openserctl parts related to dbtext.
Daniel
----------------------------------------------------------------------
Comment By: Herman Sheremetyev (has207)
Date: 2008-04-17 04:18
Message:
Logged In: YES
user_id=808795
Originator: YES
Hi Henning,
I updated those 2 to apply to trunk. openserctl.dbtext just completely
replaces the one in the source tree (mine only defines the DB_QUERY
variable like the other openserctl.db files so should be easy enough to
merge even if there are conflicts). The openserctl patch is also pretty
straightforward and just removes a bunch of the dbtext-specific stuff. I
haven't actually tested that the finished product works since I'm not
running trunk code anywhere so please check that it's sane.
Cheers,
-Herman
----------------------------------------------------------------------
Comment By: Herman Sheremetyev (has207)
Date: 2008-04-17 04:13
Message:
Logged In: YES
user_id=808795
Originator: YES
File Added: openserctl-dbtext-openserctl-dbtext.patch
----------------------------------------------------------------------
Comment By: Herman Sheremetyev (has207)
Date: 2008-04-17 04:12
Message:
Logged In: YES
user_id=808795
Originator: YES
File Added: openserctl-dbtext-openserctl.patch
----------------------------------------------------------------------
Comment By: Henning Westerholt (henningw)
Date: 2008-04-15 03:49
Message:
Logged In: YES
user_id=337916
Originator: NO
Hi Herman,
i tried to merge your patches today, but run into some conflicts
(openserctl-dbtext-openserctl-dbtext.patch,
openserctl-dbtext-openserctl.patch). Perhaps you based your patches on the
1.3 version? It would be great if you could port this two patches to the
trunk version.
BTW, i like the integrated tests. :-)
Cheers,
Henning
----------------------------------------------------------------------
Comment By: Ovidiu Sas (osas)
Date: 2008-03-31 07:32
Message:
Logged In: YES
user_id=1395524
Originator: NO
Hi Henning,
When I was referring to the dbtextdb python module, I wasn't referring to
a new openser module, but to a python module just like Herman menntioned
:)
Regards,
Ovidiu Sas
----------------------------------------------------------------------
Comment By: Henning Westerholt (henningw)
Date: 2008-03-31 07:26
Message:
Logged In: YES
user_id=337916
Originator: NO
Hi Ovidiu,
i don't think its a complete DB module, like e.g. db_mysql. Its only an
interface for the control tools, allowing to use SQL statements in them,
removes the need for the text processing. But please correct me if i'm
wrong.
I don't think such a module would be a good idea, as we have already the
db_berkeley stuff for embedded system too. The only need for an SQL parser
in such a module would be the few raw queries in modules. And we better
should remove or work around them instead of integrating an SQL parser in
our code.
I'll want to wait for other opinions on this, then i can integrate this
later. But i will probably need some time..
Cheers,
Henning
----------------------------------------------------------------------
Comment By: Ovidiu Sas (osas)
Date: 2008-03-31 07:07
Message:
Logged In: YES
user_id=1395524
Originator: NO
Hi Henning,
Python seems to be available in most embedded systems. I will make sure
that the dbtextdb python module is available too.
If you have time to work on this and integrate it, please go ahead with
it.
Herman, can you provide more details about this new python module?
Documentation and download link?
Regards,
Ovidiu Sas
----------------------------------------------------------------------
Comment By: Henning Westerholt (henningw)
Date: 2008-03-31 06:59
Message:
Logged In: YES
user_id=337916
Originator: NO
Hi,
Ovidiu, i understand your concerns about the portability/ usage in
embedded systems. But the actual way of dealing with db_text is also not
really optimal. This patch has the potential to really decrease the
maintenance burden with this stuff, this will perhaps improve the time that
this code stays in the non-broken state.. ;-)
I would probably like to go with this patch, as i already considered a few
times to rewrite this whole control stuff in a more high-level language,
like the SER guys had done. Unfortunally i don't know that much about the
embedded space, how many people uses this at all on small machines, how
many don't have python available. So this needs to be discussed with actual
users..
Herman, perhaps you can bring this topic to the user list, asking for
embedded usage of OpenSER?
Let me know what you think,
Henning
----------------------------------------------------------------------
Comment By: Herman Sheremetyev (has207)
Date: 2008-03-27 12:58
Message:
Logged In: YES
user_id=808795
Originator: YES
If python is not available then openserctl won't work for updating the
tables. However, it's already fairly broken with the current setup (with
auto-increment added to dbtext in 1.3 openserctl/dbtext no longer works so
well). And since it requires special handling in openserctl it's in a
constant state of brokeness as the various patches are eventually added to
support this and that new feature. As aresult I'd wager most people using
dbtext just don't rely on openserctl at all. I've had to apply local
patches to it myself for the last year or so, finally resulting in getting
so frustrated with the massive changes 1.3 brought that I wrote dbtextdb.
For what it's worth I use dbtext on normal (non-embedded) machines in a
fairly large corporate setup. Perhaps if it's better supported by the
tools more people would opt to use dbtext over a 'real' db -- in the end
python dependency is still better than full-blown db dependency.
-Herman
----------------------------------------------------------------------
Comment By: Ovidiu Sas (osas)
Date: 2008-03-27 12:39
Message:
Logged In: YES
user_id=1395524
Originator: NO
I know about the openserctl db_text mess :)
db_text is mostly used on small or embedded systems when a real db is not
available or it is to heavy for the system. On this systems, python may or
may not be available ... this is my only concern ...
Regards,
Ovidiu Sas
----------------------------------------------------------------------
Comment By: Herman Sheremetyev (has207)
Date: 2008-03-27 12:25
Message:
Logged In: YES
user_id=808795
Originator: YES
It only adds a python dependency for openserctl when used with dbtext, not
openser itself. You can still run openser, with dbtext even, without
python. However the current implementation of openserctl with dbtext is
awful to put it mildly. There are special dbtext cases all over the
script, and the way the dbtext tables are updated is hardcoded so that if
the table structure changes you have to modify the script. dbtextdb makes
the dbtext tables accessible using the same SQL queries currently used for
MySQL and Postgres. IMO, installing python is a small price to pay to make
your dbtext tables manageable, and it's not like there aren't other modules
that have other external dependencies already.
----------------------------------------------------------------------
Comment By: Ovidiu Sas (osas)
Date: 2008-03-27 12:17
Message:
Logged In: YES
user_id=1395524
Originator: NO
This patch will create an extra dependency on python.
Right now python is not required to run openser.
----------------------------------------------------------------------
Comment By: Herman Sheremetyev (has207)
Date: 2008-03-27 10:38
Message:
Logged In: YES
user_id=808795
Originator: YES
File Added: openserctl-dbtext-openserctl-sqlbase.patch
----------------------------------------------------------------------
Comment By: Herman Sheremetyev (has207)
Date: 2008-03-27 10:37
Message:
Logged In: YES
user_id=808795
Originator: YES
File Added: openserctl-dbtext-openserctl-dbtext.patch
----------------------------------------------------------------------
Comment By: Herman Sheremetyev (has207)
Date: 2008-03-27 10:36
Message:
Logged In: YES
user_id=808795
Originator: YES
File Added: openserctl-dbtext-openserctl-base.patch
----------------------------------------------------------------------
Comment By: Herman Sheremetyev (has207)
Date: 2008-03-27 10:35
Message:
Logged In: YES
user_id=808795
Originator: YES
File Added: openserctl-dbtext-openserctl.patch
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=743022&aid=1927301&group_id=139143
More information about the Devel
mailing list