Re:Varlink – IPC to replace D-Bus gradually in systemd
by cryptonector on Monday September 30, 2024 @10:18AM
(#41697362)
If it's IPC, it's the same architecture (mostly; typically there's at most 3 local architectures). The receiver can always make right. If there's hidden remoting going on, the proxies can make things right.
Re:Varlink – IPC to replace D-Bus gradually in systemd
by RandomThoughts3 on Monday September 30, 2024 @11:55PM
(#41704497)
> The receiver can always make right.
Certainly but that’s hardly structs anymore. You are implicitly defining a binary format which is aligned on the sender memory layout then.
Re:Varlink – IPC to replace D-Bus gradually in systemd
by cryptonector on Tuesday October 01, 2024 @03:41PM
(#41713243)
It's "structs" when the sender and receiver are using the same architecture, and if they're using the same int/long/pointer sizes then the only work to do is swabbing and pointer validation / fixups. That's a lot less work than is needed to do just about any encoding like protocol buffers, but it's not far from flat buffers and capnp.
It's plenty clear from discussion context that OP is talking about C struct but yes, replace C with any languages which suit you. It will still be part of the language semantic and not an IPC specification.
The point is you can't generally use memory layout as an IPC protocol because you generally have no guarantee that it will be the same for all architectures.