|
View:
New views
15 Messages
—
Rating Filter:
Alert me
|
|
|
Counter moduleI just tested the counter module (using rev 10276) and found it quite
interesting. It's a persistent counter - whose value persists across queries, something otherwise impossible in the anti-side-effect world of XQuery. I have a couple of questions/observations: 1. The function documentation defines the counter:create() parameter, $counter-name as "The node or a string path pointing to a resource in the database" and gives it a type of item(). a. "The node" is a bit vague - would "The name of the node" or perhaps even "The name of the counter" be more precise and descriptive? I was able to create a counter using counter:create('joe'). b. I wasn't sure how to interpret "a string path pointing to a resource in the database". Does this mean that counter:create('/db/test.xml') should have some effect on that resource in the database? 2. Should the type for all of the counter functions' $counter-name parameters be xs:string instead of item()? Is there a case where $counter-name would be anything other than a string? 3. I find that counter:next-value() returns '-1' if the supplied $counter-name hasn't yet been created. Perhaps the function documentation's "return" information could be updated to say, "Returns -1 if the supplied $counter-name hasn't yet been created with counter:create()". 4. counter:next-value() contains a typo: "its' " should be "its", sans apostrophe. Thanks, Joe p.s. Given the reports about build problems, I tried doing a 'build clean', svn update, and 'build' on rev 10276, and there were no problems. ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Exist-open mailing list Exist-open@... https://lists.sourceforge.net/lists/listinfo/exist-open |
|
|
Re: Counter moduleLet me add a minor stylistic suggestion:
5. Might "counter" be a better name for the module than "counters"? It seems most modules are named in the singular. The only exception, it appears, is "backups". ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Exist-open mailing list Exist-open@... https://lists.sourceforge.net/lists/listinfo/exist-open |
|
|
Re: Counter moduleHi,
On Wed, Oct 28, 2009 at 1:02 PM, Joe Wicentowski <joewiz@...> wrote: Let me add a minor stylistic suggestion: Thank you for your input! I The code was contributed just recently, I moved the code to modules just yesterday. I think your suggestions make sense, I'll have a look when I have time. Internally, things might be redesigned a bit. I guess that using NIO would things (1) faster and (2) more robust. I have little just little experience however with setting this stuff up, so I need some help/pointers for this.... regards Dannes -- eXist-db Native XML Database - http://exist-db.org Join us on linked-in: http://www.linkedin.com/groups?gid=35624 ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Exist-open mailing list Exist-open@... https://lists.sourceforge.net/lists/listinfo/exist-open |
|
|
Re: Counter moduleI think that the name should remain singular. Generally a name of an object should represent an instance of the object and not a collection of the object.
On Oct 28, 2009, at 09:09 AM, Dannes Wessels wrote: Hi, ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Exist-open mailing list Exist-open@... https://lists.sourceforge.net/lists/listinfo/exist-open |
|
|
Re: Counter moduleHi Joe,
On 28 Oct 2009, at 12:50 , Joe Wicentowski wrote: 1. The function documentation defines the counter:create() parameter, Internally all was handled as string, but having item() here makes the functions most easy to use..... 2. Should the type for all of the counter functions' $counter-name no just convenience. 3. I find that counter:next-value() returns '-1' if the supplied ok 4. counter:next-value() contains a typo: "its' " should be "its", sans right :-) Okay I 'll refactor the name and the package location as well. Thnx for your input and ideas! Kind regards Dannes -- eXist-db Native XML Database - http://exist-db.org Join us on linked-in: http://www.linkedin.com/groups?gid=35624 ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Exist-open mailing list Exist-open@... https://lists.sourceforge.net/lists/listinfo/exist-open |
|
|
Re: Counter moduleokay,
I updated the code. D. On 28 Oct 2009, at 15:09 , Dannes Wessels wrote: Hi, Kind regards Dannes -- eXist-db Native XML Database - http://exist-db.org Join us on linked-in: http://www.linkedin.com/groups?gid=35624 ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Exist-open mailing list Exist-open@... https://lists.sourceforge.net/lists/listinfo/exist-open |
|
|
Re: Counter moduleDannes,
The build from the trunk fails with two
errors:
[javac] D:\work
2009\eXist-1.3dev\test\src\org\exist\xquery\functions\util\CounterTest.java:9:
package org.exist.xquery.modules.counters does not exist
[javac] import org.exist.xquery.modules.counters.CountersModule; [javac] ^ [javac] D:\work 2009\eXist-1.3dev\test\src\org\exist\xquery\functions\util\CounterTest.java:25: cannot find symbol [javac] symbol : variable CountersModule [javac] location: class org.exist.xquery.functions.util.CounterTest [javac] private final static String IMPORT = "import module namespace counter=\"" + CountersModule.NAMESPACE_URI + "\" " + [javac] ^ Thomas
------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Exist-open mailing list Exist-open@... https://lists.sourceforge.net/lists/listinfo/exist-open |
|
|
Re: Counter moduleThe code is now in org.exist.xquery.modules.counter.CounterModule ...
On 28 Oct 2009, at 22:47 , Thomas White wrote: [javac] D:\work 2009\eXist-1.3dev\test\src\org\exist\xquery\functions\util\CounterTest.java:9: package org.exist.xquery.modules.counters does not exist Kind regards Dannes -- eXist-db Native XML Database - http://exist-db.org Join us on linked-in: http://www.linkedin.com/groups?gid=35624 ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Exist-open mailing list Exist-open@... https://lists.sourceforge.net/lists/listinfo/exist-open |
|
|
Re: Counter moduleDannes,
On Wed, Oct 28, 2009 at 3:46 PM, Dannes Wessels <dizzzz@...> wrote: > Okay I 'll refactor the name and the package location as well. Thnx for your > input and ideas! Wow, that was quick! Thank you! I'm glad the feedback was helpful. I just updated to rev. 10280 and confirmed that the build worked and the function name and documentation are all perfect to my eye. I did notice that counter:create() on an existing counter returns the existing value, rather than resetting the counter. For example, in the sandbox: 1. counter:create('joe') => 0 2. counter:next-value('joe') => 1 3. counter:create('joe') => 1 4. counter:create('joe', xs:long('123')) => 1 I don't know why, but I intuitively expected that 3 and 4 would result in 0 and 123, respectively, i.e that create() would destroy and reset the value. Of course, nothing in the documentation gave me that impression. In any case, I wonder if it would be worth making this behavior (what happens when you counter:create() a pre-existing counter) explicit? Something like, "If the counter already exists, it will retain its value, and it won't be reset." >> 2. Should the type for all of the counter functions' $counter-name >> parameters be xs:string instead of item()? Is there a case where >> $counter-name would be anything other than a string? > > no just convenience. Cool, so now I can create all sorts of fun counters! 1. counter:create( <hiDannes/> ) 2. counter:create( attribute bye {'Dannes'} ) 3. counter:create( <?hi dannes="1.0" ?> ) 4. counter:create( <!-- ok, enough silly jokes! thanks, Dannes! :) --> ) Joe ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Exist-open mailing list Exist-open@... https://lists.sourceforge.net/lists/listinfo/exist-open |
|
|
Re: Counter module> I don't know why, but I intuitively expected that 3 and 4 would result
> in 0 and 123, respectively, i.e that create() would destroy and reset > the value. I agree. Sometimes you need a way to reset a counter to a given value. > 4. counter:create( <!-- ok, enough silly jokes! thanks, Dannes! :) --> ) Before we forget it, I would also like to thank Jasper for contributing the original code of this module. Wolfgang ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Exist-open mailing list Exist-open@... https://lists.sourceforge.net/lists/listinfo/exist-open |
|
|
Re: Counter moduleHi,
On Thu, Oct 29, 2009 at 9:03 AM, Wolfgang <wolfgang@...> wrote: --
we could add counter:reset($counter-name) for this? and.... there is no other way for getting the current value of a counter than... calling create() on an existing counter.
Yes, I did only perform some integration steps here..... Jasper contributed the code...... regards Dannes eXist-db Native XML Database - http://exist-db.org Join us on linked-in: http://www.linkedin.com/groups?gid=35624 ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Exist-open mailing list Exist-open@... https://lists.sourceforge.net/lists/listinfo/exist-open |
|
|
Re: Counter moduleHi All, ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Exist-open mailing list Exist-open@... https://lists.sourceforge.net/lists/listinfo/exist-open |
|
|
Re: Counter moduleWhat do you think about combining counters and cache for global variables?
------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Exist-open mailing list Exist-open@... https://lists.sourceforge.net/lists/listinfo/exist-open |
|
|
Re: Counter modulehho
On Thu, Oct 29, 2009 at 11:23 AM, Evgeny Gazdovsky <gazdovsky@...> wrote: What do you think about combining counters and cache for global variables? interesting, but there are some differences: - counters need to be persistent - persistency write speed of counters need to be high - only simple type variables (long) need to be stored, no xml fragments cheers Dannes -- eXist-db Native XML Database - http://exist-db.org Join us on linked-in: http://www.linkedin.com/groups?gid=35624 ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Exist-open mailing list Exist-open@... https://lists.sourceforge.net/lists/listinfo/exist-open |
|
|
why does a smaller db take longer to back up?I just restored a DB and then deleted a bunch of stuff. After the
deletion the db took longer to back up. Here are some daily backup daily files to illustrate: -rw-r--r-- 1 root root 306692294 2009-11-05 19:27 backup-2009-11-05T1905.zip -rw-r--r-- 1 root root 259171801 2009-11-06 19:32 backup-2009-11-06T1905.zip -rw-r--r-- 1 root root 288484000 2009-11-07 19:40 backup-2009-11-07T1905.zip -rw-r--r-- 1 root root 302397133 2009-11-08 19:44 backup-2009-11-08T1905.zip As you see the DB is almost back to its original size of four days ago but takes 17 minutes longer to back up. Why is that? ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Exist-open mailing list Exist-open@... https://lists.sourceforge.net/lists/listinfo/exist-open |
| Free embeddable forum powered by Nabble | Forum Help |