Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/panda-official/driftprotocol
Protobuf Libraries to encode message in Drift infrastructure
https://github.com/panda-official/driftprotocol
ai drift edge protobuf
Last synced: about 2 months ago
JSON representation
Protobuf Libraries to encode message in Drift infrastructure
- Host: GitHub
- URL: https://github.com/panda-official/driftprotocol
- Owner: panda-official
- License: mpl-2.0
- Created: 2022-06-24T10:52:43.000Z (over 2 years ago)
- Default Branch: develop
- Last Pushed: 2023-11-24T15:05:49.000Z (about 1 year ago)
- Last Synced: 2024-04-25T10:02:38.193Z (9 months ago)
- Topics: ai, drift, edge, protobuf
- Language: Python
- Homepage: https://driftprotocol.readthedocs.io
- Size: 244 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Drift Protocol
The Drift Protocol is a set of libraries that
use [Protocol Buffers](https://developers.google.com/protocol-buffers/docs/overview) (Protobuf) to encode messages in
the [PANDA|Drift infrastructure](https://driftpythonclient.readthedocs.io/en/latest/docs/panda_drift/). The libraries
provide pre-generated Protobuf messages so that users do not have to install the protobuf compiler and generate them
themselves.## Implementations
* [For C++](cpp/README.md)
* [For Python](python/README.md)## Example
The Drift Protocol can be used to create microservice applications. An example of such an application is shown in the
accompanying diagram:![Drift Protocol Example](docs/img/example.drawio.svg)
The Trigger service publishes a trigger as a [Drift Package](docs/api/common.md#driftpackage) with ID = 1630062869443 and
a [Trigger Interval Message](docs/api/triggering.md#intervaltriggermessage), which contains a time interval [t0, t1], to
the `trigger` MQTT topic.The Timeswipe service subscribes to the `trigger` topic and receives a trigger package. Then it retrieves data of 48000
samples per second from a vibration sensor for the interval [t0, t1] by using a Time Swipe device, compresses, serializes
the data and sends it to MQTT topic `drift/sensor` as a [Drift Package](docs/api/common.md#driftpackage) with
a [Data Payload](docs/api/common.md#datapayload) inside. It contains a
serialized [Wavelet Buffer](https://github.com/panda-official/WaveletBuffer) in the `data` field. The ID of the packages
is the same ID=1630062869443, so we see that the trigger and the data are connected.The [Drift Core](https://driftpythonclient.readthedocs.io/en/latest/docs/panda_drift/) services subscribe to all MQTT
topics which have `drift/` prefix, parse [Drift Packages](docs/api/common.md#driftpackage) and stores them in the metric
and blob storages. After that, you can use [Drift Python Client](https://github.com/panda-official/DriftPythonClient) to
request data from the storage.## Why Protobuf?
We use Protobuf to encode messages in Drift Protocol because it is a very efficient and flexible serialization format,
especially for binary data. It is also very easy to use and has a lot of implementations for different programming languages.## Related Projects
* [WaveletBuffer](https://github.com/panda-official/WaveletBuffer) - A universal C++ compression library based on
wavelet transformation
* [Drift Python Client](https://github.com/panda-official/DriftPythonClient) - Python Client to access data of
PANDA|Drift