Commit Graph

11 Commits (32414acb00696318d8ae5f7d55d373acb446892e)

Author SHA1 Message Date
dependabot[bot] faa8d44492
chore(deps): Bump thiserror from 1.0.43 to 1.0.44 (#8315)
Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.43 to 1.0.44.
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.43...1.0.44)

---
updated-dependencies:
- dependency-name: thiserror
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-07-24 10:18:44 +00:00
dependabot[bot] cd31492e5b
chore(deps): Bump async-trait from 0.1.71 to 0.1.72 (#8317)
Bumps [async-trait](https://github.com/dtolnay/async-trait) from 0.1.71 to 0.1.72.
- [Release notes](https://github.com/dtolnay/async-trait/releases)
- [Commits](https://github.com/dtolnay/async-trait/compare/0.1.71...0.1.72)

---
updated-dependencies:
- dependency-name: async-trait
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-07-24 10:07:18 +00:00
dependabot[bot] 4c4c9f731c
chore(deps): Bump uuid from 1.4.0 to 1.4.1 (#8256)
Bumps [uuid](https://github.com/uuid-rs/uuid) from 1.4.0 to 1.4.1.
- [Release notes](https://github.com/uuid-rs/uuid/releases)
- [Commits](https://github.com/uuid-rs/uuid/compare/1.4.0...1.4.1)

---
updated-dependencies:
- dependency-name: uuid
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-07-18 12:30:42 +00:00
Dom Dwyer 118aefe2d2
chore: use workspace crate config
Inherit version/authors/edition from the workspace.
2023-07-10 13:39:52 +02:00
Dom Dwyer 7880f9287f
chore: add license 2023-07-10 12:11:16 +02:00
Dom Dwyer 58c4874880
chore: workspace_hack support
Add workspace_hack and whitelist the import.
2023-07-10 12:11:15 +02:00
Dom Dwyer 48466bfa89
feat(metrics): bytes/frames sent/received & peers
Emit metrics tracking the number of bytes sent / received, and number of
frames sent / received by the local node.

Track the number of discovered peers to record peer discovery rate and
current number of known peers per node.
2023-07-10 12:11:15 +02:00
Dom Dwyer 93789d7abb
feat: refuse oversized gossip payloads
Calculate the available byte size for a user payload sent via gossip,
and pro-actively check this limit earlier, when the caller is attempting
to send the frame, rather than later in the reactor where there's no
feedback to the caller.

DRY frame serialisation to simplify enforcement, and validate/refuse
oversized frames in the reactor so that frames are unlikely to be
truncated by receivers.
2023-07-10 12:11:14 +02:00
Dom Dwyer bc9ebc9c66
feat: gossip primitive
Adds a simple "gossip" implementation (more accurately described as a
pub/sub primitive currently) that supports broadcasting
application-level messages to the set of active peers.

This implementation uses UDP as a transport for best-effort delivery,
and enables zero-copy use of the payload using the Bytes crate.

Only peers explicitly provided as "seeds" when initialising will be
known to a gossip node - there's currently no peer exchange mechanism.
This implementation tolerates seeds changing their DNS entries when
restarting to point at new socket addresses (such as within Kubernetes
when pods move around).
2023-07-10 12:11:14 +02:00
Dom Dwyer 48aa4a5e33
feat(gossip): frame proto definitions
Adds a proto definition and configures prost to build the rust types
from it.

The gossip framing is intended to be flexible and decoupled - the gossip
library will batch together one or more opaque application messages
and/or control frames, and uniquely identify each peer with a
per-instance UUID to detect crashes/restarts and track peers.
2023-07-10 12:11:13 +02:00
Dom Dwyer 69ab70ce99
feat: init gossip package
Adds a new empty "gossip" package to the workspace.
2023-07-10 12:11:12 +02:00