← Back to team overview

maria-developers team mailing list archive

Re: new PLUGIN API.

 

Hi, Alexey!

On Oct 25, Alexey Botchkov wrote:
> To me both approaches are like indistingushable. The 'service' is too
> just the set of callback methods.  I don't know if we should keep that
> 'plugin type' specification or not, the very idea is getting server's
> data and sending commands to server using the callback functions.

Right. That's why I pointed out that one can implement this idea as a
service or as an audit plugin api. Whatever provides a better fit.

> That way plugins get free from the API versions, and the server
> is free from fixed structures to send/get data to/from the plugin.
> 
> If we need we can limit the access to the 'audit service' to only these
> plugins registered with the AUDIT type.

That would be *very* confusing. Services is something any plugin can
use. If you want something to be accessible to only AUDIT plugins, this
should be part of the plugin_audit.h, not service_audit.h, so to speak.

For an example, see how authentication plugin API is defined. A plugin
provides the authenticate_user() method. This method gets
MYSQL_PLUGIN_VIO as an argument. And the plugin uses MYSQL_PLUGIN_VIO
methods (callbacks) to communicate with the client.

Regards,
Sergei
Chief Architect MariaDB
and security@xxxxxxxxxxx


References