what binary standards are there for sharing code in linux (similar to COM)? -
so have finished reading article here:
https://msdn.microsoft.com/en-us/library/ms809983.aspx
about why have com , how lets share code without worrying name mangling of compilers or unicode/ascii issues or memory management in language independent manner.
i have elsewhere read com isn't supposed linux because com uses os moderator acquisition of these standardized objects. shouldn't there similar in linux? , if so, it?
on linux can run program accepts input on standard input, , connect it, via pipe, other program generates results on standard output.
the simple, file , pipe-based input/output in posix predates ms-windows decades. and, long both sides of pipe agree on format of data being interchanged, doesn't matter compiler used create each program (although, on linux, there's pretty 1 de-factor compiler, it's moot point).
and using socket-pair, pipe becomes bi-directional, both processes can swap data each other.
this is, generally, how processes interoperate on linux:
1) pipe, or network socket, connects 2 processes together
2) agreed, established standard format of data exchanged between 2 processes.
it important understand there no practical standard processes use same exact format exchanging messages. closest come such standard, suppose, remote procedure call, or rpc, standard that's used in low-level protocols, nfs, but, mostly, individual applications define , use particular format that's tailored them.
for example, x window system protocol: http://www.x.org/releases/x11r7.7/doc/xproto/x11protocol.html -- format definition of protocol communicating between x server , x client. applications written use protocol (they'll typically use intermediate library or toolkit, actually) can establish connection , use x server talks same protocol, on network connection or local pipe.
Comments
Post a Comment