4 ms·
Is there no way to create a layer above the two runtimes which made it feel as though they are running on the same process? > having a way to share access to f
by dennisy 4y ago
Is there no way to create a layer above the two runtimes which made it feel as though they are running on the same process?
> having a way to share access to functions and data
This is spot on, what I would like to achieve - to share data across the two languages by throwing variables around and the same with ops/functions on that data.
Under the hood, they could be running 100% separately but the code base would feel as though they are not.
- PaulHoule 4y agoIn 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/distributed-data-structures 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 https://docs.hazelcast.com/hazelcast/latest/pipelines/python