Skip to content
This repository has been archived by the owner on Nov 8, 2022. It is now read-only.

Commit

Permalink
Frontloaded steps outlined by @candysmurf
Browse files Browse the repository at this point in the history
Upon re-reading, it makes sense to have these steps outlined from the beginning of the document. It's the recipe for the next steps.
  • Loading branch information
mbbroberg committed Jan 20, 2016
1 parent 981426b commit 81a4198
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions docs/PLUGIN_AUTHORING.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,19 @@ limitations under the License.
-->

## About This
The following is a recipe for authoring a plugin that fits smoothly within the snap framework. Like any recipe, the ingredients and the order in which you mix them are important. Like any good recipe, it will do you well to read the entire document, as well as the [Plugin Best Practices](https://github.com/intelsdi-x/snap/blob/master/docs/PLUGIN_BEST_PRACTICES.md), before you start cooking.
The following is a recipe for authoring a plugin that fits smoothly within the snap framework. Like any recipe, the ingredients and the order in which you mix them are important. The major steps are:

The last use of this analogy here: Bon Appétit! :stew:
1. Outline your plugin metrics
2. Decide the CODEC for the plugin
3. Download or clone [snap](https://github.com/intelsdi-x/snap)
4. Download or clone [snap-plugin-utilities](https://github.com/intelsdi-x/snap-plugin-utilities)
5. Implement the required interfaces
6. Test the plugin
7. Expose the plugin

Like any good recipe, it will do you well to read the entire document, as well as the [Plugin Best Practices](https://github.com/intelsdi-x/snap/blob/master/docs/PLUGIN_BEST_PRACTICES.md), before you start cooking.

Bon Appétit! :stew:

## Plugin Authoring
snap itself runs as a master daemon with the core functionality that may load and unload plugin processes via either CLI or HTTP APIs.
Expand All @@ -31,17 +41,6 @@ Communication between snap and plugins uses RPC either through HTTP or TCP proto

Before starting writing snap plugins, check out the [Plugin Catalog](https://github.com/intelsdi-x/snap/blob/master/docs/PLUGIN_CATALOG.md) to see if any suit your needs. If not, you need to reference the plugin packages that defines the type of structures and interfaces inside snap and then write plugin endpoints to implement the defined interfaces.

## Getting started with the plugin development
Before writing a plugin, you may sketch the type of metrics you want to collect or understand what kind of metrics you like to publish. Basic steps are:

1. Plan your plugin
2. Decide the CODEC for the plugin
3. Download or clone snap
4. Setup your development environment properly
5. Write the plugin that implements the type of interfaces defined in snap
6. Test the plugin
7. Expose the plugin

### Naming, Files, and Directory
snap supports three type of plugins. They are collectors, processors, and publishers. The plugin project name should use the following format:
>snap-plugin-[type]-[name]
Expand Down

0 comments on commit 81a4198

Please sign in to comment.