https://github.com/imdea-software/tesslaserver
Runtime for Tessla Specifications
https://github.com/imdea-software/tesslaserver
Last synced: 25 days ago
JSON representation
Runtime for Tessla Specifications
- Host: GitHub
- URL: https://github.com/imdea-software/tesslaserver
- Owner: imdea-software
- License: mit
- Created: 2016-10-05T10:08:26.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-01-20T08:46:45.000Z (over 9 years ago)
- Last Synced: 2025-01-06T20:32:40.010Z (over 1 year ago)
- Language: Elixir
- Homepage:
- Size: 91.1 MB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# TesslaServer
[](https://opensource.org/licenses/mit-license.php)[](https://semaphoreci.com/miradorn/tesslaserver)[](https://beta.hexfaktor.org/github/imdea-software/TesslaServer)[](https://coveralls.io/github/imdea-software/TesslaServer?branch=master)
## Introduction
TesslaServer implements a Runtime for Tessla specifications written in Elixir.
Tessla is a project of the ISP at the University of Luebeck in Germany.
A short introduction can be found [here](https://www.coniras.org/wp-content/uploads/2016/01/CONIRAS_SMD_2.pdf).
One part of Tessla is the compiler, which takes a specification and translates it into json.
While the compiler isn't available you can probably get a copy by geting in contact with the ISP.
For test and benchmark purposes some specifications are provided before and after compilation.
To use this runtime you have to have at least the Erlang plattform installed (including BEAM), but it is recommended
to also install Elixir for development purposes.
TesslaServer was implemented as part of the Master Thesis of Alexander Schramm, which will be available at GitHub at some point after he has finished it.
The Chapter *Implementation Details* contains a lot of useful information about the general architecture of the runtime.
## Howto build
If you have Elixir installed you can built an escript with `mix escript.build` and run it afterwards.
For test and development purposes you can also load the project into an REPL by using `iex -S mix`.
## Howto run
After building the escript you can run TesslaServer by entering `./tessla_server $specification.tessla`.
Now you can enter events by hand in the format `stream_name value seconds microseconds`, e.g.:
`function_calls:increment 1 12341234 12234`.
Maybe more comfortable you can also feed a file containing traces to the runtime with the `--trace` option:
./tessla_server example.tessla --trace example.trace
Finally you might be interested in actual conclusions the runtime.
Since the Tessla Compiler at this point doesn't include informations about outputs in the compiled files you have to
specify the output nodes on the command line with the `-o` switch:
./tessla_server example.tessla --trace example.trace -o 4:error -o 15:counter
As you can see you can include multiple outputs.
The format is simply the id of the node in the specification followed by a colon followed by a name you are free to choose for the node.
Running this command will output information about the nodes 4 and 15 everytime they progress or emit an event/change.
Since this might get noisy you can obviously pipe it into `grep`, e.g.:
./tessla_server example.tessla --trace example.trace -o 4:error | grep "value: true"
if you only want to be notified about the fact, when node 4 emits a `true` event.
## Howto test
See Elixir testing, to run tests enter: `mix test`
## Howto examples
Under `test/examples` some example specifications are given.
Except the `minimal` example all should run as expected.
## Howto benchmark
Most of the benchmarks require the [dumbbench](https://github.com/tsee/dumbbench) perl program to be installed and in the path.
Note that most benchmarks rely on the executed program to terminate.
Based on TesslaServers distributed nature it won't terminate in it's normal configuration.
Therefore the executables inside the benchmark directorys are changed in a way, that they will terminate
as soon as an output emits `true`.
For everything else look at the `README.md` in the folder of the respective benchmark.