Purpose
The connector service allows:- Remote data access: Main ModMS server can query data stored on archive servers
- Distributed queries: Queries are automatically routed to the appropriate server based on
registry.json - Transparent access: Clients query the main server, which handles routing to archive servers
How It Works
- Main Server: Runs both
modms(API) andconnectorservices - Archive Servers: Run only
connectorservices - Registry: The main server’s
registry.jsondefines which models are on which servers - Query Routing: When a query comes in, the main server checks the registry and routes the query to the appropriate connector
Configuration
Environment Variables
CONNECTOR_PORT: Port the connector listens on (default: 8082)MODELS_DIR: Directory containing NetCDF model data (mounted as/nc)TOPOGRAPHY_DIR: Directory for topography dataWEB_INTERFACE_USERNAME: Username for web interfaceWEB_INTERFACE_PASSWORD: Password for web interfaceSMTP_FROM: Email sender for notificationsSMTP_TO: Email recipient for notifications
Volumes
/data/archives:/nc:ro: NetCDF data (read-only)/modms/nc:/topography:ro: Topography data (read-only, main server only)
Ports
8082:8082: Connector service port
Registry Integration
The connector works with the registry system:- Main server reads
registry.jsonto determine data locations - For queries to archived data, the main server connects to the archive server’s connector (port 8082)
- The connector on the archive server serves the requested data
- Results are returned to the main server and then to the client
Each MAMS instance (main and archive servers) must have a connector service deployed. This enables the distributed query system.
Query Flow
Deployment Requirements
Main Server
- Deploys both
modmsandconnectorservices - Connector listens on port 8082
- Connector can query local data and route to archive servers
Archive Servers
- Deploy only
connectorservice - Connector listens on port 8082
- Connector serves data from local
/data/archivesdirectory - No full ModMS API service needed
Troubleshooting
Check Connector Status
Verify Connectivity
From main server, test connection to archive server connector:Common Issues
- Connector not responding: Check if service is running and port 8082 is accessible
- Connection refused: Verify firewall rules allow port 8082
- Data not found: Check registry.json to ensure correct server mapping
- Authentication errors: Verify credentials match between main and archive servers
Related Documentation
- MAMS Overview - MAMS system overview
- MAMS Deployment - Deployment configuration
- MAMS Registry - Registry system documentation

