Principle:Ray project Ray Multi Language Cluster Initialization
| Knowledge Sources | |
|---|---|
| Domains | Distributed_Computing, Cross_Language_Interop |
| Last Updated | 2026-02-13 17:00 GMT |
Overview
A runtime initialization mechanism that configures the distributed cluster to discover and execute code across multiple programming languages.
Description
Multi-Language Cluster Initialization extends standard Ray initialization with a code search path — a list of filesystem directories where the Raylet workers search for Python modules (.py) and C++ shared libraries (.so). This enables Java processes to submit tasks that execute in Python or C++ workers on the same cluster.
Without configuring the code search path, cross-language calls will fail because the foreign-language workers cannot find the target functions.
Usage
Configure the ray.job.code-search-path system property before calling Ray.init() when cross-language invocation is needed. The paths must be accessible on all cluster nodes.
Theoretical Basis
Multi-language initialization implements a shared classpath pattern across language runtimes. Each worker process (Java, Python, C++) searches the same set of filesystem paths for code, enabling cross-language function discovery and dispatch.