Plugin, Addon, Adapter, *Managers, Plugin Client & Server - Trying to understand

Hi,

Firstly, thanks for sharing the gateway app/platform. It has a lot of potential in providing a more robust and extensible gateway solution.

I’ve started setting up my gateway on 2 different hosts (OSX, and RPI image) and planning to use it as my central hub. I’m also interested in contributing to the source code when possible, however as I get to read the code and debug some issues that I found I feel that I need a better overview/understanding about the following concepts in the context of the gateway;

Plugin
Addon
Adapter
Plugin Client
Plugin Server

I know that I can infer from their names that they somewhat follow a design pattern, however it would be more helpful to really have a simple explanation about each of these concepts and their relationships with each other. There are other Manager objects as well that adds to the complexity of the code (well relatively).

Can someone give some light, an analogy to some example would be great.

Thanks

Woops. I just found the mozilla-iot wiki. It has the definitions of the concepts that I had mentioned above, although it just contain a teeny bit of explanation, this is a good wiki for a start. Will appreciate further explanations though.

cheers

A plugin is an adapter which runs as a separate process. In the early versions of the gateway there were in-process adapters and out-of-process adapters (which we called plugins). In the current version of the gateway every adapter runs as a plugin.

An adapter is basically some code which interfaces to particular types of hardware, like zwave, zigbee, etc. Currently all addons are adapters, but we wanted to use something a bit more generic than adapter so that we could add UI components or perhaps other things as addons.

The Plugin Server runs inside the gateway and is responsible for managing plugins. The Plugin Client runs inside the plugin itself, and is responsible for talking with the plugin server.

Thanks for the explanation they’re very helpful.

I’ve started with an Architecture page to help with this.

If you feel you want to please add what you learn. I’m not an expert and just learning ATM.

2 Likes