Web application containing the backend for Streamr Core, facilitating things like:
The application uses the Grails web framework and runs on Java VM.
A convenient way of installing and managing multiple versions of Grails is SDKMAN!.
Additional services are required to run this web application. The easiest way to get them all up and running (for development purposes) is to use the streamr-docker-dev tool we provide.
You might also want to run the Core UI.
Ensure you have the dependencies listed under Dependencies > Tools installed.
Clone this repo
streamr-docker-dev start --except engine-and-editor if you are using the recommended tool streamr-docker-dev.
Otherwise make sure all services dependencies are running and the the web applications is properly configured to
connect to them.
Start the backend application
The project uses Travis CI to automatically run tests for each
master and pull requests.
A Docker image is automatically built and pushed to DockerHub
when commits are pushed to branch
We provide sensible default configurations for IntelliJ IDEA but project can be developed with other IDEs as well.
grails test-app -unit
grails test-app -integration
cd rest-e2e-tests && npm install && npm test
These are also available as pre-shared run configurations if you use IntelliJ IDEA.
This codebase comprises two logical parts:
When you run the app with
grails run-app, most changes to source code files are automatically hot reloaded into the
running JVM process.
There are already modules that allow running code on canvas, e.g. JavaModule. They are, however, "last resort" patches for cases where the existing modules don't offer the required functionality, but the functionality also isn't reusable enough to warrant developing a custom module.
If the required functionality is complex, or if it depends on libraries or external code, you'll need to set up the development environment following the above steps. Upside is of course, after it's done, you also get IDE support (we use IntelliJ IDEA), and you can write unit tests etc.
A module is as simple as a Java class that extends
AbstractSignalPathModule and implements the critical
module-specific functionality (
clearState). The code is going to look the same as in a JavaModule,
only wrapped in a Java class. Please take a look at
the XOR module
for a simple example / boilerplate / starting point. For unit testing a module, see
the XorSpec unit test class
You also need to add your module to the
module table in the MySQL database so that Editor finds your module, and you
can add it on the canvas.
We want to integrate quality module contributions to the project. To get your custom module to the master, the following is required:
This software is open source, and dual licensed under AGPLv3 and an enterprise-friendly commercial license.