Page tree
Skip to end of metadata
Go to start of metadata

In this section, we will see a brief overview of the Nsys Daemon plugin. There are two implementations of the Nsys Platform. One of them is done for Java environment and the other one is done for .NET platform. The reason for these two implementations in the past was in insufficient support for accessing the system resources and the system integration on Windows platform by Java environment. This section covers Java based version which is major for the Nsys platform.

The Nsys Daemon plugin is a JAR file that has a mandatory plugin descriptor and some optional Java classes. The plugin descriptor, the only mandatory part of a plugin, is an XML file which must be named nsys-plugin.xml. The file is located at the root of the plugin. The nsys-plugin.xml file defines the various modules in a plugin.

 

Following is a sample nsys-plugin.xml file without any plugin modules in it:

<?xml version="1.0" encoding="UTF-8"?>

<nsys-plugin key="org.nsys.demo" name="Demo Plugin" plugin-version="1">

    <!—- Plugin Info -->

    <plugin-info>
        <description>This is a Demo Plugin</description>
        <version>1.0.0.0</version>
        <vendor name="Nsys" url="http://nsys.org" />
    </plugin-info>

    <!—- Plugin modules goes here -->

</nsys-plugin>

 

The plugin, as you can see, has details such as descriptor, version, vendor-details, and so on. When plugin is loaded, all the unique modules in it are also loaded. The plugin classes can override the system classes. The version is in following format X.Y.Z.B where X is a major version, Y is a minor version, Z is a revision and B is a build number.

 

Suppose you have a job module in the plugin, it will look as follows:

<scheduler key="demo-scheduler" name="Demo Scheduler">
    <jobs>
        <job name="DemoJob" class="org.nsys.demo.scheduler.job.DemoJob" />
    </jobs>        
    <triggers>
        <trigger name="SimpleTrigger" job="DemoJob">
            <startDelay>5m</startDelay> 
            <period>1h</period>
            </trigger>
	</triggers>
</scheduler>

 

The plugin key, in this case, will be org.nsys.demo and the module key will be org.nsys.demo:demo-scheduler.

The daemon has capability to extend its functionality for new subsystems which are representing as plugin modules. For instance we want to add to the daemon new module Collector which is for data gathering from the remote systems. At first has to be implemented the org.nsys.daemon.ManagementAgent interface.

 

In nsys-plugin.xml file it will look as follows:

<management-agent key="collector" name="Nsys Collector"
  				  class="org.nsys.cloud.Collector">
    	<dependency>org.nsys.daemon:scheduler</dependency>
</management-agent>

 

The module, as you can see, has details such as key, name, class and dependency. The key should be unique within the plugin. The name is Human-readable name of the plugin. The class must implement the org.nsys.daemon.ManagementAgent interface. The element dependency defines dependency on the other modules/plugins. It should be defined as pluginKey:resourceModuleKey. The daemon at first loads all management-agent resources and then loads all resources related to particular modules.

 

Suppose you have a plugin for module Collector with some extensions which are collecting some data at remote systems, it will look in nsys-plugin.xml file as follows:

<collector key="cloud-warehouse-collector-dropbox" name="Cloud Warehouse Collector for Dropbox">
    <queries>
        <nql>SELECT Name, Size FROM Files</nql>
        <nql>SELECT Name, Size FROM Folders</nql>
	</queries>        
    <data-processor-stages>
        <stage key="dropbox-stage-getdata" name="Get Dropbox data from a job" 
               class="org.nsys.cloud.warehouse.collector.dropbox.dataprocessor.stage.GetDropboxDataStage" />
		<stage key="dropbox-stage-analyze" name="Analyze Dropbox data" 
               class="org.nsys.cloud.warehouse.collector.dropbox.dataprocessor.stage.AnalyzeDropboxDataStage" />
        <stage key="dropbox-stage-storage" name="Store Dropbox data" 
               class="org.nsys.cloud.warehouse.collector.dropbox.dataprocessor.stage.StoreDropboxDataStage" />
	</data-processor-stages>
</collector>
  • No labels