-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement observer with SQL query support and parquet export #744
base: main
Are you sure you want to change the base?
Conversation
0d08bfd
to
82c2371
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #744 +/- ##
==========================================
- Coverage 75.15% 69.34% -5.81%
==========================================
Files 70 74 +4
Lines 6939 7497 +558
==========================================
- Hits 5215 5199 -16
- Misses 1312 1884 +572
- Partials 412 414 +2
|
@@ -1,75 +0,0 @@ | |||
package msgdump |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rewrote the stuff here, because:
- there seem to be an issue with decoding parquet files previously generated. So far we have just been using the ndjson dump to query things.
- I wanted to have a SQL interface that: 1) can query the latest messages and 2) can query the rotated messages all in one convenient view.
- These changes are significant enough that it deserved its own package etc.
@@ -0,0 +1,22 @@ | |||
package main |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renamed the file due to typo in file name and moved common pubsub utility stuff from here to internal/psutil package.
@@ -0,0 +1,111 @@ | |||
package observer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This allows us to run the observer under F3 passive testing infra as a HTTP server and CURL it with SQL statements, e.g.:
$ curl -X POST -d 'select distinct sender from messages' https://where-it-is-gonna-run/query
82c2371
to
9219213
Compare
4bbc9af
to
4914105
Compare
Implement an F3 observer that: * listens to F3 gossipsub messages * collects them as long as they can be decoded as CBOR * offers a SQL interface to query them over a HTTP * rotates them into Parquet files * deletes any rotated files based on a configured maximum age Fix base image to distroless/cc because of duckdb libstdc++ dependencies.
d3bfd33
to
d9a5ac4
Compare
My only nit would be maybe support for BasicAuth, but I don't think it is immediately necessary as it can be reverse proxied onto it. |
Implement an F3 observer that: