protobuffer-json-comparison
Comparison betewwen Protocol Buffer and JSON
Dependencies
Compile proto files
Following the instructions here to install the Protocol Buffer compiler and the Go protocol buffers plugin
To build the .proto
files:
make compile-proto-files
Run
With docker
make run-as-docker
Without docker
Need redis runnning locally
Download dependencies:
make setup
Running:
make run
Endpoints
- /proto
- /json
- /protojson
GET
curl http://localhost:8888/<endpoint>
POST
curl -X POST http://localhost:8888/<endpoint>
Example
curl http://localhost:8888/proto
curl -X POST http://localhost:8888/proto
Benchmark Tests
make benchmark-test
Performance tests with WRK
POST method
make wrk-post endpoint=<endpoint>
GET method
make wrk-get endpoint=<endpoint>
Example
make wrk-post endpoint=proto
make wrk-get endpoint=proto