Totally agree on that, but couldn’t we make the sender somehow give away his rights on the shared memory object before we consider the message sent? In this case service A creates a message M (structured object in shared memory), gives away it’s rights on M to the intermediate proxy P (a root service) and asks it to forward the message to service B. The proxy verifies M is accessible only to P and passes over the rights to the receiver B.
In this case we create the message only once and only alter the access permissions somehow avoiding lots of buffer copies, and even more when a message is forwarded multiple times.
Would such an architecture be possible to implement, and if yes, then how?
as far as I know memory mapped files are basically contents of files that are stored on the disk mapped to RAM so you can work with file contents more efficiently. I didn’t really understand how you’d apply this to the current problem, can you explain your suggestion in a little more detail please?