Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Principle:Ray project Ray Cross Language Task Submission

From Leeroopedia
Knowledge Sources
Domains Distributed_Computing, Cross_Language_Interop
Last Updated 2026-02-13 17:00 GMT

Overview

A task dispatch mechanism that routes function calls to workers of the appropriate programming language based on function descriptor metadata.

Description

Cross-Language Task Submission uses function descriptors (PyFunction, CppFunction) to route tasks to Python or C++ workers instead of Java workers. The runtime converts the descriptor to a FunctionDescriptor (PyFunctionDescriptor or CppFunctionDescriptor) that encodes the target language. The Raylet scheduler uses FunctionDescriptor.getLanguage() to dispatch the task to the correct language worker pool.

This reuses the same task submission pipeline as Java tasks but with different descriptor types and MessagePack-serialized arguments.

Usage

Pass a PyFunction or CppFunction descriptor to Ray.task() or Ray.actor() instead of a Java method reference. Arguments must be cross-language-compatible types.

Theoretical Basis

Cross-language dispatch extends the standard task submission pattern with language-based routing. The function descriptor carries the target language as metadata, and the scheduler routes to a worker process of the matching language.

Related Pages

Implemented By

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment