Hello,
when one client is uploading file to a database (let's say Database1), upd. basex file is created and exists until the file is uploaded to the database Database1. Problem is that meanwhile the upload is running, all other clients reading data from the Database1 read the data very, very slowly. Also clients trying to read data from Database2 or Database3 reads the data very, very slowly while the upload to Database1 is running. Also the client trying to upload data to Database2 is not successful until the upload to Database1 is done.
Database1, Database2 and Database3 are databases in the same BaseX database.
Can I speed up the loading data from various databases at the same time or the parallel uploading? I've read about the PARALLEL option in .basex option file, but are there any best practices what the value should be regarding to the database size or the number of databases? And are there similar best practices to CACHETIMEOUT, TIMEOUT and KEEPALIVE options? Are there more information than what is at http://docs.basex.org/wiki/Options ?
Thanks for your reply in advance.
Best regards,
Radim Havlicek
Hi Radim,
when one client is uploading file to a database (let's say Database1), upd.basex file is created and exists until the file is uploaded to the database Database1. Problem is that meanwhile the upload is running, all other clients reading data from the Database1 read the data very, very slowly. Also clients trying to read data from Database2 or Database3 reads the data very, very slowly while the upload to Database1 is running. Also the client trying to upload data to Database2 is not successful until the upload to Database1 is done.
In our article on Transactions [1], you’ll learn about how concurrent read and write operations are handled in BaseX. In general, if you write to Database1, you can read/write Database2 in parallel.
Could you tell us more about how you “upload” documents to a database? If you work with the HTTP architecture, and if the process of uploading a document takes long in itself, you could use RESTXQ and process client input in multiple steps (e.g. insert the document only in the database after it has been fully retrieved by the server).
Dĕkuji & pozdravy, Christian
[1] http://docs.basex.org/wiki/Transactions
Database1, Database2 and Database3 are databases in the same BaseX database.
Can I speed up the loading data from various databases at the same time or the parallel uploading? I've read about the PARALLEL option in .basex option file, but are there any best practices what the value should be regarding to the database size or the number of databases? And are there similar best practices to CACHETIMEOUT, TIMEOUT and KEEPALIVE options? Are there more information than what is at http://docs.basex.org/wiki/Options ?
Thanks for your reply in advance. Best regards,
Radim Havlicek
basex-talk@mailman.uni-konstanz.de