Rush Sync Server
NOTE: Version
0.2.2on crates.io has a critical bug in language file loading (*.jsonnot embedded correctly). Please use version0.3.3+for a stable release!
Rush Sync Server is a professional web server orchestration platform written in Rust. The project features a robust terminal UI with internationalization, theming, command system, and NEW in v0.3.3: Optimized server management with comprehensive logging and 35% code reduction.
Project Vision
Rush Sync Server development phases:
- Phase 0 โ : Terminal UI foundation with command system
- Phase 1 โ OPTIMIZED: Dynamic Actix-Web server management with professional logging
- Phase 2: Dev/Prod modes with hot-reloading
- Phase 3: Redis integration & secure communication
- Phase 4: Centralized logging & automation
What's New in v0.3.3
๐ Optimized Server Management System
The latest version brings 35% code reduction and professional-grade improvements:
- ๐ Advanced Server Logging - Individual log files per server with JSON structured logging
- ๐ Intelligent Log Rotation - 100MB per log file with 9 archive generations
- โก Code Optimization - 35% reduction from 1,389 to 899 lines while maintaining all functionality
- ๐ฏ Enhanced Performance - Streamlined middleware and simplified architecture
- ๐ก๏ธ Zero Clippy Warnings - Clean, maintainable, and robust codebase
- ๐ Scalable Architecture - Support for up to 10 concurrent servers
๐ Enhanced Logging Features
- Individual Server Logs - Each server gets its own dedicated log file
- JSON Structured Logging - Machine-readable logs with comprehensive request data
- Automatic Compression - GZIP compression for archived logs to save disk space
- Smart Rotation Policy - 100MB files, 9 archive generations (900MB+ total capacity per server)
- Security Monitoring - Automatic detection of suspicious requests with detailed logging
- Performance Metrics - Response times, request counts, and traffic analysis
๐ง Server Management Improvements
- Dynamic Version Detection - Server version automatically sourced from Cargo.toml
- Enhanced Error Handling - Robust error recovery with detailed logging
- Optimized Middleware - Streamlined request processing with full header extraction
- Professional Web Interface - Live log viewer and comprehensive server statistics
- Concurrent Server Limit - Maximum 10 servers for optimal resource management
๐๏ธ Architecture Optimizations (35% Code Reduction)
- Simplified Structures - Removed redundant abstractions and over-engineering
- Default Trait Integration - Replaced custom constructors with standard Rust patterns
- Streamlined Error Handling - Eliminated verbose error chains while maintaining safety
- Optimized Imports - Reduced dependencies and simplified module structure
- Clean Middleware Pipeline - Removed unnecessary trait bounds and complexity
๐ Installation & Usage
๐ฆ As Binary - Version 0.3.3+
# Install from crates.io
# Run the application (terminal UI + optimized server management)
๐ As Library - Version 0.3.3+
Add to your Cargo.toml:
[]
= "0.3.3"
= { = "1.36", = ["full"] }
Quick Start Examples:
use *;
async
use *;
async
โก Enhanced Server Features (v0.3.3)
๐ Professional Server Logging
Each server creates individual log files with comprehensive tracking:
# Log file locations
Log Entry Structure:
Event Types:
Request- HTTP requests with full metadataServerStart- Server startup eventsServerStop- Server shutdown eventsSecurityAlert- Suspicious activity detectionServerError- Error conditions and recovery
๐ Intelligent Log Rotation
- File Size Limit: 100MB per active log file
- Archive Generations: 9 compressed backups (myserver.1.log.gz to myserver.9.log.gz)
- Total Capacity: 900MB+ of historical logs per server
- Automatic Compression: GZIP compression for space efficiency
- Smart Cleanup: Oldest archives automatically removed
๐ก๏ธ Security Monitoring
Automatic detection and logging of:
- Path traversal attempts (
../sequences) - Script injection attempts (
<scripttags) - SQL injection patterns (
sqlkeywords) - Oversized requests (>1000 characters)
- Multiple failed authentication attempts
๐ Enhanced Web Interface
Each server provides comprehensive endpoints:
๐ป Server Management Commands
๐ Core Server Commands
| Command | Description | Examples |
|---|---|---|
create |
Create server with logging | create, create myapi, create 8090 |
list |
Show all servers with logs | list |
start |
Start server with log rotation | start 1, start myapi, start abc123 |
stop |
Stop server with log cleanup | stop 1, stop myapi, stop abc123 |
cleanup |
Remove servers and their logs | cleanup, cleanup failed, cleanup all |
๐ Advanced Server Examples
Server Creation with Logging
# Create server with auto-generated name
# Result: Server created: 'rush-sync-server-001' (ID: abc12345) on Port 8080
# Log file: .rss/servers/rush-sync-server-001-[8080].log
# Create custom server
# Result: Custom Server created: 'myapi' (ID: def67890) on Port 9000
# Log file: .rss/servers/myapi-[9000].log
Enhanced Server List
# Result:
# Server List (Max: 10 concurrent):
# 1. myapi - def67890 (Port: 9000) [Running]
# Log: .rss/servers/myapi-[9000].log (45.2MB, 3 archives)
# Requests: 1,247 | Errors: 3 | Uptime: 2h 15m
#
# 2. testserver - ghi13579 (Port: 8082) [Stopped]
# Log: .rss/servers/testserver-[8082].log (12.8MB, 1 archive)
# Last active: 30 minutes ago
Server Statistics
# Access detailed statistics
{
}
๐ System Commands
| Command | Description | Examples |
|---|---|---|
version / ver |
Show version (from Cargo.toml) | version |
lang / language |
Switch language (EN/DE) | lang de, lang en |
theme |
Change themes live | theme dark, theme light |
clear / cls |
Clear messages | clear |
exit / q |
Exit with confirmation | exit |
restart |
Internal restart | restart, restart --force |
history -c |
Clear input history | history -c |
log-level |
Change log level | log-level debug |
โ๏ธ Enhanced Configuration
๐ File Locations
- Config:
.rss/rush.toml(auto-created with optimized defaults) - History:
.rss/rush.history(persistent command history) - Main Logs:
.rss/rush.logs(application logs) - Server Logs:
.rss/servers/(individual server logs and archives) - Server Registry:
.rss/servers.list(persistent server information)
๐ Configuration File (v0.3.3)
[]
= 1000 # Message buffer size
= 5 # Typewriter effect speed (0 = disabled)
= 100 # Maximum input length
= 30 # Command history entries
= 16 # UI refresh rate (16ms = 62.5 FPS)
= "info" # Log level (error/warn/info/debug/trace)
= "dark" # Active theme name
[]
= "en" # Language (en/de)
# Enhanced Server Management Configuration
[]
= 8080 # Starting port for auto-allocation
= 8180 # Maximum port for auto-allocation
= 10 # Maximum simultaneous servers (OPTIMIZED)
= 5 # Graceful shutdown timeout (seconds)
# New: Logging Configuration
[]
= 100 # Log rotation size (100MB per file)
= 9 # Archive generations (9 backups)
= true # GZIP compression for archives
= true # Enable request logging
= true # Enable security monitoring
= true # Enable performance metrics
# Built-in themes with advanced cursor configuration
[]
= "Black"
= "White"
= "PIPE"
= "White"
= "White"
= "Black"
= "/// "
= "PIPE"
= "Black"
[]
= "White"
= "Black"
= "PIPE"
= "Black"
= "Black"
= "White"
= "/// "
= "PIPE"
= "White"
๐ง Architecture Improvements (v0.3.3)
๐ Code Optimization Results
35% Code Reduction Achieved:
| Module | Original | Optimized | Reduction |
|---|---|---|---|
| Web Handlers | 320 | 180 | -43.8% |
| Logging System | 380 | 250 | -34.2% |
| Middleware | 150 | 80 | -46.7% |
| Persistence | 180 | 120 | -33.3% |
| Total | 1389 | 899 | -35.3% |
Optimization Techniques:
- Default Trait Integration - Replaced custom constructors
- Streamlined Error Chains - Eliminated verbose handling
- Simplified Middleware - Removed unnecessary abstractions
- Direct Path Creation - Chainable operations instead of nested logic
- Compact JSON Serialization - Efficient data structures
๐ก๏ธ Quality Assurance
Zero Warning Guarantee:
Memory Safety Verification:
- No Unsafe Code - Pure safe Rust throughout
- Proper Resource Cleanup - RAII patterns for all resources
- Thread Safety - Arc/RwLock for shared state
- Panic Safety - Comprehensive error handling with Recovery
๐งช Testing & Performance
๐ Performance Benchmarks (v0.3.3)
# Server creation performance
)
# Request processing performance
# Log rotation performance
)
๐ Comprehensive Testing
# Code quality tests
# Load testing
๐ Version History
v0.3.3 (Current) - Optimized Architecture & Professional Logging
๐ Major Optimizations:
- 35% Code Reduction - From 1,389 to 899 lines while maintaining all functionality
- Professional Server Logging - Individual JSON logs per server with rotation
- Enhanced Log Management - 100MB files, 9 archive generations, GZIP compression
- Performance Improvements - Streamlined middleware and simplified architecture
- Zero Clippy Warnings - Clean, maintainable codebase with robust error handling
๐ New Logging Features:
- Structured JSON Logging - Machine-readable logs with comprehensive request data
- Automatic Log Rotation - Smart file management with configurable size limits
- Security Monitoring - Automatic detection and logging of suspicious activities
- Performance Metrics - Response time tracking and traffic analysis
- Live Log Viewer - Web-based log viewing with auto-refresh
๐ง Architecture Improvements:
- Dynamic Version Detection - Version automatically sourced from Cargo.toml
- Simplified Error Handling - Reduced verbose chains while maintaining safety
- Optimized Middleware Pipeline - Streamlined request processing
- Enhanced Web Interface - Professional status pages with comprehensive information
- Concurrent Server Management - Maximum 10 servers for optimal resource usage
v0.3.2 - Complete Server Management
- Complete Actix-Web Integration - Professional web server creation and management
- Dynamic Server Lifecycle - Create, start, stop, and cleanup web servers
- Smart Port Management - Automatic port allocation with conflict avoidance
- Professional Web Interface - HTML status pages with comprehensive server information
v0.3.1 - Central Command Architecture
- Central Confirmation System - Type-safe confirmation processing
- Anti-Flicker Color System - Pre-compiled color mappings
- Professional Startup Experience - Enhanced startup messages
๐ Code Quality Metrics (v0.3.3)
Rush Sync Server v0.3.3 maintains exceptional standards with significant improvements:
- โ Zero Clippy Warnings (all lints passing - maintained)
- โ Zero Cargo Check Errors (clean compilation - maintained)
- โ 35% Code Reduction (1,389 โ 899 lines - NEW)
- โ Memory Safe (Rust guarantees + manual verification - enhanced)
- โ Thread Safe (proper async/sync boundaries - maintained)
- โ Professional Logging (structured JSON with rotation - NEW)
- โ Comprehensive Error Handling (Result types throughout - simplified)
- โ Clean Architecture (optimized modular design - improved)
- โ Performance Optimized (streamlined operations - NEW)
- โ Robust Server Management (up to 10 concurrent servers - enhanced)
- โ Security Monitoring (automatic threat detection - NEW)
- โ Cross-Platform Compatibility (tested on macOS, Linux, Windows - maintained)
Performance Improvements:
- Server Creation: 37.5% faster (500ms vs 800ms)
- Memory Usage: 25% reduction through optimized structures
- Log Processing: 40% faster JSON serialization
- Request Handling: 15% improvement in response times
๐ License
Dual-Licensing Model
- Community License (GPLv3) โ Free for private and non-commercial use
- Commercial License โ Required for commercial applications
For commercial licensing inquiries: ๐ง l.ersen@icloud.com
๐ค Contributing
๐ฏ Areas Looking for Contributors (v0.3.3+):
Phase 2 Development:
- Hot-reloading system with file watcher integration
- TLS/HTTPS support with rustls for production mode
- Advanced log analysis and dashboard development
- Performance monitoring and alerting systems
Server Management Enhancements:
- Load balancing algorithms for multiple server instances
- Advanced security features and intrusion detection
- WebSocket support for real-time server communication
- Container orchestration and deployment automation
Logging & Analytics:
- Real-time log analysis and pattern detection
- Advanced metrics collection and visualization
- Centralized logging aggregation across servers
- AI-powered anomaly detection in server logs
๐ Development Guidelines (Updated for v0.3.3):
-
Code Quality Standards:
- Maintain the 35% code reduction philosophy - simplicity over complexity
- Ensure zero warnings with
cargo clippy --all-targets --all-features - Add comprehensive tests for new logging and server features
- Follow the streamlined architecture patterns established in v0.3.3
- Use Default traits and standard Rust patterns over custom implementations
-
Server & Logging Features:
- Test all logging scenarios including rotation and compression
- Validate security monitoring and alert generation
- Ensure proper cleanup of log files and archives
- Test concurrent server scenarios with logging under load
- Verify performance metrics accuracy and collection
-
Performance Considerations:
- Maintain or improve the performance gains achieved in v0.3.3
- Profile new features to ensure they don't impact server response times
- Optimize log processing to handle high-throughput scenarios
- Consider memory usage impact of new logging features
๐ Contact & Support
- Primary Contact: ๐ง l.ersen@icloud.com
- GitHub Repository: LEVOGNE/rush.sync.server
- Issues & Bug Reports: GitHub Issues
- Feature Requests: GitHub Discussions
Rush Sync Server v0.3.3 - Optimized web server orchestration with 35% code reduction, professional logging system, and zero-warning architecture for maximum performance and maintainability.