Introduce skeleton plugin process.

For external parsing there will be a separate process that handles
parse requests sent from MaxScale. From MaxScale's perspective there
will just be a specific query classifier plugin that upon startup
launches that external process and manages its lifetime. That is,
MaxScale proper will be completely oblivious of this arrangement.

The skeleton process introduced here does nothing; just sits in
a loop sleeping. The skeleton query classifier plugin currently
loads the MySQL embedded query classifier and performs parsing
using it. That way the external process based query classifier can
immediately be used.

Next step is to introduce process management into the picture without
actually moving the parsing anywhere.
This commit is contained in:
Johan Wikman
2016-02-11 08:41:22 +02:00
parent 8a814fbec4
commit 2e5bfc14f2
8 changed files with 276 additions and 0 deletions

View File

@ -0,0 +1 @@
add_subdirectory(src)

View File

@ -0,0 +1,2 @@
add_executable(maxpp maxpp.cc)
install(TARGETS maxpp DESTINATION ${MAXSCALE_BINDIR})

View File

@ -0,0 +1,31 @@
/*
* This file is distributed as part of the MariaDB Corporation MaxScale. It is free
* software: you can redistribute it and/or modify it under the terms of the
* GNU General Public License as published by the Free Software Foundation,
* version 2.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc., 51
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Copyright MariaDB Corporation Ab 2016
*
*/
#include <unistd.h>
int main(int argc, char* argv[])
{
while (true)
{
sleep(5);
}
return 0;
}