- Introduction
- Development status
- Resources
- Dependencies
- Running
- Compiling and Packaging
- Setting up a development environment
- Configuration
- FAQ
- Optional Components
- Directory structure
Internet of Things data server. Implementation of O-MI Node as specified in Open Messaging Interface (O-MI) v1.0 standard with Open Data Format (O-DF) v1.0 standard. It is intended to be as reference implementation that shows how these standards work in more detail. See Features.md for more details.
O-MI can be used to query or update data, but also to set up data streams with subscriptions. It means that the standard can be used to make peer-to-peer like connections, but it can also be used in traditional client-server setup. O-MI standardizes the requests with XML, and they can be sent with almost any text based protocol. This implementation supports http, https and websocket.
O-DF is a simple object hierarchy format defined in XML. O-DF is used as data payload in O-MI. Simply put, O-DF can be thought as a file structure with directories which are Object
s and files which are InfoItem
s. O-MI also supports use of any text based data format, but request semantics might be more ambigious. Payloads other than O-DF are not yet supported in this implementation.
Questions or problems with the server or the standards can be posted to Issues, email or gitter chat.
All important features are working, but the project is in beta phase where things are not yet very optimized and malicious requests might cause crashing. However, the project can be used in production if the server has low risk profile or authentication.
For large amounts of data, it is not recommended to use the default value history database. Instead, it can be disabled or changed to e.g. InfluxDB, see FAQ for instructions.
O-MI Node can be extended with special request logic which can be implemented with "agents". Different authentication and authorization mechanisms can be implemented via auth apis. New databases can be implemented with DB interface. Other payloads than O-DF cannot yet be implemented.
See development
branch for latest progress.
- O-MI Specification (html) (pdf)
- O-DF Specification (html) (pdf)
- API Documentation ScalaDoc
- API Documentation JavaDoc
- Examples of requests and responses, as handled by this server
- Technical Documentation (outdated)
- For running:
- Java 11 JRE (JDK on Mac)
- For building:
- Java 11 JDK
- SBT (Simple Build Tool) or SBT enabled IDE
Download the pre-compiled zip, tgz or debian package from latest git releases here.
File to choose:
o-mi-node-x.y.z.zip
for Windowso-mi-node-x.y.z.deb
for Ubuntu, Debian or other linux with dpkgo-mi-node-x.y.z.rpm
for Red Hat linuxo-mi-node-x.y.z.tgz
for Mac or other Unix
For zip or tgz file:
- Download and extract the file
- Navigate to the
bin
directory - Run O-MI Node run the corresponding startup script from the bin directory for your OS:
bin/o-mi-node.bat
for Windowsbin/o-mi-node
for Unix and Mac
By default it will start at url http://localhost:8080/ and has some example and demo agents.
This will run O-MI Node with configuration in /conf/application.conf
.
More Information in the Configuration section.
For linux packages
dpkg -i o-mi-node-x.y.z.deb
orrpm -i o-mi-node-x.y.z.rpm
sudo systemctl start o-mi-node
- If it needs to start after a reboot:
sudo systemctl enable o-mi-node
With docker
docker pull aaltoasia/o-mi
docker run -p 8080:8080 aaltoasia/o-mi
git clone
- Install sbt
- (on windows: logout, or put sbt into PATH yourself)
- Open a cmd or shell to the
O-MI
project directory - Then run
sbt
and in opened the ">" prompt runreStart
to compile and run the O-MI Node - Visit http://localhost:8080/ to see that it's working
You can check our Simple Build Tool cheat sheet section to learn more
If you would like to use an IDE, check how to set up Eclipse or IntelliJ IDEA
- Follow the instructions 1-4 in Setting up a development environment above
- run
sbt universal:packageBin
(For other package types, usesbt release
) - Result can be found in
./target/universal/o-mi-Node-version.zip
See SBT Universal Plugin for more packaging methods.
See reference.conf for the defaults and configuration documentation in the comments.
- In package releases:
/etc/o-mi-node/application.conf
- In tar and zip releases:
./conf/application.conf
- In development environment:
./O-MI-Node/src/main/resources/application.conf
(create a new file if not found)- Default values are stored in
./O-MI-Node/src/main/resources/reference.conf
- Default values are stored in
Configuration file allows json-like syntax but it is not very strict about the object syntax. See here.
application.conf
can also have a lot of Akka (threading framework and HTTP server) and Slick (database) specific settings:
- HTTP server settings (Akka HTTP)
- Threading system etc. (Akka)
- SQL value history database (Slick forConfig)
- see also guide on how to use a different db
- Authentication and/or Authorization module
- InfluxDB as value history db. Install it separately and see this guide
- Warp10 as value history db. Branch
warp10integration
has experimental integration to Warp10 as the DB backend. Download-warp10
version from releases.
O-MI-Node/
- Main directory for the o-mi-node serversrc/main
- Server source codesrc/test
- Source code of automatic testshtml/
- Developer web app source
Agents/
- Sources for all internal agent examplestools/
- Some scripts and examples for working with O-DF/O-MIdatabase/
- Database location when runningproject/dependencies.scala
- Library dependencies list and versionsbuild.sbt
- Build system settings and instructionssrc/
- Only some specific files for releases, seeO-MI-Node/src
for real sources
Sections of this project has been developed as part of the bIoTope Project, which has received funding from the European Union’s Horizon 2020 Research and Innovation Programme under grant agreement No. 688203.