Hi,
I am experimenting with BaseX and have so far built a little toy application that uses an embedded BaseX database. All xml-files in a certain folder, e.g., c:\myXml, is added to the database using the Create and Add commands. This works fine and I can run interesting (and efficient) queries on this. Now we get to my questions:
1. Next time I start my application, I do not want to rebuild the database so I simply connect using the Open command. How do I make sure that the BaseX representation/indexes are synched with the actual XML files in the c:\myXml folder? Does this happen automatically as a side-effect of Open or do I need to take some steps? I am particularly concerned about the case where other programs have manipulated the files when my app was shutdown. 2. Is it possible to do any parts of creating, adding, and opening concurrently? 3. Is it possible to cache results (full or partial) of XQueries? 4. Is it possible to attach schema validation? I do not mind hacking a bit. It seems like there is a SAXHandler available (new Set(Prop.INTPARSE, "false")), could I possibly override that implementation?
Cheers,
Anders
Dear Anders,
thanks for your mail; finally some feedback:
Next time I start my application, I do not want to rebuild the database so I simply connect using the Open command. How do I make sure that the BaseX representation/indexes are synched with the actual XML files in the c:\myXml folder?
The creation of a database with initial input files is more like an "import", which means that we don't offer any synchronization features to keep both states updated.
Is it possible to do any parts of creating, adding, and opening concurrently?
If the client/server architecture is used, all operations will be organized in a way such that no concurrent write transactions will take place. Multiple read transactions are allowed, though (one of our Wiki entry gives some more details [1]).
Is it possible to cache results (full or partial) of XQueries?
Due to the active development of caching systems like memcached and Voldemort (both of which have been successfully connected with BaseX), we don't offer any built-in caching mechanisms. However, queries will be evaluated faster when the same server instance is used, as various block and index buffers will come into play.
Is it possible to attach schema validation? I do not mind hacking a bit. It seems like there is a SAXHandler available (new Set(Prop.INTPARSE, "false")), could I possibly override that implementation?
I'm sorry there is no xml schema support inside BaseX, but we know that users have e.g. attached Saxon in pre/post processing steps to apply some schema validation.
Hope this helps, Christian
[1] http://docs.basex.org/wiki/Transaction_Management
Cheers,
Anders
BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
Thanks for your feedback, this is very helpful!
a quick follow-up question: the cache- and schema validation-integrations that you refer to, are any of those open source? If I can avoid re-inventing anything then that would be truly wonderful ;)
-- Anders
On Thu, Feb 2, 2012 at 1:53 AM, Christian Grün christian.gruen@gmail.comwrote:
Dear Anders,
thanks for your mail; finally some feedback:
Next time I start my application, I do not want to rebuild the database
so I
simply connect using the Open command. How do I make sure that the BaseX representation/indexes are synched with the actual XML files in the
c:\myXml
folder?
The creation of a database with initial input files is more like an "import", which means that we don't offer any synchronization features to keep both states updated.
Is it possible to do any parts of creating, adding, and opening concurrently?
If the client/server architecture is used, all operations will be organized in a way such that no concurrent write transactions will take place. Multiple read transactions are allowed, though (one of our Wiki entry gives some more details [1]).
Is it possible to cache results (full or partial) of XQueries?
Due to the active development of caching systems like memcached and Voldemort (both of which have been successfully connected with BaseX), we don't offer any built-in caching mechanisms. However, queries will be evaluated faster when the same server instance is used, as various block and index buffers will come into play.
Is it possible to attach schema validation? I do not mind hacking a bit.
It
seems like there is a SAXHandler available (new Set(Prop.INTPARSE, "false")), could I possibly override that implementation?
I'm sorry there is no xml schema support inside BaseX, but we know that users have e.g. attached Saxon in pre/post processing steps to apply some schema validation.
Hope this helps, Christian
[1] http://docs.basex.org/wiki/Transaction_Management
Cheers,
Anders
BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
a quick follow-up question: the cache- and schema validation-integrations that you refer to, are any of those open source? If I can avoid re-inventing anything then that would be truly wonderful ;)
We may soon add some documentation on how to fuse BaseX and Voldemort. Regarding the integration of memcached and Saxon, both solutions were pretty based on a few lines of code, so it would probably take more time to cleanly extract and document them. Maybe we'll have more time for that on future (or as part of a commercial request ;).
Best, Christian
basex-talk@mailman.uni-konstanz.de