Вопрос

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?

Это было полезно?

Решение

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.

Лицензировано под: CC-BY-SA с атрибуция
scroll top