Creating connection pool in basex

Tuesday, 4 March 2014 · 3 messages · last reply 8 Mar 2014
I
iClays4 Mar 2014 20:08 #
Is there a way to create a connection pool in basex as you would with applications that connects to oracle or sql server? How do we achieve this? Thx
Quoted text · basex-talk-request at mailman.uni-konstanz.de · 1 line
On Tuesday, March 4, 2014 1:14 AM, "basex-talk-request at mailman.uni-konstanz.de" <basex-talk-request at mailman.uni-konstanz.de> wrote:
Send BaseX-Talk mailing list submissions to basex-talk at mailman.uni-konstanz.de To subscribe or unsubscribe via the World Wide Web, visit https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk or, via email, send a message with subject or body 'help' to basex-talk-request at mailman.uni-konstanz.de You can reach the person managing the list at basex-talk-owner at mailman.uni-konstanz.de When replying, please edit your Subject line so it is more specific than "Re: Contents of BaseX-Talk digest..." Today's Topics: 1. Re: import in xsd (Jan Techter) 2. Re: import in xsd (Andy Bunce) 3. BaseX 7.8.1 Update - Soft-Files.com (Soft-Files Team) 4. Error in webdav.xqm (France Baril) ---------------------------------------------------------------------- Message: 1 Date: Mon, 03 Mar 2014 12:08:23 +0100
Quoted text · Jan Techter · 129 lines
From: Jan Techter <techter at mailbox.tu-berlin.de> To: Christian Gr?n <christian.gruen at gmail.com> Cc: BaseX <basex-talk at mailman.uni-konstanz.de> Subject: Re: [basex-talk] import in xsd Message-ID: <531462A7.7090609 at mailbox.tu-berlin.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Hi, thx for the info. I'll have to manage with absolute paths then for the time being. Best, Jan On 02/28/2014 08:23 PM, Christian Gr?n wrote: > Hi Jan, > > the reason for the unexpected behavior may be that the referenced > schema files cannot be retrieved from the database. Instead, they will > be requested from the local system. One of the reasons is that schema > validation is peformed by the standard Java validators, or by Saxon, > and both of them have no access to database files. > > Hope this helps, > Christian > ___________________________________ > >> is the validation:xsd() function able to handle the import of other >> schemata? >> I tried to do something like >> >> <import namespace="http://bibtexml.sf.net/" >> schemaLocation="bibtexml-handwritten.xsd"/> >> >> to use types which are defined in this schema in my own schema. >> Both schema files are lying next to each other in the same basex database. >> >> The validation function doesnt throw an error that the import failed. >> But rather only states that it can't resolve the types i used from the other >> schema: >> >> Validation failed. "Fatal:src-resolve: Cannot resolve the name >> 'bibtex:entry' to a(n) 'type definition' component." >> >> So it seems like it just ignores the import statement. >> >> Best, >> Jan >> _______________________________________________ >> BaseX-Talk mailing list >> BaseX-Talk at mailman.uni-konstanz.de >> https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk ------------------------------ Message: 2 Date: Mon, 3 Mar 2014 11:26:30 +0000 From: Andy Bunce <bunce.andy at gmail.com> To: Jan Techter <techter at mailbox.tu-berlin.de> Cc: BaseX <basex-talk at mailman.uni-konstanz.de> Subject: Re: [basex-talk] import in xsd Message-ID: <CAPH12r2=6Y-n5KkjJiA+YWdt5M3Jn_UYisyZk02BG82AzBZFVg at mail.gmail.com> Content-Type: text/plain; charset="iso-8859-1" Could not a custom LSResourceResolver<http://docs.oracle.com/javase/1.5.0/docs/api/org/w3c/dom/ls/LSResourceResolver.html>[1] be created to handle loading from the database? Regards /Andy [1] http://docs.oracle.com/javase/1.5.0/docs/api/javax/xml/validation/Validator.html#setResourceResolver%28org.w3c.dom.ls.LSResourceResolver%29 On Mon, Mar 3, 2014 at 11:08 AM, Jan Techter <techter at mailbox.tu-berlin.de>wrote: > Hi, > > thx for the info. > I'll have to manage with absolute paths then > for the time being. > > Best, > Jan > > > > > On 02/28/2014 08:23 PM, Christian Gr?n wrote: > >> Hi Jan, >> >> the reason for the unexpected behavior may be that the referenced >> schema files cannot be retrieved from the database. Instead, they will >> be requested from the local system. One of the reasons is that schema >> validation is peformed by the standard Java validators, or by Saxon, >> and both of them have no access to database files. >> >> Hope this helps, >> Christian >> ___________________________________ >> >> is the validation:xsd() function able to handle the import of other >>> schemata? >>> I tried to do something like >>> >>> <import namespace="http://bibtexml.sf.net/" >>> schemaLocation="bibtexml-handwritten.xsd"/> >>> >>> to use types which are defined in this schema in my own schema. >>> Both schema files are lying next to each other in the same basex >>> database. >>> >>> The validation function doesnt throw an error that the import failed. >>> But rather only states that it can't resolve the types i used from the >>> other >>> schema: >>> >>> Validation failed. "Fatal:src-resolve: Cannot resolve the name >>> 'bibtex:entry' to a(n) 'type definition' component." >>> >>> So it seems like it just ignores the import statement. >>> >>> Best, >>> Jan >>> _______________________________________________ >>> BaseX-Talk mailing list >>> BaseX-Talk at mailman.uni-konstanz.de >>> https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk >>> >> > _______________________________________________ > BaseX-Talk mailing list > BaseX-Talk at mailman.uni-konstanz.de > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk >
CG
Christian Grün7 Mar 2014 13:06 #
Hi iClays,
Quoted text · iClays · 2 lines
> Is there a way to create a connection pool in basex as you would with > applications that connects to oracle or sql server? How do we achieve this?
As BaseX client connections are pretty fast and light-weight, we don't provide any additional pool mechanism. But other users have also asked for a connection pool before. Have you already encountered any bottleneck with the provided solution? Best, Christian
Quoted text · iClays · 178 lines
> On Tuesday, March 4, 2014 1:14 AM, > "basex-talk-request at mailman.uni-konstanz.de" > <basex-talk-request at mailman.uni-konstanz.de> wrote: > Send BaseX-Talk mailing list submissions to > basex-talk at mailman.uni-konstanz.de > > To subscribe or unsubscribe via the World Wide Web, visit > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk > or, via email, send a message with subject or body 'help' to > basex-talk-request at mailman.uni-konstanz.de > > You can reach the person managing the list at > basex-talk-owner at mailman.uni-konstanz.de > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of BaseX-Talk digest..." > > > Today's Topics: > > 1. Re: import in xsd (Jan Techter) > 2. Re: import in xsd (Andy Bunce) > 3. BaseX 7.8.1 Update - Soft-Files.com (Soft-Files Team) > 4. Error in webdav.xqm (France Baril) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Mon, 03 Mar 2014 12:08:23 +0100 > From: Jan Techter <techter at mailbox.tu-berlin.de> > To: Christian Gr?n <christian.gruen at gmail.com> > Cc: BaseX <basex-talk at mailman.uni-konstanz.de> > Subject: Re: [basex-talk] import in xsd > Message-ID: <531462A7.7090609 at mailbox.tu-berlin.de> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > Hi, > > thx for the info. > I'll have to manage with absolute paths then > for the time being. > > Best, > Jan > > > > On 02/28/2014 08:23 PM, Christian Gr?n wrote: >> Hi Jan, >> >> the reason for the unexpected behavior may be that the referenced >> schema files cannot be retrieved from the database. Instead, they will >> be requested from the local system. One of the reasons is that schema >> validation is peformed by the standard Java validators, or by Saxon, >> and both of them have no access to database files. >> >> Hope this helps, >> Christian >> ___________________________________ >> >>> is the validation:xsd() function able to handle the import of other >>> schemata? >>> I tried to do something like >>> >>> <import namespace="http://bibtexml.sf.net/" >>> schemaLocation="bibtexml-handwritten.xsd"/> >>> >>> to use types which are defined in this schema in my own schema. >>> Both schema files are lying next to each other in the same basex >>> database. >>> >>> The validation function doesnt throw an error that the import failed. >>> But rather only states that it can't resolve the types i used from the >>> other >>> schema: >>> >>> Validation failed. "Fatal:src-resolve: Cannot resolve the name >>> 'bibtex:entry' to a(n) 'type definition' component." >>> >>> So it seems like it just ignores the import statement. >>> >>> Best, >>> Jan >>> _______________________________________________ >>> BaseX-Talk mailing list >>> BaseX-Talk at mailman.uni-konstanz.de >>> https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk > > > > ------------------------------ > > Message: 2 > Date: Mon, 3 Mar 2014 11:26:30 +0000 > From: Andy Bunce <bunce.andy at gmail.com> > To: Jan Techter <techter at mailbox.tu-berlin.de> > Cc: BaseX <basex-talk at mailman.uni-konstanz.de> > Subject: Re: [basex-talk] import in xsd > Message-ID: > <CAPH12r2=6Y-n5KkjJiA+YWdt5M3Jn_UYisyZk02BG82AzBZFVg at mail.gmail.com> > Content-Type: text/plain; charset="iso-8859-1" > > Could not a custom > LSResourceResolver<http://docs.oracle.com/javase/1.5.0/docs/api/org/w3c/dom/ls/LSResourceResolver.html>[1] > be created to handle loading from the database? > > Regards > /Andy > > [1] > http://docs.oracle.com/javase/1.5.0/docs/api/javax/xml/validation/Validator.html#setResourceResolver%28org.w3c.dom.ls.LSResourceResolver%29 > > > On Mon, Mar 3, 2014 at 11:08 AM, Jan Techter > <techter at mailbox.tu-berlin.de>wrote: > >> Hi, >> >> thx for the info. >> I'll have to manage with absolute paths then >> for the time being. >> >> Best, >> Jan >> >> >> >> >> On 02/28/2014 08:23 PM, Christian Gr?n wrote: >> >>> Hi Jan, >>> >>> the reason for the unexpected behavior may be that the referenced >>> schema files cannot be retrieved from the database. Instead, they will >>> be requested from the local system. One of the reasons is that schema >>> validation is peformed by the standard Java validators, or by Saxon, >>> and both of them have no access to database files. >>> >>> Hope this helps, >>> Christian >>> ___________________________________ >>> >>> is the validation:xsd() function able to handle the import of other >>>> schemata? >>>> I tried to do something like >>>> >>>> <import namespace="http://bibtexml.sf.net/" >>>> schemaLocation="bibtexml-handwritten.xsd"/> >>>> >>>> to use types which are defined in this schema in my own schema. >>>> Both schema files are lying next to each other in the same basex >>>> database. >>>> >>>> The validation function doesnt throw an error that the import failed. >>>> But rather only states that it can't resolve the types i used from the >>>> other >>>> schema: >>>> >>>> Validation failed. "Fatal:src-resolve: Cannot resolve the name >>>> 'bibtex:entry' to a(n) 'type definition' component." >>>> >>>> So it seems like it just ignores the import statement. >>>> >>>> Best, >>>> Jan >>>> _______________________________________________ >>>> BaseX-Talk mailing list >>>> BaseX-Talk at mailman.uni-konstanz.de >>>> https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk >>>> >>> >> _______________________________________________ >> BaseX-Talk mailing list >> BaseX-Talk at mailman.uni-konstanz.de >> https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk >> >
CG
Christian Grün8 Mar 2014 10:26 #
Hi iClays (cc to the list),
Quoted text · Christian Grün · 4 lines
> Thanks for replying. Basically our users have grown tremendously. So with > the embedded basex solution, we thought a connection pool or load balancing > could make the already faster basex even more amazing for us and our user > experience. That is the reason...
Thanks for your feedback. As you said you want to speed up BaseX... Have you already found out what takes most time? Is it the time for connecting to the database, the repeated request of identical results, or something else?
Quoted text · Christian Grün · 1 line
> Is the embedded solution limited in terms of what we can do with it?
The embedded solution will generally give you best performance, because it has no overhead for sending data over sockets, etc., but it may not be well suited if you want to handle external clients. Could you give me more information on what your "users" are? Christian

⚡Generated with XQuery