Daggy - Data Aggregation Utility and C/C++ developer library for data streams catching
Daggy main goals are server-less, cross-platform, simplicity and ease-of-use.
Daggy can be helpful for developers, QA, DevOps and engineers for debug, analyze and control any data streams, including requests and responses, in distributed network systems, for example, based on micro-service architecture.
In short terms, daggy run local or remote processes at the same time, simultaneously read output from processes, stream and aggregate them under once session
Core - library for streams aggregation and catching
Daggy - console application for aggregation streams into files
Daggy High Level Design
Basic terms
The main goal of Daggy Software System is obtaining the data from envorinments that located in sources to streams into aggregators and via providers.
Environment contains data for streams. Out of box, Core supports local and remote environments, but can be extended by user defined environments. Local Environment is located on the same host, that Daggy Core instance. Remote Environment is located on the different from Daggy Core instance host. User defined environment can be located anywhere, likes databases, network disks, etc.
Sources are declarations, how to obtain the data from environments. It descirbes, which kind of data need to be conveted to streams and which provider will need.
There is example of sources that contains once local environment and once remote environment:
The streams from local environment are generates via local provider (looks at type: local).
The streams from remote environment are generates via ssh2 provider (looks at type: ssh2).
Out of box Core provides local and ssh2 providers. Both providers obtains the data for streams from processes - the local provider runs local process and generates streams from process channels (stdin and stdout). Ssh2 provider runs remote processes via ssh2 protocol and also generates streams from process channels. The Daggy Core can be extended by user defined provider that will generate streams, for example, from http environment.
Providers generate streams by parts via commands. The each part has unique seq_num value, uninterruptedly and consistently. It means, that full data from stream can be obtain by adding parts of stream in seq_num ascending order. Each stream can be generated by command.
The Core translates streams from any count of providers in once Core Streams Session. The streams from Core Streams Session can be aggregated by aggregators or viewed by user.
Out of box, the Core provides several types of aggregators:
File - aggregates streams into files at runtime, as data arrives. This aggregator is used by Daggy Console Application.
Console - aggreagates streams into console output. This aggregator is used by Daggy Console Application.
Callback - aggregates streams into ANSI C11 callbacks. This aggregator is used by Core ANSI C11 Interface.
The Core library can be extended by user defined aggregators.
Getting Started
Getting Daggy
Fedora
sudodnfinstalldaggydaggy-devel
Windows
Download installer or portable version from releases page.
Linux
Download rpm/deb or portable version from releases page.
MacOS
Download portable version from releases page or install via homebrew:
23:07:23:977 | AppStat | Start aggregation in 01-04-20_23-07-23-977_simple
23:07:23:977 | ProvStat | localhost | New state: Started
23:07:23:977 | CommStat | localhost | pingYa | New state: Starting
23:07:23:977 | CommStat | localhost | pingYa | New state: Started
There are all commands from simple.yaml/simple.json are streams in 01-04-20_23-07-23-977_simple with output files
Tailing streams from Simple Data Source
tail -f 01-04-20_23-07-23-977_simple/*
64 bytes from ya.ru (87.250.250.242): icmp_seq=99 ttl=249 time=21.2 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=100 ttl=249 time=18.8 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=101 ttl=249 time=23.5 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=102 ttl=249 time=18.8 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=103 ttl=249 time=18.8 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=104 ttl=249 time=17.4 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=105 ttl=249 time=17.4 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=106 ttl=249 time=20.1 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=107 ttl=249 time=25.8 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=108 ttl=249 time=35.1 ms
64 bytes from ya.ru (87.250.250.242): icmp_seq=109 ttl=249 time=21.1 ms
Stop data aggregation and streaming
Type CTRL+C for stopping data aggregation and streaming. Type CTRL+C twice for hard stop application, without waiting cancelation of child local and remote processes.
23:07:23:977 | AppStat | Start aggregation in 01-04-20_23-07-23-977_simple
23:07:23:977 | ProvStat | localhost | New state: Started
23:07:23:977 | CommStat | localhost | pingYa | New state: Starting
23:07:23:977 | CommStat | localhost | pingYa | New state: Started
^C23:17:56:667 | ProvStat | localhost | New state: Finishing
23:17:56:668 | CommStat | localhost | pingYa | New state: Finished. Exit code: 0
23:17:56:668 | ProvStat | localhost | New state: Finished
23:17:56:668 | AppStat | Stop aggregation in 01-04-20_23-07-23-977_simple