-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Security policy updates & application baseline (#26)
* feat: creating sample Go module * feat: example error handling * refactor: random example communication message * feat: example map data type (slice) & test cases * Template for suggested experimental expectations (#24) * feat: draft variable packet size experiment * docs: new section for project replicability * docs: markdown diagram (system control flow) + blockquote highlight * refactor: utility to insights + diode collection script * fix: text cache source location * Delete `message` directory * Delete `example` directory * bump: latest Go milestone (minor release)
- Loading branch information
1 parent
60739bf
commit cb880db
Showing
12 changed files
with
137 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,3 +19,6 @@ | |
|
||
# Go workspace file | ||
go.work | ||
|
||
# xperimental results | ||
*.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Standard Operating Procedures | ||
|
||
## System Control Flow | ||
|
||
> [!CAUTION] | ||
> Unidirectional data flow from the source to the destination. | ||
## Research Question | ||
|
||
#### State Synchronization | ||
|
||
#### System Replication | ||
|
||
## System Analysis | ||
|
||
#### Latency | ||
|
||
#### Bandwidth | ||
|
||
#### Throughput | ||
|
||
## Data Integrity |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,21 @@ | ||
module github.com/acep-uaf/data-diode | ||
|
||
go 1.22.0 | ||
go 1.22.1 | ||
|
||
require ( | ||
github.com/eclipse/paho.mqtt.golang v1.4.3 | ||
github.com/olekukonko/tablewriter v0.0.5 | ||
github.com/urfave/cli/v2 v2.27.1 | ||
gopkg.in/yaml.v2 v2.4.0 | ||
) | ||
|
||
require ( | ||
github.com/cpuguy83/go-md2man/v2 v2.0.3 // indirect | ||
github.com/gorilla/websocket v1.5.1 // indirect | ||
github.com/mattn/go-runewidth v0.0.15 // indirect | ||
github.com/rivo/uniseg v0.4.7 // indirect | ||
github.com/russross/blackfriday/v2 v2.1.0 // indirect | ||
github.com/xrash/smetrics v0.0.0-20231213231151-1d8dd44e695e // indirect | ||
golang.org/x/net v0.21.0 // indirect | ||
golang.org/x/net v0.22.0 // indirect | ||
golang.org/x/sync v0.6.0 // indirect | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package analysis | ||
|
||
import ( | ||
"fmt" | ||
"os" | ||
|
||
"github.com/olekukonko/tablewriter" | ||
) | ||
|
||
func Isolation() { | ||
data := [][]string{ | ||
{"Objective", "Vary the packet size in a one packet per second test to observe the impact on bandwidth and latency."}, | ||
{"Expectation", "Low data rate (small packets) will deliver poor bandwidth but good latency, high data rate (large packets) will deliver good bandwidth but poor latency."}, | ||
{"Scenario", "Investigate what happens if more data per second is sent than the diode can forward."}, | ||
{"Question", "Is the excess data queued or dropped?"}, | ||
} | ||
|
||
table := tablewriter.NewWriter(os.Stdout) | ||
table.SetHeader([]string{"Experiment", "Description"}) | ||
|
||
for _, v := range data { | ||
table.Append(v) | ||
} | ||
|
||
table.Render() | ||
} | ||
|
||
func Validation() { | ||
fmt.Println(">> Variable Packet Size") | ||
|
||
example := []string{ | ||
"Latency", "Throughput", "Bandwidth", "Packet Queue", | ||
} | ||
|
||
for _, v := range example { | ||
fmt.Println("* ", v) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/bash | ||
|
||
START=`date +%Y-%m-%d-%k:%m:%S` | ||
COLLECTION=`date +%Y-%m-%d` | ||
LOGFILE="insights/ACEP_CAMIO_SEDOID_RESULTS-${COLLECTION}.txt" | ||
|
||
function log() { | ||
echo "diode: $@" | ||
echo "$@" >> $LOGFILE | ||
} | ||
|
||
TARGET_LOCATION="localhost" | ||
VARIABLE_SIZE=(64 128 256 512 1024 2048) # packets | ||
TEST_DURATION=10 # seconds | ||
|
||
run_experiment() { | ||
local packet_size=$1 | ||
echo ">> Running trial with $packet_size bytes" | ||
|
||
ping -c $((TEST_DURATION)) -s $packet_size $TARGET_LOCATION >> $LOGFILE | ||
|
||
sleep 5 | ||
} | ||
|
||
for iteration in ${VARIABLE_SIZE[@]}; do | ||
run_experiment $iteration | ||
done | ||
|
||
echo ">> Experiment complete. Results: $LOGFILE" |