summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorinterview-bot-ng[bot] <46227427+interview-bot-ng[bot]@users.noreply.github.com>2020-11-21 21:40:35 +0000
committerGitHub <noreply@github.com>2020-11-21 21:40:35 +0000
commit8f679cee1192d216065ed82393f4625c9e4dfb70 (patch)
tree6bcd5fe6bfedaaa027c098a2de20181619c3fa09 /README.md
parent698008851b98800a942dfd2417ef946465889d6b (diff)
Import of the exercise.HEADmain
Diffstat (limited to 'README.md')
-rw-r--r--README.md101
1 files changed, 100 insertions, 1 deletions
diff --git a/README.md b/README.md
index adea80c..80c8b26 100644
--- a/README.md
+++ b/README.md
@@ -1 +1,100 @@
-Readme \ No newline at end of file
+# Coding Exercise: Data Storage API
+
+Implement a small HTTP service to store objects organized by repository.
+Clients of this service should be able to GET, PUT, and DELETE objects.
+
+## Expectations
+
+We ask that you spend no more than 2 hours on this exercise. We value your time and don't want to set unreasonable expectations on how long you should work on this exercise.
+
+We ask you complete this exercise so you have an opportunity to build a service in your own time rather than an in-person interview, coding on a whiteboard.
+
+## General Requirements
+
+* The service should de-duplicate data objects by repository.
+* The service should listen on port `8282`.
+* The included tests should pass without modification.
+* The service must implement the API as described below.
+* The data can be persisted in memory, on disk, or wherever you like.
+* Do not include any extra dependencies.
+
+## Suggestions
+
+* Your code will be read by humans, so organize it sensibly.
+* Use this repository to store your work. Committing just the final solution is *ok* but we'd love to see your incremental progress. We suggest taking a look at [GitHub flow](https://guides.github.com/introduction/flow/) to structure your commits.
+* [Submit a pull request](https://help.github.com/articles/creating-a-pull-request/) once you are happy with your work.
+
+## API
+
+### Upload an Object
+
+```
+PUT /data/{repository}
+```
+
+#### Response
+
+```
+Status: 201 Created
+{
+ "oid": "2845f5a412dbdfacf95193f296dd0f5b2a16920da5a7ffa4c5832f223b03de96",
+ "size": 1234
+}
+```
+
+### Download an Object
+
+```
+GET /data/{repository}/{objectID}
+```
+
+#### Response
+
+```
+Status: 200 OK
+{object data}
+```
+
+Objects that are not on the server will return a `404 Not Found`.
+
+### Delete an Object
+
+```
+DELETE /data/{repository}/{objectID}
+```
+
+#### Response
+
+```
+Status: 200 OK
+```
+
+## Getting started and Testing
+In server-rack.rb you'll find a naive first draft of the answer to the exercise written for you. Please improve this draft so that it passes the test written in test.rb. You might need to install rack:
+
+```
+gem install rack rack-test
+```
+
+You can test that this works by running:
+
+```
+ruby test.rb
+```
+
+Once you have a good version of `server-rack.rb` please submit that file in a pull request.
+
+Behind the scenes we add the following `.travis.yml` file to your code:
+
+```
+language: ruby
+rvm:
+ - 2.4.4
+before_script:
+ - cd ./ruby
+ - gem install rack rack-test
+script:
+ - ruby test.rb
+```
+
+So please don't move tests or add in dependencies.