This pairing task was chosen from https://www.recurse.com/pairing-tasks
Before your interview, write a program that runs a server that is accessible on http://localhost:4000/. When your server receives a request on http://localhost:4000/set?somekey=somevalue it should store the passed key and value in memory. When it receives a request on http://localhost:4000/get?key=somekey it should return the value stored at somekey.
During your interview, you will pair on saving the data to a file. You can start with simply appending each write to the file, and work on making it more efficient if you have time.
This assume Ruby is installed (tested on MRI 2.5.1, but it should run on most modern Rubies). The server and client only require standard libraries. The spec requires RSpec 3.x to be installed.
The server can be started with ./db_runner.rb
The "feature" tests can be run with ./test_client.rb
when the server is running
The specs can be run with rspec db_server_spec.rb
if RSpec 3.x is installed.