A Wire is a type of resource that enables clients to publish and subscribe to opaque streams of data.

Authentication and authorisation

Clients wishing to publish or subscribe to a wire must authenticate with the tdx Volt in the normal way.

In order to publish to a wire, the authenticated identity will require tdx:resource-publish permission, subscribing to a wire requires the tdx:resource-subscribe permission. These permissions can be set from the fusebox ‘share’ panel.

Format and Transforms

By default the wire stream is raw binary. It is anticipated that clients will use the resource ‘kind’ field to indicate the format of data that is published on any given wire. For example, a wire that streams an FS20 feed might indicate this by using a resource ‘kind’ of tdx:wire fs20:feed.

Some scenarios may require transformation of wire data, for example conversion of text data (e.g. tcpdump output) into a serialised protobuf serialisation format.

In the following scenario, output of a tcpdump filter is being piped (published) into a wire. This process is running on the network router.

tcpdump <filter> | ./volt wire -w <tcpdump-id>

On a different machine another process is subscribed to the tcpdump-id wire and transforms the text data it contains into a raw protobuf data stream, and re-publishes it onto another wire:

./volt wire -w <tcpdump-id> -s | tcpdump-transform | ./volt wire -w <transformed-wire-id>

On a third, or multiple other machines, a process subscribes to the transformed wire and pushes it into a database synchronisation file cache:

./volt wire -w <transformed-wire-id> -s | ./volt logger -c tcpdump.logger.json

See the protoDbSync utility for a more detailed analysis of this approach.