Accept multiple input and output format #1584
stevefan1999-personal
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I would like to pre-cook some SQL statements into AST and want to receive Bincode/rkyv result from server.
That way, I can embed the queries into embedded systems by turning them into static structure rather than strings to save space (sometimes sending binary structures instead of string can save more memory) and more importantly it will be harder to reverse engineer. Besides, using a more efficient transfer format could end up making it capable of streaming in zero-copy format like rkyv which is pretty good for doing RPC between embedded firmware and server.
This could help bypassing the use MQTT to let sensors directly talk to data collection server with a powerful mechanism to define data.
I know it is more of an odd idea given that a SQL string should be similar to doing this kind of AST transfer in terms of Kolmogorov complexity. This is true if you have a small query. However, if you have a query over 100KB, I would bet using AST/binary protocol could pack more data compared to a SQL string. for example, you can use a tagged union lead by a byte to distinguish type and data, rather than typing
INT:12345
Beta Was this translation helpful? Give feedback.
All reactions