Please give us some additional samples (design patterns) in order to develop apache-ignite plugins.
What kind of plugin should I can develop on it (security, compression, communication so.) ?
You should implement plugins if you would like to enhance Ignite public APIs with additional functionality (see GridGain enterprise edition). For example, plugin can be used for adding security or, maybe, data compression.
However, if you need to change the underlying behavior without affecting the public API, you should look at the Ignite SPIs, and provide your own SPI implementation. For example, if you need to change the communication protocol, you can plugin your own version of the Communication SPI.
There are also other pluggable components in Ignite, such as Marshaller, Logger, LifecycleBean, etc. that you can easily customize without implementing plugins or SPIs.
I tried to get the security plugin to work but Ignite does not seem to pick up the plugin when it starts up.
All I get in the startup log is:
[15:52:49] Configured plugins:
[15:52:49] ^-- None
I have checked that I'm setting the pluginConfigurations to the class of the plugin but it does not pick it up.
Please could you provide an example of a simple plugin and the necessary cache config so that the plugin gets picked up from the cache config ?
I can perhaps then extend this to implement authentication.
I'm currently stuck on not even having the plugin getting picked up .
To activate a plugin you need to create 'META-INF/services/org.apache.ignite.plugin.PluginProvider' file (has to be available on classpath) and list your plugin providers class names there (one full class name per line). For example, if there are two plugins, this file will have two lines, like this:
This post has NOT been accepted by the mailing list yet.
I tried this but can not get the plugin to start up.
So I made the folder as you mentioned :
In there put the line:
The class WhiteListPluginProvider is below and I've implemented two of the Ignite interfaces I think are for the plugins to load up.
I'm using the Cluster example config file example-ignite.xml in the hope that I can start a cluster and see other nodes joining and then authenticate them.
I've imported the code for the ClusterGroupExample and added the META-INF folder to that src tree locally etc.
This is what is in the class WhiteListPluginProvider ( code below).
This is what Im confused about:
1) What interfaces do I need to implement ?
Below I've implemented PluginConfiguration and ginProvider<WhiteListPluginProvider>
2) Why isnt the plugin getting loaded and then I should get the System.out messages as
on the overridden method onIgniteStart(), I'm printing a message to Sys out.
Please could you have a look at the below and perhaps modify it so atleast the plugin starts and I
get some messgaes in System.out ?