- 1 Description
- 2 Installing SensiNact
- 3 Using distributed version
- 4 Instance Configuration
- 5 References
Sensinact Remote allow two different instances of sensiNact to become visible to each other by using a distribution mechanism. This mechanism is based on the Remote Service Admin, which is an OSGi Compendium standard. The specification is detailed on Section 122 in R6 OSGi Compendium specification.
In order to install sensiNact on your system, you will need to have APT (Advanced Package Tool) available on it. It will be in charge of downloading the software solving and installing the required dependencies for running sensiNact. The instruction presented in this wiki were tested under Ubuntu 14.04 and 18.04, in any other distribution the steps below may be slightely different.
For the first time installation you will need to add the APT repository into your system, include the server public cryptographic key of the SensiNact APT repository.
If the APT repository was already configured previously, you dont need to do it again, just update your local catalog and install the sensiNact, as explained below.
APT Repository inclusion
Include the APT repository http://sensinact-cea.ddns.net into your linuxbox.
This can be done by adding the entry deb http://sensinact-cea.ddns.net ./sensinact main into your sources.list file.
To guarantee that the software is coming from our official server, you have the add our public key into your local keystore. This procedure can be done using apt-key application with the follow instruction:
wget -O- http://sensinact-cea.ddns.net/sensinact.key | apt-get add -
Update the APT catalog
Once the previous steps are executed you should be allowed to download the catalog of applications available in the sensiNact server, this can be done by executing the command apt-get update
Installing sensiNact is as simple as snapping your fingers, just execute the command bellow and sensinact will be installed along with its required dependencies.
apt-get install sensinact=20190507.0
If you remove the =20190507.0 already have a sensiNact installed using APT, the newest version will be installed, all the profiles activated on the previous installation will be kept, the profiles (folders into $SENSINACT/load/) postfixed with '-project' will be kept as well, all others will be removed and the latest set of profiles will installed.
If you felix configuration $SENSINACT/conf/config.properties file was changed and the pristine version of this very same file was modified as well this two modifications will be merged, in case of conflict you will have to chose among the options of keeping your version, using the maintainer version (the one present in the installer) or merge the files manually, those options will be presented to you via APT; just follow the instructions.
From the source
Download the code source from . In order to compile the codesource you are going to need:
- Maven (minimum version 3.5.2)
- Java (minimum version 1.8)
Go to the root of the sourcecode downloaded and execute mvn clean install -DskipTests, the integration tests are going through an update thus they are not passing, for that reason the tests are skip.
Using distributed version
Softwares required for testing the sensinact distributed are:
- SensiNact installed (at least version 20190507.0)
- Zookeeper server instance
- MQTT broker instance
- 2 x Computers in the same network
The distributed sensinact version requires a MQTT Broker and a Zookeeper server available for the sensiNact instances; If your objective is to test the distribution that is not a problem, we have an instance of both systems running and publicly available for testing, the installer is already pre-configured to use those instances. Although, if you are considering in putting the distribution in production you MUST create exclusive instances of Zookeeper and MQTT for your deployment.
SensiNact profiles that must be enable in order to test the distributed version are:
- android-imu (optional)
- application (optional)
- simulation (optional)
In order to enable those profiles use the command sensinact -c script.
There are 3 main configuration files that are used directly or indirectly by the remote access:
- $SENSINACT/cfgs/sensinact.config - This files contains the namespace of the instance and the address of the MQTT broker, which is used to exchange update notification between instances.
- $SENSINACT/cfgs/org.apache.aries.rsa.discovery.zookeeper.config - This file setup the connection inforamation for the zookeeper instance, as port and address
- $SENSINACT/cfgs/org.apache.aries.rsa.provider.fastbin.config - Configuration which will tell how the Bean should be exported (Aries RSA configuration), this this case fastbin is using for its multiplex capacity. One port can be use to export several remote accessible beans.
The fundamental information to update is the field namespace in the file sensinact.config. This namespace is used as a prefix on each device provider see from remote machine to identity the instance of sensinact that manages the device.
There cannot exist two instances with the same namespace into the sensinact network, the policy followed is first come first served, meaning that the first instance to acquire the name and enter into the network will keep the name, if a second instance tries to connect to the network with the same name, its access will be denied, and it will not be able to see the other machines into the network other then itself.
Distribution use case
The distribution of sensiNact instances consist in enable individual instances to see and interact with devices that are actually managed/instantiated by another sensiNact instance located in a remote computer.
The Application Manager is able to solve the availability of resources located in those remote instance. If one of the resources used by the application refers to a remote resource and the Application Manager has the  enabled, the application will receive the events of arrival and departure of those resource, thus being able to be automatically activated or desactivated by the Application Manager.
Next objectives for the sensinact distributed
- Implement Group/Cluster concept
- Embed Zookeeper instance