You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gsoc@community.apache.org by "Priya Sharma (Jira)" <ji...@apache.org> on 2026/05/07 11:56:00 UTC

[jira] [Updated] (GSOC-321) Apache Fory Ruby Serialization

     [ https://issues.apache.org/jira/browse/GSOC-321?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Priya Sharma updated GSOC-321:
------------------------------
    Labels: fory gsoc2026 large mentor ruby  (was: fory gsoc2026 mentor ruby)

> Apache Fory Ruby Serialization
> ------------------------------
>
>                 Key: GSOC-321
>                 URL: https://issues.apache.org/jira/browse/GSOC-321
>             Project: Comdev GSOC
>          Issue Type: New Feature
>            Reporter: Chaokun Yang
>            Priority: Major
>              Labels: fory, gsoc2026, large, mentor, ruby
>
> *Description:*
> Apache Fory currently has no Ruby runtime, so Ruby services cannot participate in Fory xlang object exchange. This project implements Ruby xlang serialization with full wire compatibility to existing language runtimes, following the xlang specifications and issue #3379.
> *Primary references:*
> 1. docs/specification/xlang_serialization_spec.md
> 2. docs/specification/xlang_implementation_guide.md
> 3. https://github.com/apache/fory/issues/3379
> *Scope:*
> 1. Implement xlang binary format in Ruby runtime.
> 2. Support schema-consistent mode and compatible mode with meta share and TypeDef.
> 3. Implement registration model for numeric and named user types.
> 4. Implement deterministic struct serialization rules required by spec.
> 5. Implement reference tracking and reference flags behavior exactly per protocol.
> 6. Implement meta string encoding and dedup semantics needed by named types and TypeDef.
> 7. Provide cross-language interoperability with Java in both encode and decode directions.
> *Expected outcomes:*
> 1. Ruby runtime package under ruby/ with serializer and deserializer for xlang protocol.
> 2. Public API centered on Fory entry point with configuration and registration APIs.
> 3. Core runtime modules for buffer, type resolver, ref resolver, meta string, TypeDef context, and field skipper.
> 4. Serializer coverage for primitives, temporal types, list, set, map, arrays, structs, and unions.
> 5. Struct DSL and schema metadata model for deterministic field ordering and stable schema behavior.
> 6. Compatibility handling for unknown fields and unknown union alternatives via safe skip logic.
> 7. Documentation for Ruby API usage, registration, schema evolution behavior, and constraints.
> *Protocol requirements:*
> 1. Little-endian encoding for all multi-byte values.
> 2. Correct xlang header bitmap handling for null, xlang, and oob flags.
> 3. Exact reference flags and sequential reference ID assignment.
> 4. Correct type ID encoding and user type ID handling.
> 5. Correct namespace and type name metadata behavior for named types.
> 6. Deterministic struct field ordering exactly aligned with spec.
> 7. Meta string encoding and per-stream dedup behavior aligned with spec.
> *Implementation phases:*
> 1. Phase 0: Ruby project skeleton, CI bootstrap, minimal smoke serialization path.
> 2. Phase 1: Buffer, varint and zigzag utilities, header handling, reference resolver core.
> 3. Phase 2: Primitive and temporal type support.
> 4. Phase 3: Collections and arrays support.
> 5. Phase 4: Type registry and schema-consistent struct serialization.
> 6. Phase 5: Meta string encoding and dedup.
> 7. Phase 6: Compatible mode and shared TypeDef.
> 8. Phase 7: Union and extension type support.
> 9. Phase 8: Performance hardening and allocation reduction.
> *Testing and CI requirements:*
> 1. Add Ruby unit tests for protocol primitives, headers, references, and error handling.
> 2. Add golden vector tests for primitives, string encodings, list/set/map headers, TypeDef, and unions.
> 3. Add bidirectional interoperability tests:
>    - Ruby write to Java read.
>    - Java write to Ruby read.
> 4. Add compatibility tests for schema evolution in compatible mode, including add/remove/reorder and unknown field skipping.
> 5. Add tests for shared references, circular references, and ref tracking disabled behavior.
> 6. Add negative tests for invalid varint, unknown type ID, truncated payload, and malformed TypeDef.
> 7. Integrate Ruby lint and all Ruby xlang tests into CI so regressions fail CI automatically.
> *Non-goals for initial delivery:*
> 1. Ruby-native non-xlang serialization format.
> 2. Decimal support.
> 3. Advanced runtime code generation in first iteration.
> *Performance expectations:*
> 1. Keep hot serialization and deserialization paths allocation-conscious.
> 2. Add fast paths for homogeneous collections where safe.
> 3. Preserve protocol correctness while improving throughput and reducing allocations.
> *Skills:*
> Ruby, binary protocol implementation, serialization internals, cross-language compatibility testing, CI integration, performance optimization.
> *Difficulty:*
> Hard.
> *Project size:*
> Preferred 350 hours.
> *Potential mentors:*
> Chaokun Yang, Weipeng Wang.
> *Source links:*
> https://github.com/apache/fory/issues/3379
> https://github.com/apache/fory/blob/main/docs/specification/xlang_serialization_spec.md
> https://github.com/apache/fory/blob/main/docs/specification/xlang_implementation_guide.md
> https://github.com/apache/fory/tree/main/rust
> https://github.com/apache/fory/tree/main/java



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: gsoc-unsubscribe@community.apache.org
For additional commands, e-mail: gsoc-help@community.apache.org