An experiment building a custom binary protocol for a calculator

Overview

Implementation of a calculator service built on a custom protocol on top of TCP

Details

The server is in main.go, and the client is in client/client.go Run go test from the client package to see a set of end to end examples

Protocol Details

The first byte is used to represent an operation code. The next two bytes represent the length in bytes of two varint encoded operands. The remaining bytes contain varint encoded bytes for the two operands

More info

https://developers.google.com/protocol-buffers/docs/encoding

https://carlmastrangelo.com/blog/lets-make-a-varint

Owner
Preetha
Engineering Director, working @hashicorp on fun distributed systems problems. Formerly principal engineer @indeedeng
Preetha
Similar Resources

A simple tool to send binary data over a serial port. Designed for use with my retro computer systems.

Colin's Transfer Tool This is a really basic tool to transfer firmware files to my retro computer systems over a serial port. This removes the need fo

Dec 21, 2021

Tool, language and decoders for inspecting binary data.

fq Tool, language and decoders for inspecting binary data. In most cases fq works the same way as jq but instead of reading JSON it reads binary data.

Jan 4, 2023

Transfer decimal ipv4 to binary ipv4

transfer decimal ipv4 to binary ipv4. Download: git clone https://github.com/Bet

Jun 8, 2022

GoLang - Produces a binary suitable for use in shell scripts and cron jobs for rotating IAM credentials.

AWS-Rotate-IAM-Key aws-rotate-iam-key makes it easy to rotate your IAM keys whether they be in your ~/.aws/credentials file or else where. This work i

Feb 9, 2022

A tool that facilitates building OCI images

A tool that facilitates building OCI images

Buildah - a tool that facilitates building Open Container Initiative (OCI) container images The Buildah package provides a command line tool that can

Jan 3, 2023

Tanzu Framework provides a set of building blocks to build atop of the Tanzu platform and leverages Carvel packaging

Tanzu Framework provides a set of building blocks to build atop of the Tanzu platform and leverages Carvel packaging and plugins to provide users with a much stronger, more integrated experience than the loose coupling and stand-alone commands of the previous generation of tools.

Dec 16, 2022

Package buildinfo provides basic building blocks and instructions to easily add build and release information to your app.

Package buildinfo provides basic building blocks and instructions to easily add build and release information to your app.

Package buildinfo provides basic building blocks and instructions to easily add build and release information to your app. This is done by replacing variables in main during build with ldflags.

Nov 14, 2021

Boilerplate for building a monolighic Go and React application

Boilerplate for building a monolighic Go and React application

Monolithic Go and React Application Boilerplate This repository provides a simple and monolithic service with a server written in Go and frontend with

Dec 19, 2022

A boilerplate for building Gradescope autograders for Go projects.

go-autograder A boilerplate for building Gradescope autograders for Go projects. Getting started This autograder works by running all Go tests in a st

Nov 6, 2022
Clockwise is a meeting cost calculator designed to encourage more efficient meetings.
Clockwise is a meeting cost calculator designed to encourage more efficient meetings.

↻lockwise Clockwise is a meeting cost calculator designed to encourage more efficient meetings. The meetings will continue until morale improves.

Oct 25, 2022
INCC calculator based on monthly rates.

inccCalc INCC calculator based on monthly rates. inccCalc version 1.0. Type 'help' for help, 'stop' to end the program. -help -stop -version -calc 'ca

Oct 29, 2021
Antlr go bool calculator

antlr-go-bool-calculator lib used : github.com/antlr/antlr4/runtime/Go/antlr generated parser code: antlr4 -Dlanguage=Go MyGrammar.g4 basic grammar AN

May 26, 2022
Advent of Code 2021, experiment in learning Go

aoc_2021 Advent of Code 2021, experiment in learning Go To run, open a terminal in the root folder of the project and run with go run . <day to run> <

Mar 1, 2022
Pokt-calculator - A reward explorer for Pocket Network nodes
Pokt-calculator - A reward explorer for Pocket Network nodes

POKT Calculator A reward explorer for Pocket Network nodes. Quick start You can

Oct 23, 2022
Epochalypse - Simple TUI Epoch Calculator with golang
Epochalypse - Simple TUI Epoch Calculator with golang

epochalypse Simple TUI Epoch Calculator Screenshot

Feb 22, 2022
Custom release of square/certstrap

certstrap A simple certificate manager written in Go, to bootstrap your own certificate authority and public key infrastructure. Adapted from etcd-ca.

Jun 25, 2022
Packer Plugin Vagrant - The Vagrant multi-component plugin can be used with HashiCorp Packer to create custom images

Packer Plugin Vagrant - The Vagrant multi-component plugin can be used with HashiCorp Packer to create custom images

Jul 13, 2022
In one particular project, i had to import some key/value data to Prometheus. So i have decided to create my custom-built Node Exporter in Golang.
In one particular project, i had to import some key/value data to Prometheus. So i have decided to create my custom-built Node Exporter in Golang.

In one particular project, i had to import some key/value data to Prometheus. So i have decided to create my custom-built Node Exporter in Golang.

May 19, 2022
Analyze the binary outputted by `go build` to get type information etc.

Analyze the binary outputted by go build to get type information etc.

Oct 5, 2022