add dev. doc for gRPC
@@ -58,6 +58,8 @@ Use [pprof](https://github.com/google/pprof) and the following command to genera
## API changes
+### REST
+
Qdrant uses the [openapi](https://spec.openapis.org/oas/latest.html) specification to document its API.
This means changes to the API must be followed by changes to the specification.
@@ -73,3 +75,18 @@ Here is a quick step-by-step guide:
7. expose file by starting an HTTP server, for instance `python -m http.server`, in `/docs/redoc`
8. validate specs by browsing redoc on `http://localhost:8000/?v=master`
9. validate `openapi-merged.yaml` using [swagger editor](https://editor.swagger.io/)
+
+### gRPC
+
+Qdrant uses [tonic](https://github.com/hyperium/tonic) to serve gRPC traffic.
+
+Our protocol buffers are defined in `src/tonic/proto/*.proto`
+
+1. define request and response types using protocol buffers (use [oneOf](https://developers.google.com/protocol-buffers/docs/proto3#oneof) for enums payloads)
+2. specify RPC methods inside the service definition using protocol buffers
+3. `cargo build --features grpc` will generate the struct definitions and a service trait
+4. implement the service trait in Rust
+5. start server `cargo run --bin qdrant --features grpc`
+6. run integration test `./tests/basic_grpc_test.sh`
+
+Here is a good [tonic tutorial](https://github.com/hyperium/tonic/blob/master/examples/routeguide-tutorial.md#defining-the-service) for reference.
\ No newline at end of file
