I am looking for an inter-process communication facility that can be used between languages and/or environments running on the same or different systems. For instance it sh
When talking about heterogeneous architecture, IMHO transport layer (as you marked "sockets" as answer) is as important, as protocol layer (data serialization etc).
What I've found that returns in time, is learning programming library that unifies serialization of data between different programming languages, operating systems, and architectures (big-endian/low-endian, 16/32/64 bits, etc).
My favourite choice is Google Protocol Buffers, with in-box support for C++, Python, java and Third-Party Add-ons with support for huge amount of programming/scripting languages (including Lua, Matlab, Ruby, Perl, R, Php, OCaml, Mercury, Erlang, Go, D, Lisp) and RPC implementations (like Zeroc ICE ). Out of list many other products support them like SWI-Prolog Google Protocol Buffers Library.
The alternative is Thrift with support for a variety of programming languages, as well.
For comparison, you might like to check: Thrift vs Protobuf vs JSON.