libopendbx-devel Mailing List for OpenDBX database access library (Page 38)
Brought to you by:
nose
You can subscribe to this list here.
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(2) |
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(20) |
Feb
(18) |
Mar
(2) |
Apr
(13) |
May
(6) |
Jun
(65) |
Jul
(32) |
Aug
(58) |
Sep
(60) |
Oct
(15) |
Nov
(7) |
Dec
(35) |
2009 |
Jan
(29) |
Feb
(2) |
Mar
(35) |
Apr
(20) |
May
(76) |
Jun
(50) |
Jul
(13) |
Aug
(35) |
Sep
(71) |
Oct
(20) |
Nov
(3) |
Dec
(37) |
2010 |
Jan
(11) |
Feb
(10) |
Mar
(33) |
Apr
(17) |
May
(4) |
Jun
(9) |
Jul
(19) |
Aug
(13) |
Sep
(9) |
Oct
|
Nov
|
Dec
(2) |
2011 |
Jan
(13) |
Feb
|
Mar
(12) |
Apr
(1) |
May
(22) |
Jun
(12) |
Jul
(34) |
Aug
(12) |
Sep
(7) |
Oct
(6) |
Nov
|
Dec
(1) |
2012 |
Jan
|
Feb
|
Mar
|
Apr
(2) |
May
(23) |
Jun
(7) |
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2013 |
Jan
|
Feb
(4) |
Mar
|
Apr
(1) |
May
|
Jun
(1) |
Jul
|
Aug
(1) |
Sep
(1) |
Oct
(18) |
Nov
|
Dec
|
2014 |
Jan
(6) |
Feb
|
Mar
|
Apr
(2) |
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
(8) |
Nov
|
Dec
|
From: OpenDBX d. l. <lib...@li...> - 2008-06-18 06:36:20
|
Hi Mariano > The idea was to match releases to changelogs. I mean, I would like to know > for a XXX version (release) the changelog associated with it to see the > bugs fixes or features it has. But I would like to have the history of all > of the releases not just the last. Each changelog block is for a specific release and in Changelog-devel you will find at least the releases in the 1.3.x series easily - they are in chronological order. > I tried to edit the page of the changelog > http://linuxnetworks.de/opendbx/download/ChangeLog-devel so that to put, in > the title, the number of version/release associated but I couldn't edit it. > It this autogenerated from somewhere? It's the same file which is part of the .tar.gz package. Regards, Norbert -- OpenPGP public key http://www.linuxnetworks.de/norbert.pubkey.asc |
From: OpenDBX d. l. <lib...@li...> - 2008-06-18 01:25:20
|
I installed Virtual Box with an XP. I will be trying OpenDBX this week. Just by curious, just as in linux you can give me your binaries in .rpm or .deb files, can you give me the dll for windows? or we must compile it by ourself? thanks, mariano On Mon, Jun 16, 2008 at 1:08 PM, OpenDBX devel list < lib...@li...> wrote: > Hi Mariano > > > I am trying to test openDBX in windows with MinGW. I have a simple > > question. Here > > (http://www.linuxnetworks.de/doc/index.php/OpenDBX/Setup/Manual_builds) > > says that we need to install MSYS base system, but there are lots of > > packages. Which of them do I need to install? > > I think it was only the "MSYS Base System" I've installed. > > Regards, > > > Norbert > -- > OpenPGP public key > http://www.linuxnetworks.de/norbert.pubkey.asc > > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php > _______________________________________________ > libopendbx-devel mailing list > lib...@li... > https://lists.sourceforge.net/lists/listinfo/libopendbx-devel > http://www.linuxnetworks.de/doc/index.php/OpenDBX > > |
From: OpenDBX d. l. <lib...@li...> - 2008-06-17 14:42:29
|
Hi everybody, First of all, I tried to do what I will propose right now but I couldn't. The idea was to match releases to changelogs. I mean, I would like to know for a XXX version (release) the changelog associated with it to see the bugs fixes or features it has. But I would like to have the history of all of the releases not just the last. I tried to edit the page of the changelog http://linuxnetworks.de/opendbx/download/ChangeLog-devel so that to put, in the title, the number of version/release associated but I couldn't edit it. It this autogenerated from somewhere? If there is something I can help you, just let me know. thanks, Mariano |
From: OpenDBX d. l. <lib...@li...> - 2008-06-17 13:16:34
|
On Tue, Jun 17, 2008 at 3:38 AM, OpenDBX devel list < lib...@li...> wrote: > Hi Mariano > > > Ok. I understand that I have to call odbx_init() and an associated > > odbx_bind() as many times as I need different (!) connections but I have > a > > question. I was just doing some proofs and I realize that if I do only > one > > odbx_init() a N odbx_bind() for the handle returned by odbx_init(), > openDBX > > doesn't return any error at all. > > That's true, the OpenDBX library doesn't tell you at the moment that it's > bad > what you are doing. This might be an area where it could be improved. Ok. It wasn't to complain, just to see if I understood. > > > Two things happened in your test: > Instead of having N connections you only have one you can use - the others > are > lost and aren't accessible any more. You can see it if you try to send two > separate queries and fetch the result of the first one afterwards. > Furthermore, you have created a memory leak as you can't free the memory > associated to the connections. For this you must call odbx_unbind() as > often > as you've called odbx_bind() but you will get an error after the second. > This > is because of the first reason above. > > > Indeed, there are N connections open to > > the database. Moreover, as I only do one odbx_unbind() there are N-1 > > connections that keep alive. Is this an error of OpenDBX ? I guess there > is > > a reason I can't see. > > Yes, you have N connections opened, but N-1 are lost. It's not an error of > OpenDBX but an application error. Simply don't do that :-) > Perfect. Now I have already understand how this works, I will add the validation to the Squeak plugin. > > > Supouse I (SqueakDBX) want to be sure my "client" or "user" don't do bad > > use of this, should I validate he call only once odbx_bind() per > > odbx_init() ? If fact, he can see it like an only one function like > > connectAndOpen(). > > I think, such a test should be part of the core library and you shouldn't > be > forced to think about that. > If you only provide one function for both, your users won't be able to > change > the options any more, so please expose them both. Sorry I always forget about the special options. The thing is that we are doing the plugin iteratively. So, first we are trying to do the base, and then, when this works, start with other things like options. > > > Regards, > > > Norbert > -- > OpenPGP public key > http://www.linuxnetworks.de/norbert.pubkey.asc > > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php > _______________________________________________ > libopendbx-devel mailing list > lib...@li... > https://lists.sourceforge.net/lists/listinfo/libopendbx-devel > http://www.linuxnetworks.de/doc/index.php/OpenDBX > > |
From: OpenDBX d. l. <lib...@li...> - 2008-06-17 06:39:20
|
Hi Mariano > Ok. I understand that I have to call odbx_init() and an associated > odbx_bind() as many times as I need different (!) connections but I have a > question. I was just doing some proofs and I realize that if I do only one > odbx_init() a N odbx_bind() for the handle returned by odbx_init(), openDBX > doesn't return any error at all. That's true, the OpenDBX library doesn't tell you at the moment that it's bad what you are doing. This might be an area where it could be improved. Two things happened in your test: Instead of having N connections you only have one you can use - the others are lost and aren't accessible any more. You can see it if you try to send two separate queries and fetch the result of the first one afterwards. Furthermore, you have created a memory leak as you can't free the memory associated to the connections. For this you must call odbx_unbind() as often as you've called odbx_bind() but you will get an error after the second. This is because of the first reason above. > Indeed, there are N connections open to > the database. Moreover, as I only do one odbx_unbind() there are N-1 > connections that keep alive. Is this an error of OpenDBX ? I guess there is > a reason I can't see. Yes, you have N connections opened, but N-1 are lost. It's not an error of OpenDBX but an application error. Simply don't do that :-) > Supouse I (SqueakDBX) want to be sure my "client" or "user" don't do bad > use of this, should I validate he call only once odbx_bind() per > odbx_init() ? If fact, he can see it like an only one function like > connectAndOpen(). I think, such a test should be part of the core library and you shouldn't be forced to think about that. If you only provide one function for both, your users won't be able to change the options any more, so please expose them both. Regards, Norbert -- OpenPGP public key http://www.linuxnetworks.de/norbert.pubkey.asc |
From: OpenDBX d. l. <lib...@li...> - 2008-06-17 06:24:56
|
Hi Hernán > "The library specification was also improved and doesn't allow the backends > to return errors any more if odbx_result() or odbx_row_fetch() is called > once more after they already > returned DONE." > > Is this available for ALL the backends?? What does it return instead, DONE > again? Yes, all backends should behave like this and return ODBX_RES_DONE and ODBX_ROW_DONE. There's a bug in FreeTDS 0.63 which prevents this from being done, so you have to use at least 0.64 when you are using the mssql backend and expect this to work. Before release 1.4.0 I also have to test the sybase backend if it conforms to the new policy. Regards, Norbert -- OpenPGP public key http://www.linuxnetworks.de/norbert.pubkey.asc |
From: OpenDBX d. l. <lib...@li...> - 2008-06-17 03:31:49
|
I'm sorry I continue with this thread but I am still having some questions. I ask you inside the mail. On Fri, Jun 13, 2008 at 10:12 AM, Mariano Martinez Peck < mar...@gm...> wrote: > > > On Fri, Jun 13, 2008 at 3:46 AM, OpenDBX devel list < > lib...@li...> wrote: > >> Hi Mariano >> >> > So, my question is, which are the costs (in time) associated with both >> > functions? I mean, for each user (user of the application, not database >> > user) that uses the web app I can't do a bind and an init or should I do >> an >> > odbx_init only once for ALL users and then do a single bind per user? >> >> You need to call odbx_init() and an associated odbx_bind() as many times >> as >> you need different (!) connections because each connections needs its own >> datastructures created by odbx_init(). >> > > Ok. I understand that I have to call odbx_init() and an associated odbx_bind() as many times as I need different (!) connections but I have a question. I was just doing some proofs and I realize that if I do only one odbx_init() a N odbx_bind() for the handle returned by odbx_init(), openDBX doesn't return any error at all. Indeed, there are N connections open to the database. Moreover, as I only do one odbx_unbind() there are N-1 connections that keep alive. Is this an error of OpenDBX ? I guess there is a reason I can't see. Supouse I (SqueakDBX) want to be sure my "client" or "user" don't do bad use of this, should I validate he call only once odbx_bind() per odbx_init() ? If fact, he can see it like an only one function like connectAndOpen(). Thanks for the help. Mariano > > You are wright. I forgot that. > > >> >> To speed things up in web environments it would be a good idea to have a >> pool >> of already open connections. They should be created when they are first >> requested and given back to the pool after the script is done. New >> requests >> can be satisfied from pooled connection if they use the same backend, >> host, >> port, database, username, password and bind method. There's one pitfall: >> Some >> options can only be changed between the odbx_init() and the odbx_bind() >> call >> and that wouldn't be possible any more. >> > > > Norbert: Thanks for the data and help, you give us not only for openDBX but > also for our personal problems. > Yes, we have already think about having a connection pool to do exactly > what you said. However we didn't realize about that pitfall. We will keep it > in mind. > > > > > >> >> Regards, >> >> >> Norbert >> -- >> OpenPGP public key >> http://www.linuxnetworks.de/norbert.pubkey.asc >> >> >> ------------------------------------------------------------------------- >> Check out the new SourceForge.net Marketplace. >> It's the best place to buy or sell services for >> just about anything Open Source. >> http://sourceforge.net/services/buy/index.php >> _______________________________________________ >> libopendbx-devel mailing list >> lib...@li... >> https://lists.sourceforge.net/lists/listinfo/libopendbx-devel >> http://www.linuxnetworks.de/doc/index.php/OpenDBX >> >> > |
From: OpenDBX d. l. <lib...@li...> - 2008-06-17 02:53:36
|
Hi, First of all, congrats for the new release!! we were waiting for something like this! I have a question for you: "The library specification was also improved and doesn't allow the backends to return errors any more if odbx_result() or odbx_row_fetch() is called once more after they already returned DONE." Is this available for ALL the backends?? What does it return instead, DONE again? Thanks in advance, Hernán 2008/6/12 OpenDBX devel list <lib...@li...>: > Dear OpenDBX users > > This release is a great leap forward towards bringing the OpenDBX library > to > the Windows platform. It compiles now on Windows NT based operating systems > using either the Cygwin or MinGW environment. The library specification was > also improved and doesn't allow the backends to return errors any more if > odbx_result() or odbx_row_fetch() is called once more after they already > returned DONE. > > With adding the Conn::finish(), Result::finish() and Lob::close() methods, > the > C++ API is now considered complete. These methods clean up their objects > and > are allowed to throw exceptions in case of errors which destructors aren't. > Simplifying the API was continued by making parameters optional as much as > possible. Last but not least the C++ API contains now inline documentation > in > Javadoc format. > > http://www.linuxnetworks.de/doc/index.php/OpenDBX/Download > > > Norbert > -- > OpenPGP public key > http://www.linuxnetworks.de/norbert.pubkey.asc > > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php > _______________________________________________ > libopendbx-devel mailing list > lib...@li... > https://lists.sourceforge.net/lists/listinfo/libopendbx-devel > http://www.linuxnetworks.de/doc/index.php/OpenDBX > > -- Well I want you to know Safe passage to the other side We can provide |
From: OpenDBX d. l. <lib...@li...> - 2008-06-16 21:36:37
|
On Mon, Jun 16, 2008 at 5:51 PM, OpenDBX devel list < lib...@li...> wrote: > Hi Mariano > > > I was trying to say that, sorry for my English. > > But that function isn't just odbx_error ? > > Unfortunately not as odbx_error() requires an odbx_t* parameter. > You are totally right. I didn't realize that. > > > Norbert > -- > OpenPGP public key > http://www.linuxnetworks.de/norbert.pubkey.asc > > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php > _______________________________________________ > libopendbx-devel mailing list > lib...@li... > https://lists.sourceforge.net/lists/listinfo/libopendbx-devel > http://www.linuxnetworks.de/doc/index.php/OpenDBX > > |
From: OpenDBX d. l. <lib...@li...> - 2008-06-16 20:51:58
|
Hi Mariano > I was trying to say that, sorry for my English. > But that function isn't just odbx_error ? Unfortunately not as odbx_error() requires an odbx_t* parameter. Norbert -- OpenPGP public key http://www.linuxnetworks.de/norbert.pubkey.asc |
From: OpenDBX d. l. <lib...@li...> - 2008-06-16 19:31:46
|
On Mon, Jun 16, 2008 at 4:12 PM, OpenDBX devel list < lib...@li...> wrote: > Hi Mariano > > > Yes. And we can also add an error associated with this in case I try to > do > > a get() and the number of connections in use is equal to the limit. > > The return values can hold the error constants but we might also need a > function translating the constant to an error message. I was trying to say that, sorry for my English. But that function isn't just odbx_error ? > > > > Just by curious, do you know which priority does this feature have? I > mean, > > if I see the roadmap or milestones in the wiki, there are lots of thing > to > > do till openDBX 2.0. Which version or month/year do you think there can > be > > a alpha of this? > > The connection pool is a rather small extension which I think can be added > in > the 1.5 development series. I don't know which month this will map to as > I'm > currently heading for 1.4 and there's some documentation to write before > 1.5 > will become reality. > Ok. Excellent. Thanks a lot. mariano > > > Norbert > -- > OpenPGP public key > http://www.linuxnetworks.de/norbert.pubkey.asc > > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php > _______________________________________________ > libopendbx-devel mailing list > lib...@li... > https://lists.sourceforge.net/lists/listinfo/libopendbx-devel > http://www.linuxnetworks.de/doc/index.php/OpenDBX > > |
From: OpenDBX d. l. <lib...@li...> - 2008-06-16 19:12:52
|
Hi Mariano > Yes. And we can also add an error associated with this in case I try to do > a get() and the number of connections in use is equal to the limit. The return values can hold the error constants but we might also need a function translating the constant to an error message. > Just by curious, do you know which priority does this feature have? I mean, > if I see the roadmap or milestones in the wiki, there are lots of thing to > do till openDBX 2.0. Which version or month/year do you think there can be > a alpha of this? The connection pool is a rather small extension which I think can be added in the 1.5 development series. I don't know which month this will map to as I'm currently heading for 1.4 and there's some documentation to write before 1.5 will become reality. Norbert -- OpenPGP public key http://www.linuxnetworks.de/norbert.pubkey.asc |
From: OpenDBX d. l. <lib...@li...> - 2008-06-16 18:33:59
|
On Mon, Jun 16, 2008 at 1:22 PM, OpenDBX devel list < lib...@li...> wrote: > Hi Mariano > > > First I thought a hash. Perhaps you have apply a hash function to the > key, > > so that to know the bucket or position in the array or vector and there, > in > > each element of the array you can have a list of odbx_t*. But then, I > > realize that there wouldn't be too many keys, so an ordered list could be > a > > goo choice. > > We should use a hash function anyway to limit the required memory for the > keys. Users can add keys which are as long as they want but if we use e.g. > a > MD5 hash of the key, there's only 16 bytes per key required. Ok, that's a good idea. > > > > I have also thought this approach. In one hand it is easier for the > > "client" of openDBX. The fucntion int odbx_pool_init() > > could be like this int odbx_pool_init( odbx_pool_t** pool, int > > numberMaxOfConnections ); The get() function can do exacctly what you > tell > > me Squeak code could do (check if there is one connection available and > if > > not, I use it and then I add it). But, as you said, to do this, I need > all > > the connection settings. Finally it can has a maximum number of > connections > > (it could be the same the database engine has set) and return an error > (get > > function) when the number of connections has reached that value. > > Limiting the number of connections is a good idea. We could limit the > number > of possible keys and the number of connections per key: > > int odbx_pool_init( odbx_pool_t** pool, int keylimit, int connlimit ); > Yes. And we can also add an error associated with this in case I try to do a get() and the number of connections in use is equal to the limit. > > > On the other hand, the other approach (the one we were talking about) > > requires much effort to the "client" of openDBX but it is more flexible. > > Yes, the client must use odbx_pool_add() at the end to add the connection > to > the pool again. On the other hand, maybe it's possible to do this together > with the init() and finish() in the Squeak Plugin. The connection would be > added to the pool if the script ends. > It could be. I'll think about it. Thanks for giving as advice about our plugin. We really apreciate this. > > > Perhaps the ideal approach is to have a mix of them. Actually, have both > of > > them and let the user choose which too use. > > I'm not so keen on this as the signature of the required function is very > different and you would end up in having two different interfaces. > Perhaps, as you said, having both interfaces makes openDBX more unclear. Just by curious, do you know which priority does this feature have? I mean, if I see the roadmap or milestones in the wiki, there are lots of thing to do till openDBX 2.0. Which version or month/year do you think there can be a alpha of this? thanks Mariano > > Norbert > -- > OpenPGP public key > http://www.linuxnetworks.de/norbert.pubkey.asc > > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php > _______________________________________________ > libopendbx-devel mailing list > lib...@li... > https://lists.sourceforge.net/lists/listinfo/libopendbx-devel > http://www.linuxnetworks.de/doc/index.php/OpenDBX > > |
From: OpenDBX d. l. <lib...@li...> - 2008-06-16 16:22:49
|
Hi Mariano > First I thought a hash. Perhaps you have apply a hash function to the key, > so that to know the bucket or position in the array or vector and there, in > each element of the array you can have a list of odbx_t*. But then, I > realize that there wouldn't be too many keys, so an ordered list could be a > goo choice. We should use a hash function anyway to limit the required memory for the keys. Users can add keys which are as long as they want but if we use e.g. a MD5 hash of the key, there's only 16 bytes per key required. > I have also thought this approach. In one hand it is easier for the > "client" of openDBX. The fucntion int odbx_pool_init() > could be like this int odbx_pool_init( odbx_pool_t** pool, int > numberMaxOfConnections ); The get() function can do exacctly what you tell > me Squeak code could do (check if there is one connection available and if > not, I use it and then I add it). But, as you said, to do this, I need all > the connection settings. Finally it can has a maximum number of connections > (it could be the same the database engine has set) and return an error (get > function) when the number of connections has reached that value. Limiting the number of connections is a good idea. We could limit the number of possible keys and the number of connections per key: int odbx_pool_init( odbx_pool_t** pool, int keylimit, int connlimit ); > On the other hand, the other approach (the one we were talking about) > requires much effort to the "client" of openDBX but it is more flexible. Yes, the client must use odbx_pool_add() at the end to add the connection to the pool again. On the other hand, maybe it's possible to do this together with the init() and finish() in the Squeak Plugin. The connection would be added to the pool if the script ends. > Perhaps the ideal approach is to have a mix of them. Actually, have both of > them and let the user choose which too use. I'm not so keen on this as the signature of the required function is very different and you would end up in having two different interfaces. Norbert -- OpenPGP public key http://www.linuxnetworks.de/norbert.pubkey.asc |
From: OpenDBX d. l. <lib...@li...> - 2008-06-16 16:09:31
|
Hi Mariano > I am trying to test openDBX in windows with MinGW. I have a simple > question. Here > (http://www.linuxnetworks.de/doc/index.php/OpenDBX/Setup/Manual_builds) > says that we need to install MSYS base system, but there are lots of > packages. Which of them do I need to install? I think it was only the "MSYS Base System" I've installed. Regards, Norbert -- OpenPGP public key http://www.linuxnetworks.de/norbert.pubkey.asc |
From: OpenDBX d. l. <lib...@li...> - 2008-06-16 03:06:55
|
I am trying to test openDBX in windows with MinGW. I have a simple question. Here (http://www.linuxnetworks.de/doc/index.php/OpenDBX/Setup/Manual_builds) says that we need to install MSYS base system, but there are lots of packages. Which of them do I need to install? Thanks, Mariano On Thu, Jun 12, 2008 at 6:52 PM, OpenDBX devel list < lib...@li...> wrote: > Dear OpenDBX users > > This release is a great leap forward towards bringing the OpenDBX library > to > the Windows platform. It compiles now on Windows NT based operating systems > using either the Cygwin or MinGW environment. The library specification was > also improved and doesn't allow the backends to return errors any more if > odbx_result() or odbx_row_fetch() is called once more after they already > returned DONE. > > With adding the Conn::finish(), Result::finish() and Lob::close() methods, > the > C++ API is now considered complete. These methods clean up their objects > and > are allowed to throw exceptions in case of errors which destructors aren't. > Simplifying the API was continued by making parameters optional as much as > possible. Last but not least the C++ API contains now inline documentation > in > Javadoc format. > > http://www.linuxnetworks.de/doc/index.php/OpenDBX/Download > > > Norbert > -- > OpenPGP public key > http://www.linuxnetworks.de/norbert.pubkey.asc > > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php > _______________________________________________ > libopendbx-devel mailing list > lib...@li... > https://lists.sourceforge.net/lists/listinfo/libopendbx-devel > http://www.linuxnetworks.de/doc/index.php/OpenDBX > > |
From: OpenDBX d. l. <lib...@li...> - 2008-06-15 22:12:33
|
On Sat, Jun 14, 2008 at 7:34 PM, OpenDBX devel list < lib...@li...> wrote: > Hi Mariano > > > Just to see if I understood. I'll have a key for my application + > database. > > So, assuming I have only one database and one aplication, I'll have only > > ONE key. > > That's right. If you have two applications using the same key, they would > share their connections. On the other side, if an application stores > connections to different hosts but the same database content using one key, > it would create some kind of load balancing. Perfect. No comment. > > > > A pool conections generaly manage more than one connection, so I could do > N > > times odbx_pool_add() till the number I want, and then just use > > odbx_pool_get to obtain an available connection. > > Correct. You would be able mix odbx_pool_get() and odbx_pool_add() to add > new > connections at the time they are required and could have m types of > connections (identified by their keys) with n different connections each. > The > number of connections (n) can also be different for each key (m). > > If we assume that there are usually only a limited number of keys in a > pool, > the implementation could be an ordered list of keys with rings of > connections > per key. This would mean a complexity of O(n/2) for key lookup and O(1) for > adding and getting a connection from the ring structure. Later on, the key > lookup can be improved by using a binary search on the ordered key list. > This > would reduce the complexity for the lookup to O(log(n)). > First I thought a hash. Perhaps you have apply a hash function to the key, so that to know the bucket or position in the array or vector and there, in each element of the array you can have a list of odbx_t*. But then, I realize that there wouldn't be too many keys, so an ordered list could be a goo choice. > > A different idea would be a function which accepts all necessary parameters > and options and creates the connections on its own. This would be a little > bit more tricky as we would have to store and compare all parameters inside > the pool. The advantage would be that a separate odbx_pool_add() function > wouldn't be necessary any more. > > I have also thought this approach. In one hand it is easier for the "client" of openDBX. The fucntion int odbx_pool_init() could be like this int odbx_pool_init( odbx_pool_t** pool, int numberMaxOfConnections ); The get() function can do exacctly what you tell me Squeak code could do (check if there is one connection available and if not, I use it and then I add it). But, as you said, to do this, I need all the connection settings. Finally it can has a maximum number of connections (it could be the same the database engine has set) and return an error (get function) when the number of connections has reached that value. On the other hand, the other approach (the one we were talking about) requires much effort to the "client" of openDBX but it is more flexible. Perhaps the ideal approach is to have a mix of them. Actually, have both of them and let the user choose which too use. cheers, Mariano > > Norbert > -- > OpenPGP public key > http://www.linuxnetworks.de/norbert.pubkey.asc > > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php > _______________________________________________ > libopendbx-devel mailing list > lib...@li... > https://lists.sourceforge.net/lists/listinfo/libopendbx-devel > http://www.linuxnetworks.de/doc/index.php/OpenDBX > > |
From: OpenDBX d. l. <lib...@li...> - 2008-06-15 20:57:17
|
On Sat, Jun 14, 2008 at 7:01 PM, OpenDBX devel list < lib...@li...> wrote: > Hi Mariano > > > Doing this I could perfectly generate my .deb files. > > That's all I wanted to know :-) grate! > > > Thank you for your help > You are welcome > > > Norbert > -- > OpenPGP public key > http://www.linuxnetworks.de/norbert.pubkey.asc > > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php > _______________________________________________ > libopendbx-devel mailing list > lib...@li... > https://lists.sourceforge.net/lists/listinfo/libopendbx-devel > http://www.linuxnetworks.de/doc/index.php/OpenDBX > > |
From: OpenDBX d. l. <lib...@li...> - 2008-06-14 22:34:47
|
Hi Mariano > Just to see if I understood. I'll have a key for my application + database. > So, assuming I have only one database and one aplication, I'll have only > ONE key. That's right. If you have two applications using the same key, they would share their connections. On the other side, if an application stores connections to different hosts but the same database content using one key, it would create some kind of load balancing. > A pool conections generaly manage more than one connection, so I could do N > times odbx_pool_add() till the number I want, and then just use > odbx_pool_get to obtain an available connection. Correct. You would be able mix odbx_pool_get() and odbx_pool_add() to add new connections at the time they are required and could have m types of connections (identified by their keys) with n different connections each. The number of connections (n) can also be different for each key (m). If we assume that there are usually only a limited number of keys in a pool, the implementation could be an ordered list of keys with rings of connections per key. This would mean a complexity of O(n/2) for key lookup and O(1) for adding and getting a connection from the ring structure. Later on, the key lookup can be improved by using a binary search on the ordered key list. This would reduce the complexity for the lookup to O(log(n)). A different idea would be a function which accepts all necessary parameters and options and creates the connections on its own. This would be a little bit more tricky as we would have to store and compare all parameters inside the pool. The advantage would be that a separate odbx_pool_add() function wouldn't be necessary any more. Norbert -- OpenPGP public key http://www.linuxnetworks.de/norbert.pubkey.asc |
From: OpenDBX d. l. <lib...@li...> - 2008-06-14 22:01:24
|
Hi Mariano > Doing this I could perfectly generate my .deb files. That's all I wanted to know :-) Thank you for your help Norbert -- OpenPGP public key http://www.linuxnetworks.de/norbert.pubkey.asc |
From: OpenDBX d. l. <lib...@li...> - 2008-06-14 20:49:24
|
On Fri, Jun 13, 2008 at 1:36 PM, OpenDBX devel list < lib...@li...> wrote: > Hi Mariano > > > Yes, we have already think about having a connection pool to do exactly > > what you said. However we didn't realize about that pitfall. We will keep > > it in mind. > > I've thought about the same problem because I'm still thinking about a PHP > module. Fantastic. In two days we receive the notice of the windows compatibility and now the connection pool. EXCELLENT news!!! > > > My thinking was that (web) applications usually only need one type of > database > connection with certain options set. When ever they need a new connection, > they know how to configure them properly (init, set_option, bind). If the > application is responsible for creating the connections, the pool only has > to > manage them and therefore there would be no problem with setting options is > required or not. A general solution could be a new set of supporting > functions in the OpenDBX library: > > int odbx_pool_init( odbx_pool_t** pool ); > Initialize the pool and provide a thread-safe handle to its instance > > int odbx_pool_add( odbx_pool_t* pool, odbx_t* handle, const char* key ); > Add a connection to the pool which isn't needed any more > > int odbx_pool_get( odbx_pool_t* pool, odbx_t** handle, const char* key ); > Get a handle from the pool if one is available > > int odbx_pool_finish( odbx_pool_t* pool ); > Close all connections which are in the pool and free the resources > > The application (or Squeak code) would do something like this: > This will for sure be done by the plugin. > > if( odbx_pool_get("mykey") == no_conn_available ) { > odbx_init() > odbx_set_option() > odbx_bind() > } > ... do something ... > odbx_pool_add("mykey") > > The key must be unique for this application and the database connections > the > application creates. Just to see if I understood. I'll have a key for my application + database. So, assuming I have only one database and one aplication, I'll have only ONE key. A pool conections generaly manage more than one connection, so I could do N times odbx_pool_add() till the number I want, and then just use odbx_pool_get to obtain an available connection. is this right? > > The Squeak OpenDBX plugin would additionally do the odbx_pool_init() once > at > the very beginning and odbx_pool_finish() when the application (or > webserver) > is shut down. > > > Norbert > -- > OpenPGP public key > http://www.linuxnetworks.de/norbert.pubkey.asc > > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php > _______________________________________________ > libopendbx-devel mailing list > lib...@li... > https://lists.sourceforge.net/lists/listinfo/libopendbx-devel > http://www.linuxnetworks.de/doc/index.php/OpenDBX > > |
From: OpenDBX d. l. <lib...@li...> - 2008-06-14 20:09:21
|
On Fri, Jun 13, 2008 at 5:32 PM, OpenDBX devel list < lib...@li...> wrote: > Hi Mariano > > > Yes, I have docbook-2x installed and I have all the *.3 files in /doc. > > Know, what I have to do to include this in man pages. I am using ubuntu. > I > > think I should include the path to /etc/manpath.config but I am not sure. > > If you are using Ubuntu, could you please try > > fakeroot debian/rules binary > I think I didn't understood the test. This start checking lots of things till I have the following error: checking for ibase.h... no configure: error: firebird header (ibase.h) not found make: *** [build] Error 1 I don't have firebird installed so It's logic. What I have done some time ago is to modifie the debian/rules file and put the backends I want: backends := mysql pgsql Doing this I could perfectly generate my .deb files. > It should work with Ubuntu as well but it would be nice if you could check > this. It generates .deb packages which should install flawlessly. > I have done this with another version and works fine. Do you want me to try again with new version? I am sorry I didn't get the point... > Thanks > > > Norbert > -- > OpenPGP public key > http://www.linuxnetworks.de/norbert.pubkey.asc > > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php > _______________________________________________ > libopendbx-devel mailing list > lib...@li... > https://lists.sourceforge.net/lists/listinfo/libopendbx-devel > http://www.linuxnetworks.de/doc/index.php/OpenDBX > > |
From: OpenDBX d. l. <lib...@li...> - 2008-06-13 20:32:19
|
Hi Mariano > Yes, I have docbook-2x installed and I have all the *.3 files in /doc. > Know, what I have to do to include this in man pages. I am using ubuntu. I > think I should include the path to /etc/manpath.config but I am not sure. If you are using Ubuntu, could you please try fakeroot debian/rules binary It should work with Ubuntu as well but it would be nice if you could check this. It generates .deb packages which should install flawlessly. Thanks Norbert -- OpenPGP public key http://www.linuxnetworks.de/norbert.pubkey.asc |
From: OpenDBX d. l. <lib...@li...> - 2008-06-13 17:25:39
|
Yes! Know it works perfect! thanks, Mariano On Fri, Jun 13, 2008 at 1:14 PM, OpenDBX devel list < lib...@li...> wrote: > On Friday 13 June 2008 15:08:37 OpenDBX devel list wrote: > > Yes, I have docbook-2x installed and I have all the *.3 files in /doc. > > Know, what I have to do to include this in man pages. I am using ubuntu. > I > > think I should include the path to /etc/manpath.config but I am not sure. > > If the man pages are generated, the scripts generated by autoconf/automake > put > them into the filesystem automatically. Same as the binaries. > > The problem you might face is that you may only call > > ./configure --with-backends="..." > > This places everything (header files, libraries, man pages, etc) > in /usr/local/ by default. If you call > > ./configure --prefix=/usr --with-backends="..." > > instead, libraries are in /usr/lib, headers in /usr/include and man pages > in /usr/share/man and everything should be found out of the box. > > > Norbert > -- > OpenPGP public key > http://www.linuxnetworks.de/norbert.pubkey.asc > > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php > _______________________________________________ > libopendbx-devel mailing list > lib...@li... > https://lists.sourceforge.net/lists/listinfo/libopendbx-devel > http://www.linuxnetworks.de/doc/index.php/OpenDBX > > |
From: OpenDBX d. l. <lib...@li...> - 2008-06-13 16:36:29
|
Hi Mariano > Yes, we have already think about having a connection pool to do exactly > what you said. However we didn't realize about that pitfall. We will keep > it in mind. I've thought about the same problem because I'm still thinking about a PHP module. My thinking was that (web) applications usually only need one type of database connection with certain options set. When ever they need a new connection, they know how to configure them properly (init, set_option, bind). If the application is responsible for creating the connections, the pool only has to manage them and therefore there would be no problem with setting options is required or not. A general solution could be a new set of supporting functions in the OpenDBX library: int odbx_pool_init( odbx_pool_t** pool ); Initialize the pool and provide a thread-safe handle to its instance int odbx_pool_add( odbx_pool_t* pool, odbx_t* handle, const char* key ); Add a connection to the pool which isn't needed any more int odbx_pool_get( odbx_pool_t* pool, odbx_t** handle, const char* key ); Get a handle from the pool if one is available int odbx_pool_finish( odbx_pool_t* pool ); Close all connections which are in the pool and free the resources The application (or Squeak code) would do something like this: if( odbx_pool_get("mykey") == no_conn_available ) { odbx_init() odbx_set_option() odbx_bind() } ... do something ... odbx_pool_add("mykey") The key must be unique for this application and the database connections the application creates. The Squeak OpenDBX plugin would additionally do the odbx_pool_init() once at the very beginning and odbx_pool_finish() when the application (or webserver) is shut down. Norbert -- OpenPGP public key http://www.linuxnetworks.de/norbert.pubkey.asc |