Skip to main content

Service Architecture

FreeTAKServer implements a modular service architecture where each service runs independently and communicates through a central integration manager. All services extend the DigitalPyService base class from the DigitalPy framework.

Available Services

TCP CoT Service

The TCP CoT Service handles unencrypted Cursor on Target traffic over TCP connections. Implementation: FreeTAKServer/services/tcp_cot_service/
Main Class: TCPCoTServiceMain
  • Protocol: TCP/IP without encryption
  • Port: Default 8087
  • Format: XML-based CoT messages
  • Use Case: Development, testing, local networks
  • Multi-threaded: Concurrent client handling via thread pools
Located in FreeTAKServer/services/tcp_cot_service/controllers/:
  • TCPSocketController: Manages TCP socket creation and binding
  • ReceiveConnections: Accepts incoming client connections
  • ClientConnectionController: Handles new client setup
  • ClientReceptionHandler: Receives data from connected clients
  • SendDataController: Sends CoT messages to clients
  • ClientDisconnectionController: Handles client disconnection cleanup
  • SendComponentDataController: Sends data from component processing

SSL CoT Service

The SSL CoT Service provides encrypted CoT traffic using SSL/TLS certificates. Implementation: FreeTAKServer/services/ssl_cot_service/
Main Class: SSLCoTServiceControllerFeatures:
  • SSL/TLS encrypted connections
  • X.509 certificate authentication
  • Default port: 8089
  • Client certificate validation
FTS uses the AtakOfTheCerts utility for certificate generation:
Certificate Locations:
  • CA Certificate: certs/ca.pem
  • Server Certificate: certs/server.pem
  • Client Certificates: certs/clients/{username}.pem
  • Mutual TLS: Both server and client authentication
  • Certificate Validation: Verify client certificates against CA
  • Encrypted Transport: All CoT data encrypted in transit
  • Certificate Revocation: Support for certificate blacklisting

REST API Service

The REST API Service provides a web-based interface for CoT manipulation, system management, and integration. Implementation: FreeTAKServer/services/rest_api_service/
Main Class: RestAPIServiceMainFramework: Flask with SocketIO
Ports:
  • HTTP: Default 19023
  • WebSocket: Same port as HTTP
The REST API is organized into blueprints:Core Endpoints:
  • /ManagePresence - Position/presence management
  • /ManageEmergency - Emergency alerts
  • /ManageGeoObject - Geographic objects (markers, shapes)
  • /ManageRoute - Route planning
  • /ManageChat - Chat messages
  • /VideoStream - Video stream management
  • /Sensor - Sensor data
  • /ExCheck - Checklist management
System Endpoints:
  • /APIUser - User authentication
  • /ManageConnection - Connection management
  • /Health - Health checks
Real-time updates via Socket.IO:
Event Types:
  • cotEvent - New CoT message
  • presence - Position updates
  • chat - Chat messages
  • emergency - Emergency alerts
Methods:
  • Session-based: Flask-Login sessions
  • Token-based: API key authentication
  • Certificate-based: Client certificate validation

HTTP TAK API Service

Implements the TAK server HTTP API for compatibility with TAK clients. Implementation: FreeTAKServer/services/http_tak_api_service/
Main Class: HTTPTakAPIPurpose: Provides TAK-compatible HTTP endpoints for:
  • Mission package synchronization
  • Data package upload/download
  • Video stream metadata
  • CoT query API
Port: Default 8080
Marti API Compatibility:
  • GET /Marti/api/sync/metadata/{hash} - Get package metadata
  • GET /Marti/api/sync/content - Download package
  • PUT /Marti/api/sync/upload - Upload data package
  • GET /Marti/api/missions - List missions
  • GET /Marti/api/missions/{name} - Get mission details
  • POST /Marti/api/missions/{name}/changes - Submit mission changes

HTTPS TAK API Service

Secure version of the HTTP TAK API Service with SSL/TLS encryption. Implementation: FreeTAKServer/services/https_tak_api_service/
Main Class: HTTPSTakAPIFeatures:
  • All HTTP TAK API endpoints over HTTPS
  • Certificate-based client authentication
  • Encrypted data package transfers
Port: Default 8443

Service Communication

Integration Manager Pattern

Services communicate through a central integration manager using ZeroMQ:

Message Flow

Service Lifecycle

Initialization

Shutdown

Service Configuration

Configuration File

Services are configured via config.ini:

Environment Variables

Override configuration with environment variables:

Performance Considerations

Thread Pool Configuration

Connection Limits

Monitor concurrent connections and adjust system limits:

Database Connection Pooling

Monitoring and Health Checks

Health Check Endpoint

Telemetry

Troubleshooting

Common Issues

  • Reduce thread pool sizes
  • Enable database connection pooling
  • Implement message rate limiting
  • Monitor for memory leaks in custom components

Architecture

Understand FTS architecture

Components

Explore the component system

Configuration

Configure FTS services

API Reference

REST API documentation