Skip to content
This repository was archived by the owner on Mar 15, 2021. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions core/src/main/java/com/spotify/ffwd/AgentCore.java
Original file line number Diff line number Diff line change
Expand Up @@ -378,10 +378,11 @@ protected void configure() {
/**
* Reads the configuration of the agent from multiple possible sources. In order of precedence,
* the following sources are loaded:
* - System properties
* - Environment variables
* - YAML file in specified location
* - YAML file bundled with JAR
*<p></p>
* - System properties<p></p>
* - Environment variables<p></p>
* - YAML file in specified location<p></p>
* - YAML file bundled with JAR<p></p>
*
* Values are merged, those higher on this list override those that are lower.
*
Expand Down
33 changes: 16 additions & 17 deletions docs/content/_docs/components.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,42 +6,41 @@ title: Components

This document covers some of the major components in FastForward.

#### Module
![Overview of main FFWD components](./images/ffwd-components.svg "Overview of main FFWD components")

A module is a loadable component that extends the functionality of FastForward.
When a module is loaded it typically registers a set of plugins.
## Module

#### Plugin
A [module](https://github.com/spotify/ffwd/blob/master/api/src/main/java/com/spotify/ffwd/module/FastForwardModule.java) is a dynamically loaded component that extends the functionality of FastForward.
When a module is [loaded](https://github.com/spotify/ffwd/blob/17de95af58f221ad655dce18515835b2818c7241/core/src/main/java/com/spotify/ffwd/AgentCore.java#L400) it typically [registers a plugin](https://github.com/spotify/ffwd/blob/17de95af58f221ad655dce18515835b2818c7241/modules/pubsub/src/main/java/com/spotify/ffwd/pubsub/PubsubOutputModule.java#L36).

Either an input or an output plugin.
## Plugin

This provides the implementation to read or send data from the agent.
A plugin can have multiple _instances_ with different configurations (like
which port to listen to).
Either an [input](https://github.com/spotify/ffwd/blob/master/api/src/main/java/com/spotify/ffwd/input/PluginSource.java) or an [output](https://github.com/spotify/ffwd/blob/master/api/src/main/java/com/spotify/ffwd/output/PluginSink.java) plugin.

#### Early Injector
This provides an implementation which either ingests or emits data from the agent.

The early injector is setup by AgentCore and is intended to provide the basic
facilities to perform module setup.
A plugin can have multiple _instances_ with different configurations (like which port to listen to).

## Early Injector

The [early injector](https://github.com/spotify/ffwd/blob/17de95af58f221ad655dce18515835b2818c7241/core/src/main/java/com/spotify/ffwd/AgentCore.java#L212) is setup by AgentCore and is intended to provide the basic facilities to perform module setup.

The following is a list of components that are given access to and their
purpose.

* _com.spotify.ffwd.module.PluginContext_
* [_com.spotify.ffwd.module.PluginContext_](https://github.com/spotify/ffwd/blob/master/api/src/main/java/com/spotify/ffwd/module/PluginContext.java)
Register input and output plugins.
* _com.fasterxml.jackson.databind.ObjectMapper (config)_
ObjectMapper used to parse provided configuration file.

#### Primary Injector
## Primary Injector

The primary injector contains the dependencies which are available after
modules have been registered and the initial bootstrap is done.
The [primary injector](https://github.com/spotify/ffwd/blob/17de95af58f221ad655dce18515835b2818c7241/core/src/main/java/com/spotify/ffwd/AgentCore.java#L100) contains the dependencies which are available after modules have been registered and the initial bootstrap is done.

It contains all the components of the early injector, with the following
additions.

* _eu.toolchain.async.AsyncFramework_ - Framework implementation to use for
async operations.
* _eu.toolchain.async.AsyncFramework_ - Framework implementation to use for async operations.
* _io.netty.channel.EventLoopGroup (boss)_ Event loop group used for boss
threads in ServerBootstrap's.
* _io.netty.channel.EventLoopGroup (worker)_ Event loop group used for
Expand Down
1 change: 1 addition & 0 deletions docs/content/_docs/images/ffwd-components.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.