Back to home page

EIC code displayed by LXR

 
 

    


Warning, /swf-monitor/README.md is written in an unsupported language. File is not indexed.

0001 # swf-monitor
0002 
0003 **Monitoring and information service for the ePIC streaming workflow testbed.**
0004 
0005 ## System Overview
0006 
0007 The application is built on Django infrastructure and comprises three main components, real-time messaging, and PostgreSQL backend.
0008 
0009 ### Core Components
0010 
0011 1. **Monitor App (`monitor_app`)**: Primary user-facing component
0012    * **Browser UI**: Server-side rendered dashboard for viewing agent statuses with Django session authentication
0013    * **REST API**: Programmatic interface with token-based authentication and OpenAPI schema
0014    * **MCP Integration**: Model Context Protocol endpoint for LLM interaction
0015 
0016 2. **PCS (`pcs`)**: Physics Configuration System for production task configuration
0017    * **Tag System**: Immutable, versioned parameter sets for physics, event generation, simulation, and reconstruction
0018    * **Dataset Composition**: Standardized naming from locked tags with automatic block management for Rucio
0019    * **REST API + Web UI**: Full CRUD with draft/locked lifecycle enforcement
0020 
0021 3. **ActiveMQ Integration**: Built-in message queue connectivity
0022    * **Automatic Listening**: Connects to ActiveMQ automatically when Django starts
0023    * **SSE REST Forwarding**: Server-Sent Events streaming of ActiveMQ messages via HTTPS
0024 
0025 4. **PostgreSQL Database**: Data store for all persistent system information including agents, logs, runs, STF files, FastMon files, workflows, configuration tags, and application state
0026 
0027 ## Key Features
0028 
0029 - ๐Ÿ–ฅ๏ธ **Real-time Dashboard** - Agent status monitoring with live updates
0030 - ๐Ÿ”— **REST API** - Complete CRUD operations with OpenAPI documentation  
0031 - ๐Ÿค– **MCP Integration** - Model Context Protocol for natural language interaction via LLM
0032 - ๐Ÿ“ก **SSE Message Streaming** - Real-time ActiveMQ message forwarding via HTTPS with Django Channels and Redis
0033 - ๐Ÿ“Š **Centralized Logging** - Agent log collection with `swf-common-lib` integration
0034 - ๐Ÿ” **Authentication** - Token-based API access and web session management
0035 - ๐Ÿ“ˆ **ActiveMQ Integration** - Automatic message queue connectivity and monitoring
0036 - ๐Ÿงช **Comprehensive Testing** - 88+ tests across API, UI, and integration scenarios
0037 
0038 ## Documentation
0039 
0040 ๐Ÿ“š **Complete technical documentation in [`docs/`](docs/) directory:**
0041 
0042 | Guide | Description | Use Case |
0043 |-------|-------------|----------|
0044 | **[Setup Guide](docs/SETUP_GUIDE.md)** | Installation, configuration, and development setup | Getting started |
0045 | **[Production Deployment](docs/PRODUCTION_DEPLOYMENT.md)** | Complete Apache production deployment guide | Production operations |
0046 | **[API Reference](docs/API_REFERENCE.md)** | REST API, WebSocket, database schema, authentication | Integration |
0047 | **[MCP Integration](docs/MCP.md)** | Model Context Protocol for LLM interaction | Natural language queries |
0048 | **[PCS](docs/PCS.md)** | Physics Configuration System โ€” tags, datasets, production configuration | Production task configuration |
0049 | **[Test System](docs/TEST_SYSTEM.md)** | Testing approach, structure, and best practices | Quality assurance |
0050 
0051 ### Quick Links
0052 - **Production Monitor**: [https://pandaserver02.sdcc.bnl.gov/swf-monitor/](https://pandaserver02.sdcc.bnl.gov/swf-monitor/)
0053 - **Interactive API Docs**: [Swagger UI](https://pandasserver02.sdcc.bnl.gov/swf-monitor/api/schema/swagger-ui/) | [ReDoc](https://pandasserver02.sdcc.bnl.gov/swf-monitor/api/schema/redoc/)
0054 - **Database Schema**: [testbed-schema.dbml](testbed-schema.dbml) (auto-generated, view at [dbdiagram.io](https://dbdiagram.io))
0055 - **Parent Project**: [swf-testbed documentation](../swf-testbed/README.md)
0056 
0057 ## Quick Examples
0058 
0059 ### Basic Setup
0060 ```bash
0061 # See docs/SETUP_GUIDE.md for complete installation
0062 python manage.py runserver          # Start web interface (includes ActiveMQ integration)
0063 ```
0064 
0065 ## Testing
0066 
0067 See [Test System documentation](docs/TEST_SYSTEM.md) for comprehensive testing guide.
0068 
0069 ## Development
0070 
0071 ### Requirements
0072 - **Python 3.9+** 
0073 - **PostgreSQL** for data persistence
0074 - **ActiveMQ** for agent messaging (optional)
0075 
0076 ### Architecture Notes
0077 - **Django** web framework with **Channels** for WebSocket support
0078 - **Model Context Protocol (MCP)** for LLM-based system interaction
0079 - **Token-based REST API** with comprehensive OpenAPI documentation
0080 
0081 See [Setup Guide](docs/SETUP_GUIDE.md) for detailed development environment configuration.
0082 
0083 ---
0084 
0085 *For complete technical documentation and implementation details, see the [`docs/`](docs/) directory.*