In the JVM world you can already write web service request handlers
POST /some/where/{like_this}
that are discovered by the JAXB runtime no matter if you write them in Java, Scala, Groovy, Clojure, Jython, etc. It works very well because the JVM handles memory allocation and reuse systematically. It would be hard to do this in the C world because how C programs allocate memory is idiosyncratic to those programs. Despite that, Python's runtime (which is a C program that consumes libraries) works really well when glued to C and FORTRAN style code like scikit-learn.
DCOM, CORBA, and RMI were early attempts at what you are asking for. We really got vernacular JSON APIs, API gateways, message-oriented-middleware, enterprise service bus, API documentation tools, etc. Latency and reliability (the network flaking out) are big pains if you have a chatty communications protocol so it is just as important to batch transfers as it is to avoid unnecessary communications. Maybe you want to write map-reduce or something like SQL that consistently gets good-if-not-great performance.
If you have many servers running (more than 20 for sure) people will tell you that you need Kubernetes to manage your servers and no matter what you need a script that builds a working development system as quickly as possible.
You might really like Hazelcast
https://docs.hazelcast.com/hazelcast/latest/data-structures/...
which manages shared data structures seemingly transparently on moderate sized clusters, there is even an example of using it between Java and Python here
https://docs.hazelcast.com/hazelcast/latest/pipelines/python