It is so cool to browse the source code behind a program I use so regularly... I should be able to find any other answers I need in the source code :-) I'll let you know if there's something I need that I can't find. Thank you for your help, I found all the answers I needed on this topic :)
I think extending the cleanup on session timeout to include the query ids sounds like a good idea. Noob question: did you even want my opinion? I couldn't tell for sure...
Thank you so much for your time, and for your really awesome product!
Paul Fancher
-----Original Message----- From: Christian Grün [mailto:christian.gruen@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 specified time. The cleanup could be extended to the query ids.
If you are interested, I invite you to check out the BaseX sources. The keepalive option is checked in the BaseXServer class:
https://github.com/BaseXdb/basex/blob/master/basex-core/src/main/java/org/ba...
Best, Christian
On Wed, Mar 12, 2014 at 2:00 PM, Paul Fancher pfancher@apexgeo.com wrote:
I'm not entirely familiar with server architecture, so I can't say for certain that this could be a memory hog. I currently have BaseX set up as a service on a Windows Server running 24/7, so in the ideal circumstance that the server never restarts, won't the ID's and queries left behind by failed connections accumulate indefinitely?
Concerning the KEEPALIVE [1], how does BaseX identify a unique client? For example, is it by a combination of username and remote IP address, or maybe a combination of username, remote IP address, and remote port number? I ask because in the failure mode I designed, connections are automatically rebuilt from scratch on failure, which keeps the username and IP address consistent, but uses a different port number. If I could KEEPALIVE the connection by preserving the original port number, now would be a really good time to find that out.
[1] http://docs.basex.org/wiki/Options#KEEPALIVE
-----Original Message----- From: Christian Grün [mailto:christian.gruen@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 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 the answer to: if a query is defined (which returns an ID), and the connection to the BaseX server fails immediately thereafter, and a new connection is immediately built, will the ID still be associated with the query in the BaseX server or will the query be automatically erased when the connection fails?
I would need to check the sources in more detail, but I believe the ID will remain to be associated with the query if a connection is not properly closed. If this should turn out to be a memory hog, we could clean up unused IDs after the value assigned to KEEPALIVE [1] has passed.
Hope this helps, Christian
[1] http://docs.basex.org/wiki/Options#KEEPALIVE
-- This email was Anti Virus checked by Astaro Security Gateway. http://www.astaro.com