db:optimize
Wednesday, 29 January 2020 · 15 messages · last reply 30 Jan 2020
ВВ
Ветошкин Владимир29 Jan 2020 08:25 #
Hi, everybody!
I use basex+php.
When I call
db:optimize('A') from basex gui I can read from db 'B'. But if I call db:optimize('A') from php (php cli) I can't read 'B' while the first query is working. Why? And how can I solve it?
I wracked my brain...--
С уважением,
Ветошкин Владимир Владимирович
FN
first name last name29 Jan 2020 09:57 #
"For example, if you only read data, you can easily run several clients (standalone, GUI, database clients) at the same time. If you update your data, however, you shouldn’t use the GUI or a standalone instance at the same time."
[1] http://docs.basex.org/wiki/Startup#Concurrent_Operations
Quoted text · Ветошкин Владимир · 16 lines
On Wed, Jan 29, 2020 at 9:25 AM Ветошкин Владимир <en-trance at yandex.ru> wrote: > Hi, everybody! > > I use basex+php. > When I call db:optimize('A') from basex gui I can read from db 'B'. > But if I call db:optimize('A') from php (php cli) I can't read 'B' while > the first query is working. > Why? And how can I solve it? > I wracked my brain... > > -- > С уважением, > Ветошкин Владимир Владимирович > >
FN
first name last name29 Jan 2020 10:02 #
But if you are willing to give up that GUI, you could instead use the DBA interface [2] in your browser, and write all your code there if you start BaseX's http server [1].
However, the DBA interface will not give you auto-complete (and other nice things you see in the GUI), but you can still write code, run code, and save it to disk there.
[1] http://docs.basex.org/wiki/Command-Line_Options#HTTP_Server [2] http://docs.basex.org/wiki/DBA
Quoted text · first name last name · 26 lines
On Wed, Jan 29, 2020 at 10:57 AM first name last name < randomcoder1 at gmail.com> wrote: > "For example, if you only read data, you can easily run several clients > (standalone, GUI, database clients) at the same time. If you update your > data, however, you shouldn’t use the GUI or a standalone instance at the > same time." > [1] http://docs.basex.org/wiki/Startup#Concurrent_Operations > > On Wed, Jan 29, 2020 at 9:25 AM Ветошкин Владимир <en-trance at yandex.ru> > wrote: > >> Hi, everybody! >> >> I use basex+php. >> When I call db:optimize('A') from basex gui I can read from db 'B'. >> But if I call db:optimize('A') from php (php cli) I can't read 'B' while >> the first query is working. >> Why? And how can I solve it? >> I wracked my brain... >> >> -- >> С уважением, >> Ветошкин Владимир Владимирович >> >> >
ВВ
Ветошкин Владимир29 Jan 2020 10:13 #
Thank you.
But I want non-blocking read/write operations (in different databases) with php. Is it possible? Or I only have to wait finishing update operation?
Quoted text · first name last name · 28 lines
29.01.2020, 12:02, "first name last name" <randomcoder1 at gmail.com>: > But if you are willing to give up that GUI, you could instead use the DBA interface [2] in your browser, and write all your code there if you start BaseX's http server [1].However, the DBA interface will not give you auto-complete (and other nice things you see in the GUI), but you can still write code, run code, and save it to disk there. > [1] http://docs.basex.org/wiki/Command-Line_Options#HTTP_Server > [2] http://docs.basex.org/wiki/DBA > > > > > > On Wed, Jan 29, 2020 at 10:57 AM first name last name <randomcoder1 at gmail.com> wrote: > > > "For example, if you only read data, you can easily run several clients (standalone, GUI, database clients) at the same time. If you update your data, however, you shouldn’t use the GUI or a standalone instance at the same time." > > [1] http://docs.basex.org/wiki/Startup#Concurrent_Operations > > > > On Wed, Jan 29, 2020 at 9:25 AM Ветошкин Владимир <en-trance at yandex.ru> wrote: > > > > > Hi, everybody! > > > > > > I use basex+php. > > > When I call db:optimize('A') from basex gui I can read from db 'B'. > > > But if I call db:optimize('A') from php (php cli) I can't read 'B' while the first query is working. > > > Why? And how can I solve it? > > > I wracked my brain... > > > > > > -- > > > С уважением, > > > Ветошкин Владимир Владимирович > > >
--
С уважением,
Ветошкин Владимир Владимирович
CG
Christian Grün29 Jan 2020 18:28 #
Hi Владимир,
Quoted text · Ветошкин Владимир · 2 lines
> But I want non-blocking read/write operations (in different databases) with php. Is it possible? > Or I only have to wait finishing update operation?
I haven’t done anything with PHP for more than 10 years now, but maybe you need to use parallel or pthreads and do the work via multiple threads. Are you already working with several BaseX client instances?
Christian
Quoted text · Ветошкин Владимир · 39 lines
On Wed, Jan 29, 2020 at 10:14 AM Ветошкин Владимир <en-trance at yandex.ru> wrote: > > Thank you. > > 29.01.2020, 12:02, "first name last name" <randomcoder1 at gmail.com>: > > But if you are willing to give up that GUI, you could instead use the DBA interface [2] in your browser, and write all your code there if you start BaseX's http server [1]. > However, the DBA interface will not give you auto-complete (and other nice things you see in the GUI), but you can still write code, run code, and save it to disk there. > > [1] http://docs.basex.org/wiki/Command-Line_Options#HTTP_Server > [2] http://docs.basex.org/wiki/DBA > > > On Wed, Jan 29, 2020 at 10:57 AM first name last name <randomcoder1 at gmail.com> wrote: > > "For example, if you only read data, you can easily run several clients (standalone, GUI, database clients) at the same time. If you update your data, however, you shouldn’t use the GUI or a standalone instance at the same time." > [1] http://docs.basex.org/wiki/Startup#Concurrent_Operations > > On Wed, Jan 29, 2020 at 9:25 AM Ветошкин Владимир <en-trance at yandex.ru> wrote: > > Hi, everybody! > > I use basex+php. > When I call db:optimize('A') from basex gui I can read from db 'B'. > But if I call db:optimize('A') from php (php cli) I can't read 'B' while the first query is working. > Why? And how can I solve it? > I wracked my brain... > > -- > С уважением, > Ветошкин Владимир Владимирович > > > > > -- > С уважением, > Ветошкин Владимир Владимирович >
ВВ
Ветошкин Владимир29 Jan 2020 19:05 #
Hi, Christian! I hope you're well.No, there is only one client at this time.
Today evening I have tried to call exec function (php) to run another basex client (basex -q"
db:optimize..."). And while it was working I can read from other databases like a charm! :)
As I can see, it solves my problems. Am I right doing so?Quoted text · Christian Grün · 55 lines
29.01.2020, 20:28, "Christian Grün" <christian.gruen at gmail.com>: > Hi Владимир, > > > > > But I want non-blocking read/write operations (in different databases) with php. Is it possible? > > Or I only have to wait finishing update operation? > > I haven’t done anything with PHP for more than 10 years now, but maybe > you need to use parallel or pthreads and do the work via multiple > threads. Are you already working with several BaseX client instances? > > Christian > > > > On Wed, Jan 29, 2020 at 10:14 AM Ветошкин Владимир <en-trance at yandex.ru> wrote: > > > > Thank you. > > > > 29.01.2020, 12:02, "first name last name" <randomcoder1 at gmail.com>: > > > > But if you are willing to give up that GUI, you could instead use the DBA interface [2] in your browser, and write all your code there if you start BaseX's http server [1]. > > However, the DBA interface will not give you auto-complete (and other nice things you see in the GUI), but you can still write code, run code, and save it to disk there. > > > > [1] http://docs.basex.org/wiki/Command-Line_Options#HTTP_Server > > [2] http://docs.basex.org/wiki/DBA > > > > > > On Wed, Jan 29, 2020 at 10:57 AM first name last name <randomcoder1 at gmail.com> wrote: > > > > "For example, if you only read data, you can easily run several clients (standalone, GUI, database clients) at the same time. If you update your data, however, you shouldn’t use the GUI or a standalone instance at the same time." > > [1] http://docs.basex.org/wiki/Startup#Concurrent_Operations > > > > On Wed, Jan 29, 2020 at 9:25 AM Ветошкин Владимир <en-trance at yandex.ru> wrote: > > > > Hi, everybody! > > > > I use basex+php. > > When I call db:optimize('A') from basex gui I can read from db 'B'. > > But if I call db:optimize('A') from php (php cli) I can't read 'B' while the first query is working. > > Why? And how can I solve it? > > I wracked my brain... > > > > -- > > С уважением, > > Ветошкин Владимир Владимирович > > > > > > > > > > -- > > С уважением, > > Ветошкин Владимир Владимирович
--
С уважением,
Ветошкин Владимир Владимирович
CG
Christian Grün29 Jan 2020 19:10 #
Quoted text · Ветошкин Владимир · 1 line
> As I can see, it solves my problems. Am I right doing so?
The 'basex' standalone client does not connect to the server instance of BaseX, so you may encounter conflicts. Did your the Wiki pages referenced by.. "first name last name"?
Ветошкин Владимир <en-trance at yandex.ru> schrieb am Mi., 29. Jan. 2020, 19:05:
Quoted text · Ветошкин Владимир · 84 lines
> Hi, Christian! I hope you're well. > No, there is only one client at this time. > > Today evening I have tried to call exec function (php) to run another > basex client (basex -q"db:optimize..."). > And while it was working I can read from other databases like a charm! :) > > As I can see, it solves my problems. Am I right doing so? > > 29.01.2020, 20:28, "Christian Grün" <christian.gruen at gmail.com>: > > Hi Владимир, > > But I want non-blocking read/write operations (in different databases) > with php. Is it possible? > Or I only have to wait finishing update operation? > > > I haven’t done anything with PHP for more than 10 years now, but maybe > you need to use parallel or pthreads and do the work via multiple > threads. Are you already working with several BaseX client instances? > > Christian > > > > On Wed, Jan 29, 2020 at 10:14 AM Ветошкин Владимир <en-trance at yandex.ru> > wrote: > > > Thank you. > > 29.01.2020, 12:02, "first name last name" <randomcoder1 at gmail.com>: > > But if you are willing to give up that GUI, you could instead use the DBA > interface [2] in your browser, and write all your code there if you start > BaseX's http server [1]. > However, the DBA interface will not give you auto-complete (and other > nice things you see in the GUI), but you can still write code, run code, > and save it to disk there. > > [1] http://docs.basex.org/wiki/Command-Line_Options#HTTP_Server > [2] http://docs.basex.org/wiki/DBA > > > On Wed, Jan 29, 2020 at 10:57 AM first name last name < > randomcoder1 at gmail.com> wrote: > > "For example, if you only read data, you can easily run several clients > (standalone, GUI, database clients) at the same time. If you update your > data, however, you shouldn’t use the GUI or a standalone instance at the > same time." > [1] http://docs.basex.org/wiki/Startup#Concurrent_Operations > > On Wed, Jan 29, 2020 at 9:25 AM Ветошкин Владимир <en-trance at yandex.ru> > wrote: > > Hi, everybody! > > I use basex+php. > When I call db:optimize('A') from basex gui I can read from db 'B'. > But if I call db:optimize('A') from php (php cli) I can't read 'B' while > the first query is working. > Why? And how can I solve it? > I wracked my brain... > > -- > С уважением, > Ветошкин Владимир Владимирович > > > > > -- > С уважением, > Ветошкин Владимир Владимирович > > > > -- > С уважением, > Ветошкин Владимир Владимирович > >
ВВ
Ветошкин Владимир29 Jan 2020 19:23 #
Yes, I have seen that wiki pages...What kind of conflicts?
Do you mean "or may even lead to corrupt databases." ?
Now I only get error when I read updating database like "database is updating..."
Quoted text · Christian Grün · 84 lines
29.01.2020, 21:11, "Christian Grün" <christian.gruen at gmail.com>: > > As I can see, it solves my problems. Am I right doing so? > > > The 'basex' standalone client does not connect to the server instance of BaseX, so you may encounter conflicts. Did your the Wiki pages referenced by.. "first name last name"? > > > > > Ветошкин Владимир <en-trance at yandex.ru> schrieb am Mi., 29. Jan. 2020, 19:05: > > > > Hi, Christian! I hope you're well.No, there is only one client at this time. > > > > > > Today evening I have tried to call exec function (php) to run another basex client (basex -q"db:optimize..."). > > And while it was working I can read from other databases like a charm! :) > > > > > > As I can see, it solves my problems. Am I right doing so? > > > > 29.01.2020, 20:28, "Christian Grün" <christian.gruen at gmail.com>: > > > > > Hi Владимир, > > > > > > > > > > > > > But I want non-blocking read/write operations (in different databases) with php. Is it possible? > > > > Or I only have to wait finishing update operation? > > > > > > I haven’t done anything with PHP for more than 10 years now, but maybe > > > you need to use parallel or pthreads and do the work via multiple > > > threads. Are you already working with several BaseX client instances? > > > > > > Christian > > > > > > > > > > > > On Wed, Jan 29, 2020 at 10:14 AM Ветошкин Владимир <en-trance at yandex.ru> wrote: > > > > > > > > > > Thank you. > > > > > > > > 29.01.2020, 12:02, "first name last name" <randomcoder1 at gmail.com>: > > > > > > > > But if you are willing to give up that GUI, you could instead use the DBA interface [2] in your browser, and write all your code there if you start BaseX's http server [1]. > > > > However, the DBA interface will not give you auto-complete (and other nice things you see in the GUI), but you can still write code, run code, and save it to disk there. > > > > > > > > [1] http://docs.basex.org/wiki/Command-Line_Options#HTTP_Server > > > > [2] http://docs.basex.org/wiki/DBA > > > > > > > > > > > > On Wed, Jan 29, 2020 at 10:57 AM first name last name <randomcoder1 at gmail.com> wrote: > > > > > > > > "For example, if you only read data, you can easily run several clients (standalone, GUI, database clients) at the same time. If you update your data, however, you shouldn’t use the GUI or a standalone instance at the same time." > > > > [1] http://docs.basex.org/wiki/Startup#Concurrent_Operations > > > > > > > > On Wed, Jan 29, 2020 at 9:25 AM Ветошкин Владимир <en-trance at yandex.ru> wrote: > > > > > > > > Hi, everybody! > > > > > > > > I use basex+php. > > > > When I call db:optimize('A') from basex gui I can read from db 'B'. > > > > But if I call db:optimize('A') from php (php cli) I can't read 'B' while the first query is working. > > > > Why? And how can I solve it? > > > > I wracked my brain... > > > > > > > > -- > > > > С уважением, > > > > Ветошкин Владимир Владимирович > > > > > > > > > > > > > > > > > > > > -- > > > > С уважением, > > > > Ветошкин Владимир Владимирович > > > > > > > > > > -- > > С уважением, > > Ветошкин Владимир Владимирович
--
С уважением,
Ветошкин Владимир Владимирович
CG
Christian Grün29 Jan 2020 19:27 #
In the worst case, yes. If you prefer to call basex via php and exec, invoke basexclient instead of basex:
http://docs.basex.org/wiki/Database_Server
Ветошкин Владимир <en-trance at yandex.ru> schrieb am Mi., 29. Jan. 2020, 19:23:
Quoted text · Ветошкин Владимир · 110 lines
> Yes, I have seen that wiki pages... > What kind of conflicts? > Do you mean "or may even lead to corrupt databases." ? > Now I only get error when I read updating database like "database is > updating..." > > > 29.01.2020, 21:11, "Christian Grün" <christian.gruen at gmail.com>: > > > As I can see, it solves my problems. Am I right doing so? > > The 'basex' standalone client does not connect to the server instance of > BaseX, so you may encounter conflicts. Did your the Wiki pages referenced > by.. "first name last name"? > > > > Ветошкин Владимир <en-trance at yandex.ru> schrieb am Mi., 29. Jan. 2020, > 19:05: > > Hi, Christian! I hope you're well. > No, there is only one client at this time. > > Today evening I have tried to call exec function (php) to run another > basex client (basex -q"db:optimize..."). > And while it was working I can read from other databases like a charm! :) > > As I can see, it solves my problems. Am I right doing so? > > 29.01.2020, 20:28, "Christian Grün" <christian.gruen at gmail.com>: > > Hi Владимир, > > But I want non-blocking read/write operations (in different databases) > with php. Is it possible? > Or I only have to wait finishing update operation? > > > I haven’t done anything with PHP for more than 10 years now, but maybe > you need to use parallel or pthreads and do the work via multiple > threads. Are you already working with several BaseX client instances? > > Christian > > > > On Wed, Jan 29, 2020 at 10:14 AM Ветошкин Владимир <en-trance at yandex.ru> > wrote: > > > Thank you. > > 29.01.2020, 12:02, "first name last name" <randomcoder1 at gmail.com>: > > But if you are willing to give up that GUI, you could instead use the DBA > interface [2] in your browser, and write all your code there if you start > BaseX's http server [1]. > However, the DBA interface will not give you auto-complete (and other > nice things you see in the GUI), but you can still write code, run code, > and save it to disk there. > > [1] http://docs.basex.org/wiki/Command-Line_Options#HTTP_Server > [2] http://docs.basex.org/wiki/DBA > > > On Wed, Jan 29, 2020 at 10:57 AM first name last name < > randomcoder1 at gmail.com> wrote: > > "For example, if you only read data, you can easily run several clients > (standalone, GUI, database clients) at the same time. If you update your > data, however, you shouldn’t use the GUI or a standalone instance at the > same time." > [1] http://docs.basex.org/wiki/Startup#Concurrent_Operations > > On Wed, Jan 29, 2020 at 9:25 AM Ветошкин Владимир <en-trance at yandex.ru> > wrote: > > Hi, everybody! > > I use basex+php. > When I call db:optimize('A') from basex gui I can read from db 'B'. > But if I call db:optimize('A') from php (php cli) I can't read 'B' while > the first query is working. > Why? And how can I solve it? > I wracked my brain... > > -- > С уважением, > Ветошкин Владимир Владимирович > > > > > -- > С уважением, > Ветошкин Владимир Владимирович > > > > -- > С уважением, > Ветошкин Владимир Владимирович > > > > -- > С уважением, > Ветошкин Владимир Владимирович > >
ВВ
Ветошкин Владимир29 Jan 2020 19:48 #
Yes, the system works on php and I can call basex only via php client of basex or exec function.Now all functions work via php client of basex. If I additionally will use exec with basexclient - it won't corrupt databases?
Quoted text · Christian Grün · 108 lines
29.01.2020, 21:27, "Christian Grün" <christian.gruen at gmail.com>: > In the worst case, yes. If you prefer to call basex via php and exec, invoke basexclient instead of basex: > > > http://docs.basex.org/wiki/Database_Server > > > > Ветошкин Владимир <en-trance at yandex.ru> schrieb am Mi., 29. Jan. 2020, 19:23: > > > > Yes, I have seen that wiki pages...What kind of conflicts? > > Do you mean "or may even lead to corrupt databases." ? > > Now I only get error when I read updating database like "database is updating..." > > > > > > 29.01.2020, 21:11, "Christian Grün" <christian.gruen at gmail.com>: > > > > > > As I can see, it solves my problems. Am I right doing so? > > > > > > > > > The 'basex' standalone client does not connect to the server instance of BaseX, so you may encounter conflicts. Did your the Wiki pages referenced by.. "first name last name"? > > > > > > > > > > > > > > > Ветошкин Владимир <en-trance at yandex.ru> schrieb am Mi., 29. Jan. 2020, 19:05: > > > > > > > > > > Hi, Christian! I hope you're well.No, there is only one client at this time. > > > > > > > > > > > > Today evening I have tried to call exec function (php) to run another basex client (basex -q"db:optimize..."). > > > > And while it was working I can read from other databases like a charm! :) > > > > > > > > > > > > As I can see, it solves my problems. Am I right doing so? > > > > > > > > 29.01.2020, 20:28, "Christian Grün" <christian.gruen at gmail.com>: > > > > > > > > > Hi Владимир, > > > > > > > > > > > > > > > > > > > > > But I want non-blocking read/write operations (in different databases) with php. Is it possible? > > > > > > Or I only have to wait finishing update operation? > > > > > > > > > > I haven’t done anything with PHP for more than 10 years now, but maybe > > > > > you need to use parallel or pthreads and do the work via multiple > > > > > threads. Are you already working with several BaseX client instances? > > > > > > > > > > Christian > > > > > > > > > > > > > > > > > > > > On Wed, Jan 29, 2020 at 10:14 AM Ветошкин Владимир <en-trance at yandex.ru> wrote: > > > > > > > > > > > > > > > > Thank you. > > > > > > > > > > > > 29.01.2020, 12:02, "first name last name" <randomcoder1 at gmail.com>: > > > > > > > > > > > > But if you are willing to give up that GUI, you could instead use the DBA interface [2] in your browser, and write all your code there if you start BaseX's http server [1]. > > > > > > However, the DBA interface will not give you auto-complete (and other nice things you see in the GUI), but you can still write code, run code, and save it to disk there. > > > > > > > > > > > > [1] http://docs.basex.org/wiki/Command-Line_Options#HTTP_Server > > > > > > [2] http://docs.basex.org/wiki/DBA > > > > > > > > > > > > > > > > > > On Wed, Jan 29, 2020 at 10:57 AM first name last name <randomcoder1 at gmail.com> wrote: > > > > > > > > > > > > "For example, if you only read data, you can easily run several clients (standalone, GUI, database clients) at the same time. If you update your data, however, you shouldn’t use the GUI or a standalone instance at the same time." > > > > > > [1] http://docs.basex.org/wiki/Startup#Concurrent_Operations > > > > > > > > > > > > On Wed, Jan 29, 2020 at 9:25 AM Ветошкин Владимир <en-trance at yandex.ru> wrote: > > > > > > > > > > > > Hi, everybody! > > > > > > > > > > > > I use basex+php. > > > > > > When I call db:optimize('A') from basex gui I can read from db 'B'. > > > > > > But if I call db:optimize('A') from php (php cli) I can't read 'B' while the first query is working. > > > > > > Why? And how can I solve it? > > > > > > I wracked my brain... > > > > > > > > > > > > -- > > > > > > С уважением, > > > > > > Ветошкин Владимир Владимирович > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > > С уважением, > > > > > > Ветошкин Владимир Владимирович > > > > > > > > > > > > > > > > > > > > -- > > > > С уважением, > > > > Ветошкин Владимир Владимирович > > > > > > > > > > -- > > С уважением, > > Ветошкин Владимир Владимирович
--
С уважением,
Ветошкин Владимир Владимирович
ВВ
Ветошкин Владимир30 Jan 2020 09:01 #
Hmm..
If I run [basex -q"
db:optimize('A')"], I can read from db 'B'. But if I run [basexclient -Uadmin -Padmin -q"db:optimize('A')"], I can't read from db 'B'.Quoted text · Ветошкин Владимир · 100 lines
29.01.2020, 21:48, "Ветошкин Владимир" <en-trance at yandex.ru>: > Yes, the system works on php and I can call basex only via php client of basex or exec function.Now all functions work via php client of basex. > If I additionally will use exec with basexclient - it won't corrupt databases? > 29.01.2020, 21:27, "Christian Grün" <christian.gruen at gmail.com>: > > > In the worst case, yes. If you prefer to call basex via php and exec, invoke basexclient instead of basex: > > > > http://docs.basex.org/wiki/Database_Server > > Ветошкин Владимир <en-trance at yandex.ru> schrieb am Mi., 29. Jan. 2020, 19:23: > > > > > Yes, I have seen that wiki pages...What kind of conflicts? > > > Do you mean "or may even lead to corrupt databases." ? > > > Now I only get error when I read updating database like "database is updating..." > > > 29.01.2020, 21:11, "Christian Grün" <christian.gruen at gmail.com>: > > > > > > > > As I can see, it solves my problems. Am I right doing so? > > > > > > > > The 'basex' standalone client does not connect to the server instance of BaseX, so you may encounter conflicts. Did your the Wiki pages referenced by.. "first name last name"? > > > > > > > > Ветошкин Владимир <en-trance at yandex.ru> schrieb am Mi., 29. Jan. 2020, 19:05: > > > > > > > > > Hi, Christian! I hope you're well.No, there is only one client at this time. > > > > > > > > > > Today evening I have tried to call exec function (php) to run another basex client (basex -q"db:optimize..."). > > > > > And while it was working I can read from other databases like a charm! :) > > > > > > > > > > As I can see, it solves my problems. Am I right doing so? > > > > > 29.01.2020, 20:28, "Christian Grün" <christian.gruen at gmail.com>: > > > > > > > > > > > Hi Владимир, > > > > > > > > > > > > > > > > > > > But I want non-blocking read/write operations (in different databases) with php. Is it possible? > > > > > > > Or I only have to wait finishing update operation? > > > > > > > > > > > > I haven’t done anything with PHP for more than 10 years now, but maybe > > > > > > you need to use parallel or pthreads and do the work via multiple > > > > > > threads. Are you already working with several BaseX client instances? > > > > > > > > > > > > Christian > > > > > > > > > > > > > > > > > > > > > > > > On Wed, Jan 29, 2020 at 10:14 AM Ветошкин Владимир <en-trance at yandex.ru> wrote: > > > > > > > > > > > > > Thank you. > > > > > > > > > > > > > > 29.01.2020, 12:02, "first name last name" <randomcoder1 at gmail.com>: > > > > > > > > > > > > > > But if you are willing to give up that GUI, you could instead use the DBA interface [2] in your browser, and write all your code there if you start BaseX's http server [1]. > > > > > > > However, the DBA interface will not give you auto-complete (and other nice things you see in the GUI), but you can still write code, run code, and save it to disk there. > > > > > > > > > > > > > > [1] http://docs.basex.org/wiki/Command-Line_Options#HTTP_Server > > > > > > > [2] http://docs.basex.org/wiki/DBA > > > > > > > > > > > > > > > > > > > > > On Wed, Jan 29, 2020 at 10:57 AM first name last name <randomcoder1 at gmail.com> wrote: > > > > > > > > > > > > > > "For example, if you only read data, you can easily run several clients (standalone, GUI, database clients) at the same time. If you update your data, however, you shouldn’t use the GUI or a standalone instance at the same time." > > > > > > > [1] http://docs.basex.org/wiki/Startup#Concurrent_Operations > > > > > > > > > > > > > > On Wed, Jan 29, 2020 at 9:25 AM Ветошкин Владимир <en-trance at yandex.ru> wrote: > > > > > > > > > > > > > > Hi, everybody! > > > > > > > > > > > > > > I use basex+php. > > > > > > > When I call db:optimize('A') from basex gui I can read from db 'B'. > > > > > > > But if I call db:optimize('A') from php (php cli) I can't read 'B' while the first query is working. > > > > > > > Why? And how can I solve it? > > > > > > > I wracked my brain... > > > > > > > > > > > > > > -- > > > > > > > С уважением, > > > > > > > Ветошкин Владимир Владимирович > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > > > С уважением, > > > > > > > Ветошкин Владимир Владимирович > > > > > > > > > > > > > > > > > > > > > > -- > > > > > С уважением, > > > > > Ветошкин Владимир Владимирович > > > > > > > > > > > > > > -- > > > С уважением, > > > Ветошкин Владимир Владимирович > > > > > > -- > С уважением, > Ветошкин Владимир Владимирович >
--
С уважением,
Ветошкин Владимир Владимирович
CG
Christian Grün30 Jan 2020 09:05 #
Please provide us with a self-contained test case.
Thanks in advance
Ветошкин Владимир <en-trance at yandex.ru> schrieb am Do., 30. Jan. 2020, 09:01:
Quoted text · Ветошкин Владимир · 148 lines
> Hmm.. > If I run [basex -q"db:optimize('A')"], I can read from db 'B'. > But if I run [basexclient -Uadmin -Padmin -q"db:optimize('A')"], I can't > read from db 'B'. > > 29.01.2020, 21:48, "Ветошкин Владимир" <en-trance at yandex.ru>: > > Yes, the system works on php and I can call basex only via php client of > basex or exec function. > Now all functions work via php client of basex. > If I additionally will use exec with basexclient - it won't corrupt > databases? > > 29.01.2020, 21:27, "Christian Grün" <christian.gruen at gmail.com>: > > In the worst case, yes. If you prefer to call basex via php and exec, > invoke basexclient instead of basex: > > http://docs.basex.org/wiki/Database_Server > > Ветошкин Владимир <en-trance at yandex.ru> schrieb am Mi., 29. Jan. 2020, > 19:23: > > Yes, I have seen that wiki pages... > What kind of conflicts? > Do you mean "or may even lead to corrupt databases." ? > Now I only get error when I read updating database like "database is > updating..." > > 29.01.2020, 21:11, "Christian Grün" <christian.gruen at gmail.com>: > > > As I can see, it solves my problems. Am I right doing so? > > The 'basex' standalone client does not connect to the server instance of > BaseX, so you may encounter conflicts. Did your the Wiki pages referenced > by.. "first name last name"? > > > Ветошкин Владимир <en-trance at yandex.ru> schrieb am Mi., 29. Jan. 2020, > 19:05: > > Hi, Christian! I hope you're well. > No, there is only one client at this time. > > Today evening I have tried to call exec function (php) to run another > basex client (basex -q"db:optimize..."). > And while it was working I can read from other databases like a charm! :) > > As I can see, it solves my problems. Am I right doing so? > > 29.01.2020, 20:28, "Christian Grün" <christian.gruen at gmail.com>: > > Hi Владимир, > > > But I want non-blocking read/write operations (in different databases) > with php. Is it possible? > Or I only have to wait finishing update operation? > > > I haven’t done anything with PHP for more than 10 years now, but maybe > you need to use parallel or pthreads and do the work via multiple > threads. Are you already working with several BaseX client instances? > > Christian > > > > On Wed, Jan 29, 2020 at 10:14 AM Ветошкин Владимир <en-trance at yandex.ru> > wrote: > > > Thank you. > > 29.01.2020, 12:02, "first name last name" <randomcoder1 at gmail.com>: > > But if you are willing to give up that GUI, you could instead use the DBA > interface [2] in your browser, and write all your code there if you start > BaseX's http server [1]. > However, the DBA interface will not give you auto-complete (and other > nice things you see in the GUI), but you can still write code, run code, > and save it to disk there. > > [1] http://docs.basex.org/wiki/Command-Line_Options#HTTP_Server > [2] http://docs.basex.org/wiki/DBA > > > On Wed, Jan 29, 2020 at 10:57 AM first name last name < > randomcoder1 at gmail.com> wrote: > > "For example, if you only read data, you can easily run several clients > (standalone, GUI, database clients) at the same time. If you update your > data, however, you shouldn’t use the GUI or a standalone instance at the > same time." > [1] http://docs.basex.org/wiki/Startup#Concurrent_Operations > > On Wed, Jan 29, 2020 at 9:25 AM Ветошкин Владимир <en-trance at yandex.ru> > wrote: > > Hi, everybody! > > I use basex+php. > When I call db:optimize('A') from basex gui I can read from db 'B'. > But if I call db:optimize('A') from php (php cli) I can't read 'B' while > the first query is working. > Why? And how can I solve it? > I wracked my brain... > > -- > С уважением, > Ветошкин Владимир Владимирович > > > > > -- > С уважением, > Ветошкин Владимир Владимирович > > > > > -- > С уважением, > Ветошкин Владимир Владимирович > > > > > -- > С уважением, > Ветошкин Владимир Владимирович > > > > > -- > С уважением, > Ветошкин Владимир Владимирович > > > > > -- > С уважением, > Ветошкин Владимир Владимирович > >
ВВ
Ветошкин Владимир30 Jan 2020 09:17 #
From php I call:
exec("\"/path/to/java/java.exe\" -cp \"/path/to/basex/BaseX.jar;/path/to/basex/lib/custom/*;/path/to/basex/lib/*\" -Xmx1200m org.basex.BaseXClient -Uadmin -Padmin -q\"
db:optimize('000999~201807',true(), map { 'language':'Russian', 'ftindex': true(), 'textindex': true(), 'attrindex': true(), 'tokenindex': true() })\"");
And then from php I execute:$session = new Session("127.0.0.1", $this->dbport, $dblogin, $dbpass);
$input = "db:open('~users')/users/user";
$query = $session->query($input);
while ($query->more()) {
$data = $query->next();
}
$query->close();
$session->close();The second code starts only after the first finished.
If in the first code I use "org.basex.BaseX" instead of "org.basex.BaseXClient" - the second code starts immediately.
Quoted text · Christian Grün · 118 lines
30.01.2020, 11:05, "Christian Grün" <christian.gruen at gmail.com>: > Please provide us with a self-contained test case.Thanks in advance > > > > Ветошкин Владимир <en-trance at yandex.ru> schrieb am Do., 30. Jan. 2020, 09:01: > > > Hmm.. > > If I run [basex -q"db:optimize('A')"], I can read from db 'B'. > > But if I run [basexclient -Uadmin -Padmin -q"db:optimize('A')"], I can't read from db 'B'. > > > > 29.01.2020, 21:48, "Ветошкин Владимир" <en-trance at yandex.ru>: > > > > > Yes, the system works on php and I can call basex only via php client of basex or exec function.Now all functions work via php client of basex. > > > If I additionally will use exec with basexclient - it won't corrupt databases? > > > 29.01.2020, 21:27, "Christian Grün" <christian.gruen at gmail.com>: > > > > > > > In the worst case, yes. If you prefer to call basex via php and exec, invoke basexclient instead of basex: > > > > > > > > http://docs.basex.org/wiki/Database_Server > > > > Ветошкин Владимир <en-trance at yandex.ru> schrieb am Mi., 29. Jan. 2020, 19:23: > > > > > > > > > Yes, I have seen that wiki pages...What kind of conflicts? > > > > > Do you mean "or may even lead to corrupt databases." ? > > > > > Now I only get error when I read updating database like "database is updating..." > > > > > 29.01.2020, 21:11, "Christian Grün" <christian.gruen at gmail.com>: > > > > > > > > > > > > As I can see, it solves my problems. Am I right doing so? > > > > > > > > > > > > The 'basex' standalone client does not connect to the server instance of BaseX, so you may encounter conflicts. Did your the Wiki pages referenced by.. "first name last name"? > > > > > > > > > > > > Ветошкин Владимир <en-trance at yandex.ru> schrieb am Mi., 29. Jan. 2020, 19:05: > > > > > > > > > > > > > Hi, Christian! I hope you're well.No, there is only one client at this time. > > > > > > > > > > > > > > Today evening I have tried to call exec function (php) to run another basex client (basex -q"db:optimize..."). > > > > > > > And while it was working I can read from other databases like a charm! :) > > > > > > > > > > > > > > As I can see, it solves my problems. Am I right doing so? > > > > > > > 29.01.2020, 20:28, "Christian Grün" <christian.gruen at gmail.com>: > > > > > > > > > > > > > > > Hi Владимир, > > > > > > > > > > > > > > > > > > > > > > > > > But I want non-blocking read/write operations (in different databases) with php. Is it possible? > > > > > > > > > Or I only have to wait finishing update operation? > > > > > > > > > > > > > > > > I haven’t done anything with PHP for more than 10 years now, but maybe > > > > > > > > you need to use parallel or pthreads and do the work via multiple > > > > > > > > threads. Are you already working with several BaseX client instances? > > > > > > > > > > > > > > > > Christian > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Wed, Jan 29, 2020 at 10:14 AM Ветошкин Владимир <en-trance at yandex.ru> wrote: > > > > > > > > > > > > > > > > > Thank you. > > > > > > > > > > > > > > > > > > 29.01.2020, 12:02, "first name last name" <randomcoder1 at gmail.com>: > > > > > > > > > > > > > > > > > > But if you are willing to give up that GUI, you could instead use the DBA interface [2] in your browser, and write all your code there if you start BaseX's http server [1]. > > > > > > > > > However, the DBA interface will not give you auto-complete (and other nice things you see in the GUI), but you can still write code, run code, and save it to disk there. > > > > > > > > > > > > > > > > > > [1] http://docs.basex.org/wiki/Command-Line_Options#HTTP_Server > > > > > > > > > [2] http://docs.basex.org/wiki/DBA > > > > > > > > > > > > > > > > > > > > > > > > > > > On Wed, Jan 29, 2020 at 10:57 AM first name last name <randomcoder1 at gmail.com> wrote: > > > > > > > > > > > > > > > > > > "For example, if you only read data, you can easily run several clients (standalone, GUI, database clients) at the same time. If you update your data, however, you shouldn’t use the GUI or a standalone instance at the same time." > > > > > > > > > [1] http://docs.basex.org/wiki/Startup#Concurrent_Operations > > > > > > > > > > > > > > > > > > On Wed, Jan 29, 2020 at 9:25 AM Ветошкин Владимир <en-trance at yandex.ru> wrote: > > > > > > > > > > > > > > > > > > Hi, everybody! > > > > > > > > > > > > > > > > > > I use basex+php. > > > > > > > > > When I call db:optimize('A') from basex gui I can read from db 'B'. > > > > > > > > > But if I call db:optimize('A') from php (php cli) I can't read 'B' while the first query is working. > > > > > > > > > Why? And how can I solve it? > > > > > > > > > I wracked my brain... > > > > > > > > > > > > > > > > > > -- > > > > > > > > > С уважением, > > > > > > > > > Ветошкин Владимир Владимирович > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > > > > > С уважением, > > > > > > > > > Ветошкин Владимир Владимирович > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > > > С уважением, > > > > > > > Ветошкин Владимир Владимирович > > > > > > > > > > > > > > > > > > > > > > -- > > > > > С уважением, > > > > > Ветошкин Владимир Владимирович > > > > > > > > > > > > > > -- > > > С уважением, > > > Ветошкин Владимир Владимирович > > > > > > > > > -- > > С уважением, > > Ветошкин Владимир Владимирович > >
--
С уважением,
Ветошкин Владимир Владимирович
ВВ
Ветошкин Владимир30 Jan 2020 10:10 #
I suppose, there is something interesting in the core of website. If I isolate two php functions (one only update, one only read) - everything is ok. But If I update and read from the core of website - reading function waits finishing updating function.
Quoted text · Ветошкин Владимир · 145 lines
30.01.2020, 11:17, "Ветошкин Владимир" <en-trance at yandex.ru>: > From php I call: > exec("\"/path/to/java/java.exe\" -cp \"/path/to/basex/BaseX.jar;/path/to/basex/lib/custom/*;/path/to/basex/lib/*\" -Xmx1200m org.basex.BaseXClient -Uadmin -Padmin -q\"db:optimize('000999~201807',true(), map { 'language':'Russian', 'ftindex': true(), 'textindex': true(), 'attrindex': true(), 'tokenindex': true() })\""); > > And then from php I execute: > $session = new Session("127.0.0.1", $this->dbport, $dblogin, $dbpass); > $input = "db:open('~users')/users/user"; > $query = $session->query($input); > while ($query->more()) { > $data = $query->next(); > } > $query->close(); > $session->close(); > > The second code starts only after the first finished. > > If in the first code I use "org.basex.BaseX" instead of "org.basex.BaseXClient" - the second code starts immediately. > > > > 30.01.2020, 11:05, "Christian Grün" <christian.gruen at gmail.com>: > > > Please provide us with a self-contained test case.Thanks in advance > > > > > > > > Ветошкин Владимир <en-trance at yandex.ru> schrieb am Do., 30. Jan. 2020, 09:01: > > > > > Hmm.. > > > If I run [basex -q"db:optimize('A')"], I can read from db 'B'. > > > But if I run [basexclient -Uadmin -Padmin -q"db:optimize('A')"], I can't read from db 'B'. > > > > > > 29.01.2020, 21:48, "Ветошкин Владимир" <en-trance at yandex.ru>: > > > > > > > Yes, the system works on php and I can call basex only via php client of basex or exec function.Now all functions work via php client of basex. > > > > If I additionally will use exec with basexclient - it won't corrupt databases? > > > > 29.01.2020, 21:27, "Christian Grün" <christian.gruen at gmail.com>: > > > > > > > > > In the worst case, yes. If you prefer to call basex via php and exec, invoke basexclient instead of basex: > > > > > > > > > > http://docs.basex.org/wiki/Database_Server > > > > > Ветошкин Владимир <en-trance at yandex.ru> schrieb am Mi., 29. Jan. 2020, 19:23: > > > > > > > > > > > Yes, I have seen that wiki pages...What kind of conflicts? > > > > > > Do you mean "or may even lead to corrupt databases." ? > > > > > > Now I only get error when I read updating database like "database is updating..." > > > > > > 29.01.2020, 21:11, "Christian Grün" <christian.gruen at gmail.com>: > > > > > > > > > > > > > > As I can see, it solves my problems. Am I right doing so? > > > > > > > > > > > > > > The 'basex' standalone client does not connect to the server instance of BaseX, so you may encounter conflicts. Did your the Wiki pages referenced by.. "first name last name"? > > > > > > > > > > > > > > Ветошкин Владимир <en-trance at yandex.ru> schrieb am Mi., 29. Jan. 2020, 19:05: > > > > > > > > > > > > > > > Hi, Christian! I hope you're well.No, there is only one client at this time. > > > > > > > > > > > > > > > > Today evening I have tried to call exec function (php) to run another basex client (basex -q"db:optimize..."). > > > > > > > > And while it was working I can read from other databases like a charm! :) > > > > > > > > > > > > > > > > As I can see, it solves my problems. Am I right doing so? > > > > > > > > 29.01.2020, 20:28, "Christian Grün" <christian.gruen at gmail.com>: > > > > > > > > > > > > > > > > > Hi Владимир, > > > > > > > > > > > > > > > > > > > > > > > > > > > > But I want non-blocking read/write operations (in different databases) with php. Is it possible? > > > > > > > > > > Or I only have to wait finishing update operation? > > > > > > > > > > > > > > > > > > I haven’t done anything with PHP for more than 10 years now, but maybe > > > > > > > > > you need to use parallel or pthreads and do the work via multiple > > > > > > > > > threads. Are you already working with several BaseX client instances? > > > > > > > > > > > > > > > > > > Christian > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Wed, Jan 29, 2020 at 10:14 AM Ветошкин Владимир <en-trance at yandex.ru> wrote: > > > > > > > > > > > > > > > > > > > Thank you. > > > > > > > > > > > > > > > > > > > > 29.01.2020, 12:02, "first name last name" <randomcoder1 at gmail.com>: > > > > > > > > > > > > > > > > > > > > But if you are willing to give up that GUI, you could instead use the DBA interface [2] in your browser, and write all your code there if you start BaseX's http server [1]. > > > > > > > > > > However, the DBA interface will not give you auto-complete (and other nice things you see in the GUI), but you can still write code, run code, and save it to disk there. > > > > > > > > > > > > > > > > > > > > [1] http://docs.basex.org/wiki/Command-Line_Options#HTTP_Server > > > > > > > > > > [2] http://docs.basex.org/wiki/DBA > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Wed, Jan 29, 2020 at 10:57 AM first name last name <randomcoder1 at gmail.com> wrote: > > > > > > > > > > > > > > > > > > > > "For example, if you only read data, you can easily run several clients (standalone, GUI, database clients) at the same time. If you update your data, however, you shouldn’t use the GUI or a standalone instance at the same time." > > > > > > > > > > [1] http://docs.basex.org/wiki/Startup#Concurrent_Operations > > > > > > > > > > > > > > > > > > > > On Wed, Jan 29, 2020 at 9:25 AM Ветошкин Владимир <en-trance at yandex.ru> wrote: > > > > > > > > > > > > > > > > > > > > Hi, everybody! > > > > > > > > > > > > > > > > > > > > I use basex+php. > > > > > > > > > > When I call db:optimize('A') from basex gui I can read from db 'B'. > > > > > > > > > > But if I call db:optimize('A') from php (php cli) I can't read 'B' while the first query is working. > > > > > > > > > > Why? And how can I solve it? > > > > > > > > > > I wracked my brain... > > > > > > > > > > > > > > > > > > > > -- > > > > > > > > > > С уважением, > > > > > > > > > > Ветошкин Владимир Владимирович > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > > > > > > С уважением, > > > > > > > > > > Ветошкин Владимир Владимирович > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > > > > С уважением, > > > > > > > > Ветошкин Владимир Владимирович > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > > С уважением, > > > > > > Ветошкин Владимир Владимирович > > > > > > > > > > > > > > > > > > -- > > > > С уважением, > > > > Ветошкин Владимир Владимирович > > > > > > > > > > > > > -- > > > С уважением, > > > Ветошкин Владимир Владимирович > > > > > > -- > С уважением, > Ветошкин Владимир Владимирович >
--
С уважением,
Ветошкин Владимир Владимирович
ВВ
Ветошкин Владимир30 Jan 2020 10:30 #
I have found a reason.
There was a query with non-static database names and because of that global lock.
Thank you for your help!
Quoted text · Ветошкин Владимир · 158 lines
30.01.2020, 12:10, "Ветошкин Владимир" <en-trance at yandex.ru>: > I suppose, there is something interesting in the core of website. > If I isolate two php functions (one only update, one only read) - everything is ok. > But If I update and read from the core of website - reading function waits finishing updating function. > > > 30.01.2020, 11:17, "Ветошкин Владимир" <en-trance at yandex.ru>: > > > From php I call: > > exec("\"/path/to/java/java.exe\" -cp \"/path/to/basex/BaseX.jar;/path/to/basex/lib/custom/*;/path/to/basex/lib/*\" -Xmx1200m org.basex.BaseXClient -Uadmin -Padmin -q\"db:optimize('000999~201807',true(), map { 'language':'Russian', 'ftindex': true(), 'textindex': true(), 'attrindex': true(), 'tokenindex': true() })\""); > > > > And then from php I execute: > > $session = new Session("127.0.0.1", $this->dbport, $dblogin, $dbpass); > > $input = "db:open('~users')/users/user"; > > $query = $session->query($input); > > while ($query->more()) { > > $data = $query->next(); > > } > > $query->close(); > > $session->close(); > > > > The second code starts only after the first finished. > > > > If in the first code I use "org.basex.BaseX" instead of "org.basex.BaseXClient" - the second code starts immediately. > > > > > > > > 30.01.2020, 11:05, "Christian Grün" <christian.gruen at gmail.com>: > > > > > Please provide us with a self-contained test case.Thanks in advance > > > > > > > > > > > > Ветошкин Владимир <en-trance at yandex.ru> schrieb am Do., 30. Jan. 2020, 09:01: > > > > > > > Hmm.. > > > > If I run [basex -q"db:optimize('A')"], I can read from db 'B'. > > > > But if I run [basexclient -Uadmin -Padmin -q"db:optimize('A')"], I can't read from db 'B'. > > > > > > > > 29.01.2020, 21:48, "Ветошкин Владимир" <en-trance at yandex.ru>: > > > > > > > > > Yes, the system works on php and I can call basex only via php client of basex or exec function.Now all functions work via php client of basex. > > > > > If I additionally will use exec with basexclient - it won't corrupt databases? > > > > > 29.01.2020, 21:27, "Christian Grün" <christian.gruen at gmail.com>: > > > > > > > > > > > In the worst case, yes. If you prefer to call basex via php and exec, invoke basexclient instead of basex: > > > > > > > > > > > > http://docs.basex.org/wiki/Database_Server > > > > > > Ветошкин Владимир <en-trance at yandex.ru> schrieb am Mi., 29. Jan. 2020, 19:23: > > > > > > > > > > > > > Yes, I have seen that wiki pages...What kind of conflicts? > > > > > > > Do you mean "or may even lead to corrupt databases." ? > > > > > > > Now I only get error when I read updating database like "database is updating..." > > > > > > > 29.01.2020, 21:11, "Christian Grün" <christian.gruen at gmail.com>: > > > > > > > > > > > > > > > > As I can see, it solves my problems. Am I right doing so? > > > > > > > > > > > > > > > > The 'basex' standalone client does not connect to the server instance of BaseX, so you may encounter conflicts. Did your the Wiki pages referenced by.. "first name last name"? > > > > > > > > > > > > > > > > Ветошкин Владимир <en-trance at yandex.ru> schrieb am Mi., 29. Jan. 2020, 19:05: > > > > > > > > > > > > > > > > > Hi, Christian! I hope you're well.No, there is only one client at this time. > > > > > > > > > > > > > > > > > > Today evening I have tried to call exec function (php) to run another basex client (basex -q"db:optimize..."). > > > > > > > > > And while it was working I can read from other databases like a charm! :) > > > > > > > > > > > > > > > > > > As I can see, it solves my problems. Am I right doing so? > > > > > > > > > 29.01.2020, 20:28, "Christian Grün" <christian.gruen at gmail.com>: > > > > > > > > > > > > > > > > > > > Hi Владимир, > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > But I want non-blocking read/write operations (in different databases) with php. Is it possible? > > > > > > > > > > > Or I only have to wait finishing update operation? > > > > > > > > > > > > > > > > > > > > I haven’t done anything with PHP for more than 10 years now, but maybe > > > > > > > > > > you need to use parallel or pthreads and do the work via multiple > > > > > > > > > > threads. Are you already working with several BaseX client instances? > > > > > > > > > > > > > > > > > > > > Christian > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Wed, Jan 29, 2020 at 10:14 AM Ветошкин Владимир <en-trance at yandex.ru> wrote: > > > > > > > > > > > > > > > > > > > > > Thank you. > > > > > > > > > > > > > > > > > > > > > > 29.01.2020, 12:02, "first name last name" <randomcoder1 at gmail.com>: > > > > > > > > > > > > > > > > > > > > > > But if you are willing to give up that GUI, you could instead use the DBA interface [2] in your browser, and write all your code there if you start BaseX's http server [1]. > > > > > > > > > > > However, the DBA interface will not give you auto-complete (and other nice things you see in the GUI), but you can still write code, run code, and save it to disk there. > > > > > > > > > > > > > > > > > > > > > > [1] http://docs.basex.org/wiki/Command-Line_Options#HTTP_Server > > > > > > > > > > > [2] http://docs.basex.org/wiki/DBA > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Wed, Jan 29, 2020 at 10:57 AM first name last name <randomcoder1 at gmail.com> wrote: > > > > > > > > > > > > > > > > > > > > > > "For example, if you only read data, you can easily run several clients (standalone, GUI, database clients) at the same time. If you update your data, however, you shouldn’t use the GUI or a standalone instance at the same time." > > > > > > > > > > > [1] http://docs.basex.org/wiki/Startup#Concurrent_Operations > > > > > > > > > > > > > > > > > > > > > > On Wed, Jan 29, 2020 at 9:25 AM Ветошкин Владимир <en-trance at yandex.ru> wrote: > > > > > > > > > > > > > > > > > > > > > > Hi, everybody! > > > > > > > > > > > > > > > > > > > > > > I use basex+php. > > > > > > > > > > > When I call db:optimize('A') from basex gui I can read from db 'B'. > > > > > > > > > > > But if I call db:optimize('A') from php (php cli) I can't read 'B' while the first query is working. > > > > > > > > > > > Why? And how can I solve it? > > > > > > > > > > > I wracked my brain... > > > > > > > > > > > > > > > > > > > > > > -- > > > > > > > > > > > С уважением, > > > > > > > > > > > Ветошкин Владимир Владимирович > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > > > > > > > С уважением, > > > > > > > > > > > Ветошкин Владимир Владимирович > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > > > > > С уважением, > > > > > > > > > Ветошкин Владимир Владимирович > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > > > С уважением, > > > > > > > Ветошкин Владимир Владимирович > > > > > > > > > > > > > > > > > > > > > > -- > > > > > С уважением, > > > > > Ветошкин Владимир Владимирович > > > > > > > > > > > > > > > > > -- > > > > С уважением, > > > > Ветошкин Владимир Владимирович > > > > > > > > > > -- > > С уважением, > > Ветошкин Владимир Владимирович > > > > > -- > С уважением, > Ветошкин Владимир Владимирович >
--
С уважением,
Ветошкин Владимир Владимирович
Written for BaseX 9.3. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery