From 2345d4c0418e3c23a74930b9a2f657fb4b73cb61 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Tue, 8 Jan 2013 07:13:53 +0100 Subject: [PATCH] Add first version of README. --- README.md | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..a17c584 --- /dev/null +++ b/README.md @@ -0,0 +1,37 @@ +# Reactor + +## Description + +Reactor is a tool that lets you periodically execute tasks that depend on certain conditions. + +Its concept is quite similar to websites like ifttt (“if this then that”): you evaluate an input condition (e. g. data from a website, Facebook or Twitter posts, incoming emails, existence of a file), and if it evaluates to “yes” you execute a certain action. + +## Concepts + +The core of Reactor comprises ``Reaction``s which in turn consist of ``Query``s, ``Filter``s, ``Trigger``s, and ``Action``s. + +### Query + +A query is a component that determines the state of a system: it can determine whether a file exists, or retrieves the latest 5 Twitter posts, or loads data from a website. + +The result of a ``Query`` is a ``State``. + +### Filter + +A filter is an optional component that turns a ``State`` into a different ``State``. It is used to process data and extract more useful information; e. g. a filter could take the raw data from a website and parse its HTML into a DOM tree, or a list of files could be filtered for CD images larger than 400 MiB. + +The result of a ``Filter`` is a ``State``, again. + +### Trigger + +A trigger decides if, given the current state and the previous state, a noteworthy change has occured. It could calculate the difference between two file lists, or of two Facebook post lists. + +The result of a ``Trigger`` is an ``Output``. + +### Action + +If a trigger found a change, the action is then executed. Again, an action can be almost anything: it can send an email, it can execute programs, print documents, initiate phone calls, take a picture from a webcam — anything you can program can be used an an action. + +## Configuration + +Reactor’s configuration uses JSON files (I tried using XML first but apparently polymorphic deserialization is something that is not easily done with XML parsers). The format of a ``Chain`` configuration is pretty straight-forward and can be seen in the example configuration files. -- 2.7.4