A project for defining and running Apache Storm topologies in F#
See this blog post for an intro and docs for an overview.
Update: Insights gained from working with FsStorm have led to a spinoff: FsShelter, check it out if you like the idea of statically typed topologies.
build
Building from command line runs the unit tests. IDE: Install NUnit plugin for VS or MonoDevelop to see the unit-tests in Test Explorer and step through the code under debugger.
Have a local Storm installed and running. Make sure F# interpreter is in the path and from the repository root run:
fsi src\FstSample\Submit.fsx
or, if running on Mono:
fsharpi src/FstSample/Submit.fsx
Open Storm UI and see the Storm worker logs for runtime details.
When running on Mono, it can sometimes be useful to pass additional command line arguments to mono when launching a component. For example, you may want to run a profiler:
mono --log:report program.exe
In order to accomplish this with FsStorm, you will need to do the following:
- Specify
Config = jval [ Storm.Config.useShellScript, jval true ]
in your topology definition for the desired component. - Create a shell script with a
.sh
extension in your project that matches theId
of the desired component. For example,AddOneBolt.sh
. The content of the script should invoke mono with the desired arguments and specify the name of your executable:
#!/bin/bash
mono --profile=log:report FstSample.exe
- Set the shell script to be copied to the output folder when the project is compiled.