FreeOpcUa / python-opcua

LGPL Pure Python OPC-UA Client and Server
http://freeopcua.github.io/
GNU Lesser General Public License v3.0
1.36k stars 658 forks source link

Why no compression in the opc-ua binary transport protocol? #852

Open brubbel opened 5 years ago

brubbel commented 5 years ago

Does anyone have an idea why (streaming) compression is not part of the OPC-UA standard? At least I could not find any references. It could be for security reasons (cfr. BREACH) but I highly doubt this.

zerox1212 commented 5 years ago

Maybe because UA is supposed to be able to scale all the way down to tiny SoC hardware that wouldn't be able to do compression?

brubbel commented 5 years ago

Yes, that is a valid remark, but it could be made optional. For example, there could be ''CompressedTcpTransport'' flag in the discovery capabilities.

I did some testing with zstd streaming and large histories, and for small DataValues there is a compression ratio up to 5, which speeds up history transfers considerably due to the significant (fixed) overhead of the wrapper objects.

zerox1212 commented 5 years ago

I like the idea. I have never heard of zstd but it looks interesting and faster than what I'm familiar with from web technologies (gzip).

I suppose you would need to write in to OPC Foundation and wait 2 years for the next spec release lol.

I think it would be a bit more than flag in capabilities, because the server might be compressing for some clients and not compressing for others. Even more complexity.