The OpenRemote Controller (ORC) is the brains of the effort. It is mostly written in Java and is based on a modular design.
If you are uncertain where the controller fits into the OpenRemote architecture, see Software Overview.
Modular Design
Because we do not know what target environments and applications are going to be running we build the server with modularity in mind where a target runtime including access layers to various medias are dynamically installed by the OpenRemote Controller.
See Controller Java Services for the current Java codebase that achieves this modularity (microkernel based, http based downloads).
The ORC also is the place where you would implement protocols. See discussions around X10 in the Design Forums for an idea of how a protocol is implemented. Once implemented, there are two possible ways to integrate an implemented protocol.
Native layers on Linux are written in C. They provide interfaces to the physical devices and run in separate processes. A driver is something that exposes a writeBytes() interface, ideally through an IP socket. The C libraries, usually kernel libraries are licensed under GPL and distributed with the base Software Reference Implementation (ORC Software RI).
It runs on the ORC Hardware RI but can in theory run on any platform that has ported the native libraries and which provides IP sockets.
Java Middleware
The Java layer on top handles protocol implementation and mapping which gives OpenRemote Controller its uber-flexibility in terms of what protocols and medias are supported. In theory any media (we like USB-media connectors for the ORC Hardware RI) can be supported and any protocol can be supported.
From a pure Java programming standpoint we are still educating ourselves as to what is out there in terms of representations and programming models. Nowadays state of the art seems message based event driven programming approaches. We can certainly easily replicate these programming environments. One can easily envision approaches with visual programming of state machines and workflow engines with events driven by a data-layer in observable mode and where events become logical conditions.
In terms of messages we are still researching through the various formats out there and are looking for one of the generic layers. For example we could adopt the KNX message representation and leverage the existing vendor market in the EU. At the same time, nothing prevents us from supporting abstracted message format like xPL for example. Think of the ORC as a base implementation for KNX controllers, xPL controllers as well as proprietary vendor controllers.
Design Documentation
Developer Documentation
- Getting the Controller Source
- Building OpenRemote Controller
- Running OpenRemote Controller
- Understanding Controller Source Repository Structure
