Comments (5)
Instead of (mis)using an integer type, I think we should add the alias using byte_buffer = std::vector<byte>
to Broker and then extend the data
variant so that it can hold a buffer.
from broker.
I am not sorry that this actually is a misuse in the cases that we are using. It just actually is a ton of uint8 data (which actually are 8 bit integers that are used in the code as such).
I am open to casting them to something else - but just being able to store uint8s would be nice as well. Unless there is a reason to not support this.
from broker.
actually are 8 bit integers that are used in the code as such
At first reading, I thought this was about serializing data into 8-bit integers and then storing the buffer inside a data
. Hence my suggestion to use a more appropriately typed buffer. 🙂
Reading your comment (and the original post again): Simply adding uint8_t
to the data
variant would make working with this type definitely more complicated. The original design idea was to have only one type per domain to make working with the variant straightforward. Since variants always have the size of the largest type, there's no performance benefit from including smaller integer types (adding more types may even slow down matching with apply
since it has to consider more cases).
It's also a breaking API change. So I think the question is whether saving bytes on the wire translates to a significant boost in performance that makes breaking the API (and making it more cumbersome to work with) worthwhile.
from broker.
Ok, I actually never looked into the implementation of this - and was not aware that this always has the size of the largest member type (so will always be 64 bits I guess).
In this case - you are right - adding this does not make any sense.
It still is a bit sad - since I guess this leaves us with the choice of transmitting 8 times as much data as necessary - or complicating the serialization/deserialization code.
from broker.
In this case - you are right - adding this does not make any sense.
Closing it, then. 🙂
from broker.
Related Issues (20)
- Introduce versioning for the Zeek-layer serialization format
- Generic mechanism to add metadata to Zeek events.
- Websocket API: holes in vectors not preseved HOT 3
- docs/websocket: ISO 8601 discrepancies HOT 1
- Broker metrics port setting overriding BROKER_METRICS_PORT env variable HOT 2
- High caf thread utilization with 512 workers and 96 loggers HOT 10
- caf::actor_control_block::enqueue segfault when running supervisor.config-bare-mode test
- Websocket API: messages truncated to 4KB HOT 13
- Allow WebSocket and native clients on the same socket HOT 5
- clang-tidy fails with version 15+ HOT 2
- Metrics scalability performance issue in 6.0 HOT 12
- Resurrect `broker-cluster-benchmark`
- New Broker WebSocket Python bindings
- Set TLS minimum proto version to 1.2 or greater. HOT 6
- Make broker::data_envelope::deserialize() for JSON format accessible HOT 1
- Missing compatibility list for Zeek HOT 2
- Broker include broken HOT 4
- Convert Broker to use prometheus-cpp registry from Zeek HOT 1
- Broker message provenance tracking HOT 2
- Allow tapping into Broker logs
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from broker.