Skip to content

Concepts

Nicklas Börjesson edited this page Jun 8, 2016 · 6 revisions

The most important concepts of the Optimal Framework are the broker, schemas, nodes and plugins.

Broker

In the conceptual middle of the system is the broker.

It is responsible for most cross-cutting concerns like messaging, security logging and keeping persistent data. For clients of a system built on the framework, its role is application server and messaging platform.

Schemas

JSON Schema is used to define all data structures in the system.

It is not only used to validate and define the data in the MongoDB database backend, but also used in front end interfaces like the administrative interface, and to handle messages.

All data in OF are required to have a valid schema reference that it adheres to, and are dictionaries that is turned back and forth into JSON when transmitted.

Nodes

A common problem for systems are persistent and generalize storage of settings and entities. As a system evolves, they tend to end up everywhere in the backend. The node tree is an approach to solve that.

Each node in the tree has a schemaRef, which could be seen as the node type. All nodes must adhere to the node schema, which includes information on allowed child nodes, permissions and so forth.

All manipulation of nodes are done using the node REST API.

Plugins

All functionality is added via plugins.

In OF, a plugin is almost able to change everything about how the system operates. Developing plugins is simple and intuitive, they are simple GIT repositories that have a definitions file that describes them.

Plugins add:

There are numerous advantages to being plugin-based like this.

For all it becomes:

  • possible to create an and sustain an ecosystem among users of the framework
  • easy to separate ones own code from that of the ecosystem, making it easier to handle upgrades
  • possible for the system to degrade gracefully in case of failuse

For commercial applications it becomes very easy to:

  • maintain several editions of a system (like community, enterprise).
  • add functionality in a modular way using plugins

For more information on how to create plugins, check out the Plugins article.

Clone this wiki locally