0

What transports/pipes/interops are available that most or all languages support across OSs? Not necessarily, network, but interprocess. Or is interprocess communication OS specific? I mean, for instance, the COM interop is on windows. Is there an equivalent on Linux, for instance, that would work the same and a programming language could use interchangeably? I know most languages support network IO. Do we have to use that for interprocess communication or are there other options?

closed as too broad by Tulains Córdova, Bart van Ingen Schenau, Kilian Foth, user40980, gnat Aug 13 '14 at 16:22

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • "Your questions should be reasonably scoped..." (help center). meta.programmers.stackexchange.com/questions/6483/… – gnat Aug 13 '14 at 9:46
  • 1
    Although it's a broad topic, I don't think this question necessitates huge answers. – Doval Aug 13 '14 at 11:49
  • For a solution that works across most languages and operating systems, I guess nothing beats networking (using the loopback interface to avoid real network traffic). – user281377 Aug 13 '14 at 12:20
  • If I understand it correctly, COM Interop is not inter process communication because the COM component is loaded into the same process as the host .NET process. This makes COM Interop a form of foreign function interface (FFI). As to how functions in different languages can call each other, it is because one of them implemented the calling convention of the other language. A calling convention defines how a function call is implemented in a language in the assembly/bytecode level, it describes how to identify and locate the right function, how to push the arguments, and how to return value. – Lie Ryan Aug 13 '14 at 13:38
  • @LieRyan Correct regarding calling conventions when using .dll in-process servers, but COM also has .exe out-of-process servers, which relies on Windows RPC to marshal requests across process boundries. – Mike Aug 14 '14 at 3:43
3

Inter-process communication is always mediated by the operating system. Generic options for communication include (but are not limited to) files (you'll have to lock them to avoid race conditions), using standard in and standard out, or network sockets. Which one works best depends on your application's needs. Of course, you'll need a way to structure the data, since all 3 mechanisms operate at the byte level. JSON, YAML, and XML are all common formats for structuring and passing around data as strings.

Not the answer you're looking for? Browse other questions tagged or ask your own question.