DoDWAN's source code is 100% Java code. It can therefore run on any platform featuring a standard JRE (Java Runtime Environment).
This code is however distributed with a bash script dodwan.sh
(located in $DODWAN_HOME/bin
) that makes it easy to start and stop
DoDWAN on a Linux host, and to publish and receive files on this host.
Usage: dodwan.sh start
| stop
| status
| clear
| publish <desc> <fname>
| subscribe <key> <pattern> {-d dir | -e cmd}
| unsubscribe <key>
| console (for experts)
dodwan.sh start
dodwan.sh stop
Note that although several DoDWAN instances could run concurrently on
the same host, the bash script dodwan.sh
has been designed so
that only one instance shall run on each host. So if you want to test
DoDWAN you will need to install it on at least two hosts.
dodwan.sh status
Once DoDWAN is running on the local host it can be used to publish
content. The transmission data unit for this content is a
message. Each message combines a descriptor (i.e. a collection of
name=value
pairs) and a payload.
The script makes it easy to publish the content of a file as the payload of a message:
dodwan.sh publish [desc] [fname]
where:
desc
: descriptor for the message (comma-separated list of name=value
pairs)fname
: path to the file whose content will constitute the payload of the messageA DoDWAN node can only receive messages from other nodes once a subscription has been set on that node:
dodwan.sh subscribe [key] [pattern] {options}
where:
key
: subscription key (must be unique and will be used to remove the subscription if needed)pattern
: interest pattern (comma-separated list of name=value
pairs, where values can be regular expressions)options
: determine what to do with messages that match the pattern (optional)Possible options are:
-d [dir]
: save a copy of the message's payload in that directory-e [cmd]
: execute that external commandWhen an external command must be executed to process a message (option
-e
), the attributes of the message's descriptor are passed as
arguments to that command, and the payload of the message is piped to
the command's input stream.
dodwan.sh unsubscribe [key]+
where:
key
: key of each subscription to be deleteddodwan.sh clear
Many features in DoDWAN can be controlled using its builtin
console. In fact the bash script dodwan.sh
is just a front-end
to that console, and the set of commands it provides (start,
stop, publish, subscribe, etc.) is only a subset of the
possibilities offered by the console.
The full console can be accessed with:
dodwan.sh console