Hi,
I just wanted to confirm some assumptions about the safety of accessing a single BaseX instance from multiple JVMs, or from multiple org.basex.api.xqj.BXQDataSource class instances loaded by different class loaders in the same VM.
Am I correct that it is safe to access the same database via XQJ in such situations?
By "safety," I mean that
a) the database protects its internal data structures in the face of such concurrency and
b) there is a serializable schedule of individual XQJ executions that produces the final database state.
Is this true?
Please note that I'm not asking for transactions across multiple XQJ executions here.
- Godmar
Hi Godmar,
I just wanted to confirm some assumptions about the safety of accessing a single BaseX instance from multiple JVMs, or from multiple org.basex.api.xqj.BXQDataSource class instances loaded by different class loaders in the same VM.
All read-only operations are safe and can be run via multiple JVMs and threads.
Christian
Am I correct that it is safe to access the same database via XQJ in such situations? By "safety," I mean that a) the database protects its internal data structures in the face of such concurrency and b) there is a serializable schedule of individual XQJ executions that produces the final database state. Is this true? Please note that I'm not asking for transactions across multiple XQJ executions here. - Godmar _______________________________________________ BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
On Tue, Aug 17, 2010 at 5:06 PM, Christian Grün christian.gruen@gmail.comwrote:
Hi Godmar,
I just wanted to confirm some assumptions about the safety of accessing a single BaseX instance from multiple JVMs, or from multiple org.basex.api.xqj.BXQDataSource class instances loaded by different class loaders in the same VM.
All read-only operations are safe and can be run via multiple JVMs and threads.
What's the safety and semantics of modifying XQuery update operations?
What's the safety and semantics of multiple read-only operations in the presence of a single instance that performs modifying updates?
- Godmar
If you want to perform updates, you won't get happy using XQJ. You'll need to switch to our own API for that, or have (quite) some patience until this will be on our todo list.
Christian
On Tue, Aug 17, 2010 at 11:57 PM, Godmar Back godmar@gmail.com wrote:
On Tue, Aug 17, 2010 at 5:06 PM, Christian Grün christian.gruen@gmail.com wrote:
Hi Godmar,
I just wanted to confirm some assumptions about the safety of accessing a single BaseX instance from multiple JVMs, or from multiple org.basex.api.xqj.BXQDataSource class instances loaded by different class loaders in the same VM.
All read-only operations are safe and can be run via multiple JVMs and threads.
What's the safety and semantics of modifying XQuery update operations?
What's the safety and semantics of multiple read-only operations in the presence of a single instance that performs modifying updates?
- Godmar
On Tue, Aug 17, 2010 at 6:15 PM, Christian Grün christian.gruen@gmail.comwrote:
If you want to perform updates, you won't get happy using XQJ.
Could you elaborate?
In particular, I'm wondering if multiple concurrent updates are unsafe (that is, lead to internal inconsistencies in BaseX that prevent further use of the database) or merely lead to undefined results (that is, the resulting XML may not result from any serialization of the individual update requests).
You'll need to switch to our own API for that, or have (quite) some patience until this will be on our todo list.
What does 'this' in your sentence refer to? Safety? Serializability? Transactions?
- Godmar
In particular, I'm wondering if multiple concurrent updates are unsafe (that is, lead to internal inconsistencies in BaseX that prevent further use of the database)
dito.
What does 'this' in your sentence refer to? Safety? Serializability? Transactions?
it simply means we have no free resources to put more effort on XQJ update issues. sorry.
christian
On Tue, Aug 17, 2010 at 6:32 PM, Christian Grün christian.gruen@gmail.comwrote:
In particular, I'm wondering if multiple concurrent updates are unsafe
(that
is, lead to internal inconsistencies in BaseX that prevent further use of the database)
dito.
What does 'this' in your sentence refer to? Safety? Serializability? Transactions?
it simply means we have no free resources to put more effort on XQJ update issues. sorry.
I'm slow and I'm sorry I don't distinguish between XQJ, XQJ updates, and BaseX.
Is it possible to use BaseX as a library and have multiple JVMs access and update the same database in a way that is safe?
If so, how?
As I've stated before, I would prefer a non-BaseX-specific way of interacting with it, such as XQJ, but if that's not possible because XQJ is in essence a standard never adopted and soon to be abandoned, then I'm also fine with any robust method that allows me to link my in-memory, org.w3c.dom* implementation-based model to the database. (I had sent out an email about this previously, with no resonance.)
- Godmar
basex-talk@mailman.uni-konstanz.de