Skip to content

solutions to the Protohackers server programming challenges

License

Notifications You must be signed in to change notification settings

tlgs/protohackers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

protohackers

Solutions to the Protohackers server programming challenges:

  1. Smoke Test - Echo service from RFC 862 (TCP).
  2. Prime Time - Primality testing service using a JSON-based response-request protocol (TCP).
  3. Means to an End - Asset price tracking service using a binary message format (TCP).
  4. Budget Chat - Simple chat room (TCP).
  5. Unusual Database Program - Key-value store (UDP).
  6. Mob in the Middle - Man-in-the-middle attack on Budget Chat (TCP).

Setup

$ mkdir -p bin
$ go build -o bin ./...

Deployment

The server is deployed/hosted on AWS: see the CloudFormation template. Additionally, a useful collection of tiny Bash scripts is defined in internal/deploy.

I typically use direnv to automatically set project-relevant environment variables and add helper utilities to PATH. My .envrc looks something like:

export AWS_ACCESS_KEY_ID=
export AWS_SECRET_ACCESS_KEY=
export AWS_DEFAULT_REGION=

export EC2_KEYNAME=
export CHECKER_ADDR=

PATH_add internal/deploy
PATH_add bin

About

solutions to the Protohackers server programming challenges

Topics

Resources

License

Stars

Watchers

Forks