Jump to content

Connect Leeroopedia MCP: Equip your AI agents to search best practices, build plans, verify code, diagnose failures, and look up hyperparameter defaults.

Principle:Ray project Ray Cross Language Serialization

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

Overview

A binary serialization protocol that encodes Java objects into a language-neutral format readable by Python and C++ workers.

Description

Cross-Language Serialization converts Java objects into MessagePack binary format for cross-language transport. Supported cross-language types (Boolean, Byte, Short, Integer, Long, BigInteger, Float, Double, String, byte[], arrays, null) are encoded as standard MessagePack values. Unsupported types fall back to FST serialization (Java-specific, tagged with extension type 101), which can only be read by Java workers.

The encoder produces a flag indicating whether the payload is cross-language compatible, enabling the runtime to validate cross-language task arguments.

Usage

Serialization is handled automatically by the Ray runtime during cross-language task submission. You do not need to call the serializer directly — just pass supported types as task arguments.

Theoretical Basis

MessagePack implements a schema-less binary serialization format. It is more compact than JSON and supports a type system that maps naturally to primitives in most programming languages, making it ideal for cross-language data exchange.

Related Pages

Implemented By

Page Connections

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