SOXFire

soxfire

What is SOXFire ?

Please see our paper at this moment. We will make casual description soon..

Setup Guide

Soxfire can be compiled and operated in any OS like OSX, Windows and Linux etc (as same as Openfire).
This guide is for Linux (Ubuntu) operating system, but you can setup soxfire in your operating system easily. Soxfire is based on Openfire, so you can also check how to install Openfire or how to build the source.
This is another example for openfire.

1. Preparation

  1. Java
  2. Please install Java environment (see example) . Also set $JAVA_HOME in your shell.

  3. MySQL
  4. Soxfire highly recommend to use MySQL. Please download and install MySQL (see example). Make sure that you are using MySQL 4.1.18 or later (5.x recommended). We are currently using MySQL v5.6.
    Then, create user and soxfire database like this:

    	  	mysql> CREATE USER 'soxfire'@'localhost' IDENTIFIED BY 'YOUR_PASSWORD';
    	  	mysql> GRANT ALL PRIVILEGES ON *.* TO 'soxfire'@'localhost' WITH GRANT OPTION;
    	  	mysql> CREATE DATABASE soxfiredb DEFAULT CHARACTER SET utf8mb4;
    	  

    We use utf8mb4 for character set to use multi-byte character set.

    Next, download following schema file (soxfire_mysql.sql) and import to the database.

    	  	%cat soxfire_mysql.sql | mysql -u soxfire -popenfire soxfiredb -p
    	  

  5. Ant
  6. Please install Ant. It’s very easy for Ubuntu to install Ant.

    	  	%sudo apt-get -u install ant
    	  
  7. Soxfire source code download
  8. soxfire-1.0.3.zip (Release: Sep.1 2016)

2. Compile and Start

Uncompress the download tar.gz or zip file. Then, move to build directory and build.

		%cd soxfire_src/build/
		%ant
	

You can find compiled files in soxfire_src/work and soxfire_src/target directory. To run the soxfire server, go to target/openfire/bin directory and run openfire.sh.

		%cd soxfire_src/target/openfire/bin
		%./openfire.sh
	

3.Configuration

Open http://localhost:9090 in your browser. You can see following Setup interface.

setup

You can basically follow Openfire setup example as shown in above link. Especially for soxfire database, please select MySQL.

db

4. SOXFire Federation

s2s

If you want to open your SOX server to other SOX server, you have to set your DNS.
For example, suppose you are operating “your-sox.domain.com” SOX server and there is a node called “node1” in the server.
If you allow users in other SOX servers (for example, “other-sox.example.com”) to use “node1” in your SOX server, you have to set following entry to your DNS. (be sure your-sox.domain.com is already solved in your DNS.)

	pubsub.your-sox.domain.com        IN      A		IP_ADDRESS
	

OR

	pubsub.your-sox		IN 		CNAME 		your-sox.domain.com.	
	

Then, other users in other SOX can use sensor nodes in your SOX by using following code.

	SoxConnection con = new SoxConnection("other-sox.example.com", "user","pass", true);
	SoxDevice exampleDevice = new SoxDevice(con, "node1","your-sox.domain.com");
	

5. Options

– Our SOX Javascript library uses port number for HTTP Binding as 5280(HTTP Binding) and 5281(Secure HTTP Binding). Please modify HTTP binding ports by admin console if necessary.

– You can configure vmoptions by putting a file named openfire.vmoptions in target/openfire/bin directory. Just describing Xms and Xmx into openfire.vmoptions file like this:

      -Xms4096m
      -Xmx6196m