ProtoStack is a tool for experimentation with dynamic composition of communication services. The implementation of ProtoStack was triggered by a wireless sensor network testbed and is used for experimentation with cognitive radio and cognitive networking in the frame of the CREW project. As such, ProtoStack is designed in a way to ease research and experimentation with communication networks, particularly with cognitive networks. The system was designed so that an advanced user, such as the component developer needs, to focus on developing the component and make it work with Contiki OS and a novice user needs only to focus on composing services in a stack using the workbench.
ProtoStack needs the following components:
- JRE6 or newer
- Apache
- Tomcat
- Sesame 2.x (http://www.openrdf.org/download.jsp)
- The WireIT library
- Contiki OS
- The toolchain allowing building the Contiki image and programming your HW with it
ProtoStack's components are:
- The server (https://github.com/sensorlab/ProtoStack/tree/master/src)
- The ontology (https://github.com/sensorlab/ProtoStack/tree/master/owl)
- The workbench (https://github.com/sensorlab/ProtoStack/tree/master/crimeLayers)
- The CRime library (https://github.com/sensorlab/CRime)
More detailed documentation will come soon.
This a step-by-step guite to setup the ProtoStack tool. All required components are listed in the Readme file.
- Clone the repository into your local filesystem
- Install Apache server and set it up to serve ProtoStack/crimeLayers folder
- Install Apache Tomcat using:
- apt-get install apache7
- sudo apt-get install tomcat7-admin (to get the manager webapp)
- Setup Tomcat:
- Change the tomcat7 port to 8090: http://www.mkyong.com/tomcat/how-to-change-tomcat-default-port/
- add a user to access manager webapp. Run "sudo nano /etc/tomcat7/tomcat-users.xml" and add the following line to the file:
This thread might be helpful: http://stackoverflow.com/questions/12184479/running-multiple-java-jetty-instances-with-same-port-80
- Download required libraries for ProtoStack
- for Jetty, I found that this worked fine: http://central.maven.org/maven2/org/eclipse/jetty/jetty-distribution/8.1.3.v20120416/
- to run Jetty embedded server jars "jetty-all.jar" and "servlet-api.jar" are required, I used these:
- http://repo1.maven.org/maven2/org/eclipse/jetty/aggregate/jetty-all/7.0.2.v20100331/jetty-all-7.0.2.v20100331.jar and http://repo1.maven.org/maven2/javax/servlet/servlet-api/2.5/servlet-api-2.5.jar
- OpenRDF Sesame 2.7.13
- AWS SDK for Java 1.8.11 https://aws.amazon.com/releasenotes/6786824462413999
- Download Contiki and CRime:
- Contiki: https://github.com/contiki-os/contiki/releases/tag/2.5-release
- CRime: https://github.com/sensorlab/CRime
- I suggest placing the CRime folder inside contiki/core/net/rime/ folder
- Import/Open the Protostack project in a Java IDE (I used Netbeans). Edit RunServer.java, specifically lines 13, 15 and 20 (strings cSrcPath, ontologFNm and outSrcPath) to represent where crime files are located. Check TripleStore.java in lines: 44, 53, 61, 69, 77, 85, 93, 102, 167, 301 and 326 if you placed crime.owl file in a different location (if no changes to the folder structure were made, it should be automatically served on apache server together with the crimeLayers folder at localhost/owl/cfrime.owl). Check line 113 of TripleStore.java to make sure you state the port where you Sesame server is running (with newer versions of Sesame, it runs on /openrdf-sesame). Finally, open RequstHandler and change line 112 to point to contiki rime examples.
- After these changes are made, build the project. Then go to your ProtoStack directory and navigate to "/build/classes" and run "java -cp .:servlet-api.jar:jetty-l.jar:../../dist/ProtoStack.jar RunServer" to start the Jetty server. (Packages servlet-api.jar and jetty-l.jar are needed, because this project uses embedded Jetty to provide server functionality.)