MetaRBE documentation and examples
Paradigm
Paradigm of MetaRBE is quite simple. It expects an input stream of data and parses it in two phases. During phase one (called a session) it recognizes a meta structure of given input. This phase assumed to be programmed by user. User is responsible in session code trigger an event of recognition. Once event is emitted MetaRBE matches rules which might trigger actions according their state. So, logically, phase two is to execute rules. Rule execution is to run associated to this rule action with arbitrary code.
Examples
- wc This example is a sort of "Hello, World!" with MetaRBE. Demonstrates how to parse a text file and recognize patterns like digits, words, lines. In the end it shows statistics for counted words, digits and lines of text.
- qos This example shows how flexible can be a system based on rule based engine. The main idea of this example is to implement a simulation Qaulity Of Service (QoS) monitoring system. We assume we can run two type of tasks in parallel - GBUILD and GUNIT. However, we should control number of processes in memory at the same time. All forked processes stay in queue untill system is capable running them. It is a simulation and a simple Swing application helps to manage limits for each task as well as show current queue. Please note how easy to decouple logic of QoS environment from code serving GUI and logging.