Start process by inserting mysql string

I need to start a server side process with mysql line insert. I would appreciate some feedback / suggestions. So far I can present three options:

1st (least attractive): My preliminary understanding is that I can write some kind of “custom trigger” in C that could knock out a line insert. In addition to having to renew my C skills, this will require (custom?) Recompiling MySQl ... yuck!

2nd (slightly more attractive): I could schedule the server side of the cron task of the program I am writing to periodically query the table for new rows. This has the advantage of being independent of the database and language. The problem is that I suffer from cron schedule delay.

3rd (the option I'm running with): I could write a multi-threaded program that would query the table for changes in one thread, creating new threads to process the newly inserted rows as needed. This has all the advantages of option 2 with less delay.

I also mentioned that I'm leaning towards python for this task, since very easy access to system commands (linux), as well as to some perl scripts at home, will be very useful.

I would be grateful for any feedback / suggestions

Thanks in advance.

+3
source share
2 answers

, . /cronjob; - , ( " " ).

. , , - C, , .

+4

2 .NET, 3- . , , , Triggers PhpMyAdmin, MySQL - , .

0

Source: https://habr.com/ru/post/1708237/


All Articles