TN2 Framework

TN2 Framework

The TN2 framework is software by “TN2 Solutions EESV” (

The TN2 framework provides a distributed software system set-up consisting of the following base functionality:


Message-based communication using text or binary encoding of single or batched messages. Implementations in most common programming languages (among which: java, javascript, c++, python, go).

  • Message routing between different components.
  • Message filtering providing means to reduce communication.
  • Message logging for on- or off-line analysis and inspection.


A number of services are provided in the framework:

  • Data persistence. This is provided by an interface to a third-party database system.
  • Configuration. Allowing distributed configuration management.
  • Storage. Allowing distributed storage of current system state.
  • User management. Providing means for role-based access control.
  • Logging. Storing log data and allowing querying of stored log data.

These services can be used by means of the message-based communication framework.

Rules Engine

A Rules Engine is all about providing an alternative computational model. Instead of the usual imperative model, which consists of commands in sequence with conditionals and loops, a Rules Engine is based on a Production Rule System. This is a set of production rules, each of which has a condition, and an action - simplistically you can think of it as a bunch of if-then statements.

The subtlety is that rules can be written in any order, the engine decides when to evaluate them using whatever order makes sense for it. A good way of thinking of it is that the system runs through all the rules, picks the ones for which the condition is true, and then evaluates the corresponding actions.

A Rules Engine is a tool that makes it easier to program using this computational model. It may be a complete development environment, or a framework that can work with a traditional platform. Most of what I’ve seen in recent years are tools that are designed to fit in with an existing platform. …

… Here we stop quoting the article of Martin Fowler, the TN2 Rules Engine is based on the message-based protocol used by the framework. The Rules Engine works on top of a communication protocol endpoint.

User interfaces

Web-based user interfaces are provided for:

  • System inspection
  • Configuration
  • User management
  • Log querying
  • Monitoring and control

Web server

To serve the web-based user interfaces and other (static) content.


Extension of the system is possible by add-ons, based on the framework with access to the services using the provided communication. The extension can be implemented in different programming languages. Deployment of extensions can be distributed. Currently, available extensions based on external software include support for:

  • Report generation.

External (developer) tools are available for development and maintenance of reports definitions.

Requirements and assumptions

All web-based software is based on current HTML5 and ECMAScript 6 standards, requiring up-to-date web browsers.

Server-based software components assume a 64-bit hardware platform capable of running a 64-bit Linux OS with container support and 64-bit Java JDK 8 environment.

Extensions can be run on any platform assuming the required protocol stack is available. Currently, the requirements per programming language are:

  • Java: JDK 11
  • Javascript: ECMAScript 6 compatibility
  • C++: C++11 or higher compatibility
  • Python: version 2.7 or higher
  • Go: version 1.7 or higher

These required software versions are subject to change.