yaakov887 / go-ycsb

A Go port of Yahoo! Cloud Serving Benchmark (YCSB)
Apache License 2.0
1 stars 0 forks source link

HTTP DB Wrapper #1

Open acharapko opened 2 years ago

acharapko commented 2 years ago

Write HTTP DB wrapper for basic non-batched reads and updates. Need to implement DB interface and DBCreator interface from /pkg/ycsb/db.go

DB interface is responsible for basic key-value operations. We do not need to implement Scan operation, just Read, Update, and Insert

DBCreator is used to initialize the connection with DB. Since ours is a simple non-authenticated HTTP, this should be simple, you can just create an HTTP client object in the Create function.

The wrapper needs to interact with HTTP server with PUTs for Updates/Inserts and GETs from Reads on the following URL: http://domain/key

domain is configurable and should be passed inside the properties object that is passed to the db wrapper in Create function. For samples of db wrappers, see https://github.com/yaakov887/go-ycsb/tree/master/db

For this task you will need to write a simple key-value hashtable behind HTTP server, so we can test that HTTP wrapper. Golang has a built-in HTTP server and client capabilities. https://gobyexample.com/http-servers

To test HTTP Server, you can use postman https://www.postman.com

acharapko commented 2 years ago

can we move the httpserver code into the same package as the http client implementation of ycsb db interface? The only reason we need this server is to test the client implementation. Also, lets call it something different -- SampleHTTPKVStore or something like that