Re: [basex-talk] Protocol Question: Query Persistence

2014-03-12 Thread Christian Grün
--Original Message- > From: Christian Grün [mailto:christian.gr...@gmail.com] > Sent: Wednesday, March 12, 2014 8:58 > To: Paul Fancher > Cc: basex-talk@mailman.uni-konstanz.de > Subject: Re: [basex-talk] Protocol Question: Query Persistence > > Hi Paul, > > All sess

Re: [basex-talk] Protocol Question: Query Persistence

2014-03-12 Thread Paul Fancher
From: Christian Grün [mailto:christian.gr...@gmail.com] Sent: Wednesday, March 12, 2014 8:58 To: Paul Fancher Cc: basex-talk@mailman.uni-konstanz.de Subject: Re: [basex-talk] Protocol Question: Query Persistence Hi Paul, All sessions will be dropped when they were not active for the specifie

Re: [basex-talk] Protocol Question: Query Persistence

2014-03-12 Thread Christian Grün
inal Message- > From: Christian Grün [mailto:christian.gr...@gmail.com] > Sent: Tuesday, March 11, 2014 16:14 > To: Paul Fancher > Cc: basex-talk@mailman.uni-konstanz.de > Subject: Re: [basex-talk] Protocol Question: Query Persistence > > Hi Paul, > > thanks for your mai

Re: [basex-talk] Protocol Question: Query Persistence

2014-03-12 Thread Paul Fancher
find that out. [1] http://docs.basex.org/wiki/Options#KEEPALIVE -Original Message- From: Christian Grün [mailto:christian.gr...@gmail.com] Sent: Tuesday, March 11, 2014 16:14 To: Paul Fancher Cc: basex-talk@mailman.uni-konstanz.de Subject: Re: [basex-talk] Protocol Question: Query Persisten

Re: [basex-talk] Protocol Question: Query Persistence

2014-03-11 Thread Christian Grün
Hi Paul, thanks for your mail, and sorry for letting you wait so long. > I have a client that connects to a BaseX server using the Client/Server API. > I am currently writing failure modes to handle connection failures during > runtime, and I ran into a question that I don't immediately know th

[basex-talk] Protocol Question: Query Persistence

2014-03-07 Thread Paul Fancher
I have a client that connects to a BaseX server using the Client/Server API. I am currently writing failure modes to handle connection failures during runtime, and I ran into a question that I don't immediately know the answer to: if a query is defined (which returns an ID), and the connection t

Re: [basex-talk] Protocol Question

2013-07-23 Thread Andy Bunce
I have created an issue [1] and will take a look this evening. I suspect it is my problem rather than BaseX. I have never been happy with that parsing code :-) I see there are now 3 Node BaseX clients [2] I think Hans simple-basex has a lot of good ideas regarding the parsing. /Andy [1] https://

Re: [basex-talk] Protocol Question

2013-07-23 Thread Gerald de Jong
The state machine starts in "type" state. case "type": var r = self.popByte(); if (r) { self.state = (r.data == "\0") ? "status" : "item"; progress = true; } break But the first time it gets in here popByte returns an empty object for r. I would have expected it to get that they "type" is \000b.

Re: [basex-talk] Protocol Question

2013-07-23 Thread Gerald de Jong
Hi Andy! Thanks for getting back to me so quickly. I'm indeed using: package.json:"basex": "~0.6.1" I thought as well that it might be an old reply, but all I do is create a database, insert a document, and then query for something that is not there. I am using BaseX 7.6 if that makes any

Re: [basex-talk] Protocol Question

2013-07-23 Thread Andy Bunce
Hi Gerald, Could that '\u\u' be part of an asynchronous response to some previous command? Otherwise it looks fine: -> '\u () \u' // create query returning empty sequence <- '1\u \u' //The 1 is the query handle. -> '\u0004 1 \u'//Execute the query with handl

Re: [basex-talk] Protocol Question

2013-07-23 Thread Gerald de Jong
So the driver sends a query for something that should give no results: '\u/somethingNotThere\u' It then receives, to my surprise: '\u\u' followed by: '1\u\u' then sends: '\u00041\u' and receives again: '\u\u' Are these proper responses.. is the driver m

Re: [basex-talk] Protocol Question

2013-07-23 Thread Gerald de Jong
Woops, somehow sent before I intended. Just a sec. On Tue, Jul 23, 2013 at 1:40 PM, Gerald de Jong wrote: > I'm trying to quickly prototype a REST server which uses BaseX for > persistence using NodeJS. > > I'm able to create a session, add a document, query that document, and > then close the

[basex-talk] Protocol Question

2013-07-23 Thread Gerald de Jong
I'm trying to quickly prototype a REST server which uses BaseX for persistence using NodeJS. I'm able to create a session, add a document, query that document, and then close the session. Fine. But when I create a query that should return no results, it seems the NodeJS module for BaseX I'm usin