High-performance, multi-language libraries for translating between Cursor-on-Target (CoT) XML events and Ditto-compatible CRDT documents. Built with advanced CRDT optimization for efficient P2P network synchronization.
Rust:
[dependencies]
ditto_cot = { git = "https://github.com/getditto-shared/ditto_cot" }
Java:
<dependency>
<groupId>com.ditto</groupId>
<artifactId>ditto-cot</artifactId>
<version>1.0.0</version>
</dependency>
C# (planned):
<PackageReference Include="Ditto.Cot" Version="1.0.0" />
Rust:
use ditto_cot::{cot_events::CotEvent, ditto::cot_to_document};
let event = CotEvent::builder()
.uid("USER-123")
.event_type("a-f-G-U-C")
.location(34.12345, -118.12345, 150.0)
.callsign("ALPHA-1")
.build();
let doc = cot_to_document(&event, "peer-123");
Java:
CotEvent event = CotEvent.builder()
.uid("USER-123")
.type("a-f-G-U-C")
.point(34.12345, -118.12345, 150.0)
.callsign("ALPHA-1")
.build();
DittoDocument doc = event.toDittoDocument();
ditto_cot/
├── docs/ # 📚 Documentation
│ ├── technical/ # Architecture, CRDT, Performance
│ ├── development/ # Getting Started, Building, Testing
│ ├── integration/ # SDK integration guides
│ └── reference/ # API reference, schemas
├── schema/ # Shared schema definitions
├── rust/ # Rust implementation
├── java/ # Java implementation
└── csharp/ # C# implementation (planned)
- 🔄 100% Data Preservation: All duplicate CoT XML elements maintained vs 46% in legacy systems
- ⚡ CRDT-Optimized: 70% bandwidth savings through differential field sync
- 🌐 Cross-Language: Identical behavior across Java, Rust, and C#
- 🛡️ Type-Safe: Schema-driven development with strong typing
- 📱 SDK Integration: Observer document conversion with r-field reconstruction
- 🔧 Builder Patterns: Ergonomic APIs for creating CoT events
- 🧪 Comprehensive Testing: E2E tests including multi-peer P2P scenarios
For detailed information, see our comprehensive documentation:
- Architecture - System design and components
- CRDT Optimization - Advanced P2P synchronization
- Performance - Benchmarks and optimization
- Getting Started - Quick setup for all languages
- Building - Build procedures and requirements
- Testing - Testing strategies and E2E scenarios
- Ditto SDK Integration - Observer patterns and DQL
- Rust Examples - Rust-specific patterns
- Java Examples - Java-specific patterns
- Migration Guide - Version upgrades and legacy system migration
- API Reference - Complete API documentation
- Schema Reference - Document schemas and validation
- Troubleshooting - Common issues and solutions
- Rust Implementation - Rust-specific APIs and patterns
- Java Implementation - Java-specific APIs and patterns
# Build all libraries
make all
# Run all tests
make test
# See all available commands
make help
Contributions are welcome! Please see our Contributing Guide for details.
This project is licensed under the MIT License - see the LICENSE file for details.
Next Steps: Check out our Getting Started Guide for detailed setup instructions, or browse the Architecture to understand the system design.