datasynth-server 0.1.1

gRPC and REST server for synthetic data generation
docs.rs failed to build datasynth-server-0.1.1
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.

datasynth-server

REST, gRPC, and WebSocket server for synthetic data generation.

Overview

datasynth-server provides server-based access to SyntheticData:

  • REST API: Configuration management and stream control
  • gRPC API: High-performance streaming generation
  • WebSocket: Real-time event streaming
  • Production Features: Authentication, rate limiting, timeouts

Starting the Server

cargo run -p datasynth-server -- --port 3000 --worker-threads 4

REST API

Configuration

# Get current configuration
curl http://localhost:3000/api/config

# Update configuration
curl -X POST http://localhost:3000/api/config \
  -H "Content-Type: application/json" \
  -d '{"industry": "manufacturing"}'

Stream Control

# Start generation
curl -X POST http://localhost:3000/api/stream/start

# Pause/Resume
curl -X POST http://localhost:3000/api/stream/pause
curl -X POST http://localhost:3000/api/stream/resume

# Stop
curl -X POST http://localhost:3000/api/stream/stop

# Trigger pattern
curl -X POST http://localhost:3000/api/stream/trigger/month_end

Health Check

curl http://localhost:3000/health

WebSocket Streaming

Connect to ws://localhost:3000/ws/events for real-time events.

Authentication

Set the X-API-Key header for authenticated requests:

curl -H "X-API-Key: your-api-key" http://localhost:3000/api/config

gRPC

Protocol buffer definitions in proto/synth.proto.

service SynthService {
  rpc StreamGenerate(GenerateRequest) returns (stream GenerateResponse);
  rpc GetConfig(Empty) returns (ConfigResponse);
  rpc SetConfig(ConfigRequest) returns (ConfigResponse);
}

Production Features

Feature Description
Rate Limiting Sliding window with per-client tracking
Request Timeout Configurable timeout layer
Memory Limits Enforced via memory guard
CORS Configurable cross-origin settings

License

Apache-2.0 - See LICENSE for details.