You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-`--db-port`: Database port (default: auto-detected)
172
-
-`--db-user`: Database username
173
-
-`--db-password`: Database password
174
-
175
-
## Database Schema
176
-
177
-
The client uses Django ORM models to manage database schema across different backends. Two main tables are created:
178
-
179
-
### `tf_metadata`
180
-
Django model: `TfMetadata`
181
-
Stores Time Frame metadata received from ActiveMQ:
182
-
-`id`: Auto-incrementing primary key
183
-
-`file_id`: Unique identifier for the TF file (unique constraint)
184
-
-`run_number`: Run number associated with the TF
185
-
-`tf_number`: Time Frame number within the run
186
-
-`file_url`: URL/path to the TF file
187
-
-`file_size_bytes`: Size of the TF file in bytes
188
-
-`checksum`: File checksum for integrity verification
189
-
-`status`: Processing status of the TF
190
-
-`created_at`: Timestamp when TF was created
191
-
-`received_at`: Timestamp when message was received by client (auto-generated)
192
-
-`metadata_json`: Full JSON metadata from ActiveMQ message
193
-
194
-
**Indexes:**
195
-
-`run_number` - for efficient run-based queries
196
-
-`created_at` - for time-based queries
197
-
198
-
### `runs`
199
-
Django model: `Run`
200
-
Stores run-level information and statistics:
201
-
-`run_number`: Unique run identifier (primary key)
202
-
-`start_time`: When the run started
203
-
-`end_time`: When the run ended (if applicable)
204
-
-`total_tfs`: Total number of TFs received for this run (auto-calculated)
205
-
-`run_conditions`: Text field for run configuration/conditions
206
-
207
-
**Database Backend Compatibility:**
208
-
The Django ORM automatically handles SQL dialect differences between SQLite, PostgreSQL, and MySQL, ensuring consistent behavior across all supported database backends.
209
-
210
-
## Configuration
211
-
212
-
The client supports both command-line arguments and configuration files (future feature). ActiveMQ connection parameters can be customized for different deployment environments.
213
-
214
-
### Security Considerations
215
-
216
-
- Use SSL connections for production deployments
217
-
- Store credentials securely (avoid command-line passwords in production)
218
-
- Consider using certificate-based authentication for ActiveMQ
219
-
- Database files should have appropriate file permissions
220
-
- For PostgreSQL/MySQL: Use dedicated database users with minimal required privileges
221
-
- Consider using environment variables or configuration files for sensitive database credentials
222
-
223
-
## Future Enhancements
224
-
225
-
- Configuration file support for easier deployment
226
-
- Web interface for monitoring visualization using Django views
227
-
- Real-time dashboard with statistics and charts
228
-
- Integration with existing monitoring systems
229
-
- Export capabilities for monitoring data (CSV, JSON)
230
-
- Database migration support for schema evolution
231
-
- Connection pooling for improved database performance
0 commit comments