/SHODAN

sentient hyper optimized data access network

Primary LanguageScala

SHODAN

SHODAN is a framework for performing reservoir computing.

Currently SHODAN offers functionality for using reservoir data sent over TCP to control a simple agent, as well as sending input to the reservoir. Database storage and playback is included but still fairly rough.

While the aim of SHODAN is to offer functionality for any reservoir it is currently only geared towards in vitro neurons sent from the MEAME server using the multichannel systems MEA2100 neural interface.

A description of the general idea behind SHODAN and can be read here https://github.com/PeterAaser/semproj/blob/master/semesterrapport%20peter%20aaser.pdf

Getting started

Installing

SHODAN is developed and tested on ubuntu 16.04, but should work on most GNU/Linux distros To build SHODAN only sbt (scala build tool) is required. Since the main compilation target of scala is java bytecode you must have a jvm installed in order to run sbt, but apart from that sbt will pull all necessary dependencies, including the scala language itself.

In short you need a jvm and some recent version of postgres

To install first get sbt. Version doesn’t really matter as it is set in $SHODAN_ROOT/project/build.properties and will be downloaded on first compile

$: sbt compile

After getting the correct version you should, for your own convenience, add coursier and ensime to your ~/.sbt/1.0/plugins/plugins.sbt file like so:

addSbtPlugin(“io.get-coursier” % “sbt-coursier” % “1.1.0-M9”) addSbtPlugin(“org.ensime” % “sbt-ensime” % “2.6.1”)

Or you can just run $: make sbtconf

In order to set up postgres you can run $: make scaffold

The frontend written is scala.js (scala transpiling to js) can be hosted from sbt. By starting sbt with the argument ~fastOptJS the frontend will be recompiled as you write code. Typically I have two sbt sessions, one for the frontend and one for the backend.

The first time you run SHODAN you must compile the frontend with $: sbt compileStatics $: sbt compileCss

Then, upon starting the backend with $: sbt run

You can access http://127.0.0.1:8080/#/idx/live in your browser.

Running an editor supporting ensime is highly encouraged, such as emacs, spacemacs or vim. All documentation is expected to be in the .org format, so your editor must be org capable if you intend to write and read documentation in your editor. I haven’t tried developing SHODAN with a scala specific IDE. It might work well, you can give it a shot!

Getting started with SHODAN

SHODAN is a fairly large codebase, so getting started can be quite daunting. A good start is getting familiar with functional streaming. Taking a look at the fs2 documentation is a good start. https://github.com/functional-streams-for-scala/fs2/blob/series/0.10/docs/guide.md

In order to read the code you should start in streamAssemblers.scala, which is called by the entry point in Launcher.scala.

Here you can see how the various resources, buffers etc are set up

TODO: Write documentation when needed.

MEAME2, MEAME-DSP

SHODAN interacts with the MEAME-DSP through MEAME2. Some documentation on the DSP is presented in the dsp.org file, but keep in mind the documentation from mcs is a nigh incomprehensible ultra-clusterfuck.