maria-discuss team mailing list archive
-
maria-discuss team
-
Mailing list archive
-
Message #03376
Re: New Question: Non-blocking calls from PHP
Yes, GET DIAGNOSTICS is in 5.5 (and anyway, a workaround for older versions should be possible, correct?).
Some comments:
1) The LIFO tables sounds to me a little dangerous. Of course "asynchronous" means "asynchronous", but under certain circumstances some queries could wait too much... don't you agree? Maybe the direction could depend from an option...
2) SELECT queries are "materialized", which is cool. But I don't understand how the user can associate an async query with the results table.
3) In MariaDB, the P_S is disabled by default, and a user can still disable it in MySQL. Also, in MariaDB global_status is in I_S, while MySQL has it in P_S (another funny incompatibility developed by Oracle). The first problem can probably be addressed with CONNECT (SRCDEF='show processlist') and the second with a view in async schema. Would you accept a patch?
Probably more comments/questions will come. In the meanwhile, thanks for your work (again).
bye
Federico
--------------------------------------------
Mer 24/2/16, Justin Swanhart <greenlion@xxxxxxxxx> ha scritto:
Oggetto: Re: [Maria-discuss] New Question: Non-blocking calls from PHP
A: "Federico Razzoli" <federico_raz@xxxxxxxx>
Cc: "Maria Discuss" <maria-discuss@xxxxxxxxxxxxxxxxxxx>
Data: Mercoledì 24 febbraio 2016, 16:04
Hi,
It is
completely native. It consists of a queue table, a thread
state table, a settings table, a stored procedure worker, an
event to execute the worker (more than one run in parallel)
and procs to drop off, check on, and get the results of a
SQL statement (which always waits if the SQL is not done
yet).
I don't know
if MariaDB 5.5 or 10 adds GET DIAGNOSTICS, but it will work
with any version that has it. You can comment that out and
just put a generic error into the table if it isn't
supported, and it will work with any version that has
SIGNAL.
--Justin
On Wed, Feb 24, 2016 at
10:01 AM, Federico Razzoli <federico_raz@xxxxxxxx>
wrote:
Hi
Justin!
The name reminds me a a fatal trap for developers and sys
admins (async npm module), but the tools sounds useful.
Is it publicly available? Is it entirely implemented via
stored procedures + event scheduler?
bye
Federico
--------------------------------------------
Mer 24/2/16, Justin Swanhart <greenlion@xxxxxxxxx>
ha scritto:
Oggetto: Re: [Maria-discuss] New Question: Non-blocking
calls from PHP
A: "AskMonty KB" <noreply@xxxxxxxxxxxx>
Cc: "Maria Discuss" <maria-discuss@xxxxxxxxxxxxxxxxxxx>
Data: Mercoledì 24 febbraio 2016, 15:32
Replying
here in addition to the web page (ugh
Frankenstein's
monster)...
I just finished
the first version of 'async' which runs queries
in
the background (in parallel!) using a queue table, a
crafty
stored procedure for a worker thread, and an event
which
executes the workers.
http://swanhart.livejournal.com/138754.html
On Sun, Feb 21, 2016 at
8:55 AM, AskMonty KB <noreply@xxxxxxxxxxxx>
wrote:
Hello,
A new question has been asked in " MariaDB
Connector/C
API Functions" by shestero. Please answer it at http://mariadb.com/kb/en/non-blocking-calls-from-php/
as the person asking the question may not be subscribed
to
the mailing list.
--------------------------------
I want to use non-blocking API ( https://mariadb.com/kb/en/mariadb/non-blocking-api-reference
) from PHP.
Is it possible now?
If no, can anybody give me directions how to implement
my
own PHP-extension in C (using Connector/C) or update
the
existing module? I don't think it's very complex,
do
I need to add just wraper-like implementations using
blocking function as samples, don't I?
--------------------------------
To view or answer this question please visit: http://mariadb.com/kb/en/non-blocking-calls-from-php/
_______________________________________________
Mailing list: https://launchpad.net/~maria-discuss
Post to : maria-discuss@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~maria-discuss
More help : https://help.launchpad.net/ListHelp
-----Segue allegato-----
_______________________________________________
Mailing list: https://launchpad.net/~maria-discuss
Post to : maria-discuss@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~maria-discuss
More help : https://help.launchpad.net/ListHelp