Skip to content

getditto-shared/ditto_cot

Repository files navigation

Ditto CoT

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.

🚀 Quick Start

Installation

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" />

Basic Usage

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();

📁 Repository Structure

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)

✨ Key Features

  • 🔄 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

📚 Documentation

For detailed information, see our comprehensive documentation:

🏗️ Technical Deep Dives

🛠️ Development Guides

🔌 Integration Guides

📖 Reference

🎯 Language-Specific READMEs

🚀 Quick Start

# Build all libraries
make all

# Run all tests
make test

# See all available commands
make help

🤝 Contributing

Contributions are welcome! Please see our Contributing Guide for details.

📄 License

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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages