DBSCAN Serving aims to be a gRPC and REST implementation of the DBSCAN algorithm inspired by TensorFlow Serving.
The idea came from the following posts
The DBSCAN implementation was based upon the code available here:
- Implementing DBSCAN from distance matrix in Rust
- Implementing dbscan from a distance matrix in Rust (source code)
This implementation was validated using Python 3.8.
First, install the dependencies:
pip install -U -r requirements.txt
To run the server, you need to run:
python server.py
To run the client, you need to run:
python client.py
If you want to create a client using a language other than Rust, you can use the protobuffer for that.
There is also an implementation in Rust.
The results reported below are obtained using a non-scientific method and if performance measures are critical to you you should run your own tests in your own platform. The results were obtained using an Intel 10875H processor running Windows and Ubuntu over WSL. The requests have 310 samples per request, with 100 features per sample.
Using a Rust client in release mode the performance is as follows:
- gRPC: 13.5 ms per request
- REST: 87.7 ms per request
Using the Python client from this repository, the performance is as follows:
- gRPC: 15.6 ms per request
- REST: 133.8 ms per request
- Implement gRPC health service
- Implement the REST server
- Improve performance of the DBSCAN algorithm
- Implement other distance metrics (inspired by this)