https://github.com/aosasona/gossiper
Shhh... it's UDP [WIP]
https://github.com/aosasona/gossiper
experimentation
Last synced: 9 months ago
JSON representation
Shhh... it's UDP [WIP]
- Host: GitHub
- URL: https://github.com/aosasona/gossiper
- Owner: aosasona
- Created: 2023-03-18T17:13:40.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2023-03-31T09:20:19.000Z (about 3 years ago)
- Last Synced: 2024-05-01T13:39:06.955Z (about 2 years ago)
- Topics: experimentation
- Language: Go
- Homepage:
- Size: 110 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Gossiper

I probably should have named this something else, but this is not a real project.
I am just playing with UDP and replicating TCP-like features (yep, it's stupid) to achieve a message broker-like system via UDP with nearly the reliability of TCP.
## MESSAGE FORMATS
Every message has 3 common parts; type|the client ID and the tail; total_bytes (used by the server to verify the data is in good shape)
> message: MSG|client_id|message_id|message|total_bytes
>
> ack: ACK|client_id|message_id|total_bytes
>
> ping: PING|client_id|total_bytes
>
> pong: PONG|ping_interval
Live clients: Since it's UDP, nothing is actually kept alive per se, but I want my server to know what clients are still "alive" before sending a message and for ACK counting before destroying a message.
## How?
Clients reach out to the server at an interval provided by the SERVER, and it is periodically checked to ensure that the client is still connected.
> Type *:exit* or *:q* to kill a client