Skip to content

Commit

Permalink
Release v0.2.0 (#64)
Browse files Browse the repository at this point in the history
* Adding utility functions for underlying conn access

* Adding some raw write utility functions

* Test stability

* Test stability

* Adding utility func

* In golang, io.EOF is served when a network connection is CLOSED, not when it's empty - that's blocking

* Adding debugging for lynk (temporary)

* Adding debugging for lynk (temporary)

* Adding debugging for lynk (temporary)

* Adding debugging for lynk (temporary)

* Adding debugging for lynk (temporary)

* Temporarily removing ReadFrom functionality

* Undoing some temp changes

* Changing the way streamConns are registered

* Testing buffered reader in ReadFrom

* Undoing buffered reader stuff

* Adding some interface implementations

* Adding some interface implementations

* Adding some interface implementations

* Removing buffer message types from Frisbee

* Removing buffer message types from Frisbee

* Solidifying tests

* Solidifying tests

* Moving around waitgroup logic

* testing

* Swapping to uint64 for frisbee message ID, and adding "FBEE" reserved bytes at start of message (instead of 0s)

* Refactoring frisbee conn into async and stream structs

* Adding license headers, improving test cases, adding test cases for Sync connections

* Removing waitgroup in Sync connection (no goroutines are run)

* Adding waitgroups to guarantee all goroutines are dead

* Revert "Adding waitgroups to guarantee all goroutines are dead"

This reverts commit 054bc30

* Fixing comment, adding atomic shutdown var to server

* Testing server waitgroup to make sure server goroutines are shutdown

* Testing server waitgroup to make sure server goroutines are shutdown

* Adding flaky tests checker

* Adding flaky tests checker

* Using require for failures

* Changing closed error

* Making tests less flaky

* Making tests less flaky

* Making TestStreamIOCopy less flaky

* Adding timeouts to testing

* More obvious wait logic for client wait group

* More obvious wait logic for client wait group

* Removing require so we get more debug messages

* Update CHANGELOG.md

* Update CHANGELOG.md

* Update CHANGELOG.md

* Fixing some buggy tests, improving streamChannel usage

* Increasing timeouts

* Increasing timeouts

* Increasing timeouts even more

* Update CHANGELOG.md

* Updating module path

* Fixing paths to github.com/loopholelabs

* Adding TLS connection state information

* Fixing TLS listener error

* Fixing TLS Conn error

* Fixing many bugs

* Testing small flush bug

* Upgrading go version on tests

* Updating changelog for release 0.1.4

* Going back to version 1.16 because semaphore doesn't support 1.17 yet, removing unnecessary switch statement

* forcing connections to be over TCP

* Finalizing CHANGELOG.md

* heartbeat logging

* Doing 30 second deadline, adding testing deadlines to every async read

* Changing deadline to 5 seconds, adding error channel

* Increasing the deadline once again

* Adding log messages

* Fixing logging message formats

* Fixing logging message formats

* Fixing logging message formats

* Fixing major bug

* fix #44 - Handing Disconnected Connections (#47)

* Removing Connection Paused State and instead using connection closed state, which should return an error.

Temporarily removing all timeouts during normal reading in case they're not required.

Fixes #44

* Changing the way we check for dead connections by sending a NOOP message whenever a timeout occurs

Fixes #44

* Adding timeout for sleep

Fixes #44

* Removing sleep timeout for large decoded message contents

Fixes #44

* Optimizing heartbeat times and default deadlines

* Fixing test case for options_test.go

* Fixing timeout to use PING and PONG messages

* Improving PR and issue templates

* Improving PR and issue templates

* Improving PR and issue templates

* Updating changelog for release

* feat #53 - Adding Client Flush API (#54)

* Adding client flush API

* Close the error channel after killing goroutines

* Adding debug logging

* Adding debug logging

* Adding debug logging

* Keeping logging, adding some more error checks

* Adding counter for more testing

* Checking conn state before doing deadline stuff

* Checking conn state before doing deadline stuff

* Checking conn state before doing deadline stuff

* Checking conn state before doing deadline stuff

* Checking conn state before doing deadline stuff

* Making close async

* Making close async

* Killing goroutines does not block the read loop

* Killing goroutines does not block the read loop

* Paralleling test cases

* Paralleling test cases

* Adding sleep to test case for less flakyness

* Fixing nits

* Updating Changelog for v0.1.6 (#57)

* Fixing update bug

* Adding sync workflows

* Overhauling Frisbee for RPC framework

* Creating separate pools

* Removing semaphore

* Fixing debug

* Updating formating so linting passes

* Improving test stability

* Improving test stability

* Only running benchmarks on PRs

* Removing 1mb test case for pipes

* Increasing github actions timeout

* Better test stability

* Forcing the packet to be read during the benchmark

* Fixing major bug in flush loop where write deadline was being set during the flush but not being unset, which worked for small amounts of data but not for large amounts of data - writing a byte slices that's too large for the internal buffer of a bufio.Writer will cause the byte slice to bypass the buffer. Because the buffer was being bypassed, the connection was being written to outside the flush loop - where the deadline had not been reset. The solution to this was to simply set the deadline in the `WriteMessage` function

* Pausing GC during sync.Pool tests to make them less flaky

* Improving benchmarking so race conditions don't cause timeouts

* Using loop to test pool

* Updating readme to not use semaphore badges

* Fixing linting bugs

* Fixing linting bugs

* Updating test cases

* Updating test cases

* Updating test cases

* Testing upgrade

* Other test

* Improving async throughput by 2x

* Adding sync tests

* Deleting sync workflows

* Adding contexts to frisbee handlers

* Adding switch fast path

* Adding goroutine leak tester

* Adding .DS_Store to gitignore

* Fixing bug in server

* Updating close logic, fixing major bugs in client heartbeat logic

* Fixing memory management

* Fixing documentation and calling `protocol.Message` `metadata.Metadata` to be more clear.

* Adding packet context functionality to server and client

* Tiny nits, updating final logging and documentation

* Replacing ringbuffer

* Going back to ringbuffer

* Pushing updated code

* Removing ringbuffer and adding metadata pool

* Adding pool

* Updating docs and adding pool

* fixing pr template

* Adding optional pool semantics to clients

* Bug in the server somewhere that's causing a ridiculous number of allocations and tanking throughtput

* Fixing linting issues

* Adding license header

* Fixing packet tests

* Fixing packet tests

* Performance spike

* Padding queue to increase performance at the cost of memory

* Fixing some potential bugs in the queue, keeping all unsafe code inside queue.go

* Tidying go.mod

* Adding connection closer hook for when connection is closed from the client side

* Adding connection closer hook for when connection is closed from the client side

* Adding comments and test cases

* Fixing flaky test

* Fixing flaky test

* Preparing for Release

* Preparing for Release

* fixing conflict

* Fixing linting issues
  • Loading branch information
ShivanshVij committed Feb 22, 2022
1 parent 3585f8f commit e77c7c0
Show file tree
Hide file tree
Showing 51 changed files with 2,507 additions and 3,247 deletions.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
title: ""
labels: bug
assignees: Jspsun

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ blank_issues_enabled: false
contact_links:
- name: Loophole Labs Community Support
url: https://discord.gg/JYmFhtdPeu
about: Please ask and answer questions here.
about: Please ask and answer questions here.
3 changes: 1 addition & 2 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
title: ""
labels: enhancement
assignees: ShivanshVij

---

**Is your feature request related to a problem? Please describe.**
Expand Down
3 changes: 1 addition & 2 deletions .github/ISSUE_TEMPLATE/other.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
name: Other
about: A different type of issue
title: ''
title: ""
labels: question
assignees: ShivanshVij

---

**Description of the Issue. Please be as clear as possible.**
Expand Down
6 changes: 3 additions & 3 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Fixes # (issue)

## Testing

Please make sure that existing test cases pass (with `go test ./... -race` and `go test -bench=. ./... -race`),
Please make sure that existing test cases pass (with `go test ./... -race` and `go test -bench=. ./... -race`),
and if required please add new test cases and list them below:

- [ ] Test A
Expand All @@ -28,14 +28,14 @@ Frisbee tries to adhere to strict performance requirements, so please make sure
### Benchmarking Results:

```shell

```

## Linting

Please make sure you've run the following and fixed any issues that arise:

- [ ] `go fmt ./...` has been run
- [ ] `golangci-lint run --skip-dirs-use-default` has been run
- [ ] `trunk check` has been run

## Final Checklist:

Expand Down
42 changes: 42 additions & 0 deletions .github/workflows/benchmarks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Benchmarks

on:
pull_request:
branches:
- "*"

jobs:
tests:
runs-on: ubuntu-latest
steps:
- id: go-cache-paths
run: |
echo "::set-output name=go-build::$(go env GOCACHE)"
echo "::set-output name=go-mod::$(go env GOMODCACHE)"
- name: Checkout
uses: actions/checkout@v2

- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17

- name: Go Build Cache
uses: actions/cache@v2
with:
path: ${{ steps.go-cache-paths.outputs.go-build }}
key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }}

- name: Go Mod Cache
uses: actions/cache@v2
with:
path: ${{ steps.go-cache-paths.outputs.go-mod }}
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}

- name: Benchmark
run: go test -bench=. -v ./...

- name: Benchmark with Race Conditions
run: go test -bench=. -race -timeout 30m -v ./...
timeout-minutes: 30
22 changes: 22 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Lint

on:
pull_request:
branches:
- "*"

jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Cache Linters/Formatters
uses: actions/cache@v2
with:
path: ~/.cache/trunk
key: trunk-${{ runner.os }}

- name: Trunk Check
uses: trunk-io/trunk-action@v0.4.0-beta
42 changes: 42 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Tests

on:
push:
branches:
- "*"

jobs:
tests:
runs-on: ubuntu-latest
steps:
- id: go-cache-paths
run: |
echo "::set-output name=go-build::$(go env GOCACHE)"
echo "::set-output name=go-mod::$(go env GOMODCACHE)"
- name: Checkout
uses: actions/checkout@v2

- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17

- name: Go Build Cache
uses: actions/cache@v2
with:
path: ${{ steps.go-cache-paths.outputs.go-build }}
key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }}

- name: Go Mod Cache
uses: actions/cache@v2
with:
path: ${{ steps.go-cache-paths.outputs.go-mod }}
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}

- name: Test
run: go test -v ./...

- name: Test with Race Conditions
run: go test -race -v ./...
timeout-minutes: 15
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
*.out
*.test
.env
.idea/
.idea/
.DS_Store
13 changes: 13 additions & 0 deletions .markdownlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Autoformatter friendly markdownlint config (all formatting rules disabled)
default: true
blank_lines: false
bullet: false
html: false
indentation: false
line_length: false
spaces: false
url: false
whitespace: false
first-line-h1: false
no-trailing-punctuation: false
no-duplicate-header: false
131 changes: 0 additions & 131 deletions .semaphore/semaphore.yml

This file was deleted.

1 change: 1 addition & 0 deletions .trunk/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*out
10 changes: 10 additions & 0 deletions .trunk/trunk.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 0.1
cli:
version: 0.7.0-beta
lint:
enabled:
- gitleaks@7.6.1
- gofmt@1.17.6
- golangci-lint@1.42.1
- markdownlint@0.29.0
- prettier@2.4.1
Loading

0 comments on commit e77c7c0

Please sign in to comment.