Alert.CA.ImageAcquisition
A comprehensive camera management and image acquisition platform built on Azure cloud infrastructure, designed for real-time camera operations, image processing, and panoramic image generation.
Architecture Overviewβ
Tech Stackβ
| Category | Technology |
|---|---|
| Runtime | .NET 10, Azure Functions v4 (Isolated Worker) |
| Orchestration | Durable Functions with Netherite backend |
| Databases | Azure Cosmos DB (NoSQL), Azure SQL Server |
| Storage | Azure Blob Storage (images), Azure Table Storage (metadata) |
| Messaging | Azure Queue Storage |
| Real-time | SignalR |
| Image Processing | Emgu.CV (OpenCV), System.Drawing |
| Camera Protocol | VAPIX (Axis cameras) |
| Auth | Microsoft Entra ID (Azure AD), JWT, Microsoft Identity Web |
| API Patterns | CQRS (MediatR), REST (ASP.NET Core) |
| Monitoring | Application Insights |
| Config | Azure App Configuration + Key Vault |
Solution Structureβ
Applicationsβ
| Project | Type | Purpose |
|---|---|---|
| Admin API | ASP.NET Core 10 Web API | Administrative interface for managing cameras, users, and orchestrations |
| Image Acquisition Engine | Azure Functions (Durable) | Core engine β captures images from cameras via continuous orchestration loops |
| Camera Operation | Azure Functions | Camera health monitoring, config sync, and third-party integrations |
| Metadata Cleanup | Azure Functions | Periodic purging of expired image metadata |
| Notification | Azure Functions | Email and SMS notification delivery |
| Mock Camera API | ASP.NET Core 10 Web API | Local development substitute for real cameras |
Shared Librariesβ
| Project | Purpose |
|---|---|
| VAPIXService | Axis camera VAPIX protocol client (image capture, PTZ, overlays) |
| UCSDService | UCSD Metadata API client (device configs, credentials) |
| ImageStorageService | Polymorphic image storage, thumbnails, SignalR broadcasting |
| Models | Shared DTOs and data models across the solution |
Test Projectsβ
| Project | Tests For |
|---|---|
| Alert.CA.ImageAcquisition.Test | Image Acquisition Engine |
| Alert.CA.CameraOperation.Test | Camera Operation |
| Alert.CA.VAPIXService.Test | VAPIX Service |
| Alert.CA.Admin.API.Test | Admin API |
| Alert.CA.MetadataCleanup.Test | Metadata Cleanup |
Data Flowβ
Recent Platform Updatesβ
- Functions and Runtime Upgrade (June 2026) β Branch-level summary of runtime upgrades, startup/config updates, telemetry changes, and deployment validation items.
Getting Startedβ
Prerequisitesβ
- .NET 10 SDK
- Azure Functions Core Tools v4
- Docker Desktop (for Durable Task Scheduler)
- Azure subscription with:
- Cosmos DB account
- Storage account
- App Configuration service
- Key Vault
Local Development Setupβ
1. Install Prerequisitesβ
Install .NET 10 SDK
# Download from https://dotnet.microsoft.com/download/dotnet/10.0
Install Azure Functions Core Tools v4
npm install -g azure-functions-core-tools@4 --unsafe-perm true
Install Docker Desktop
# Download from https://www.docker.com/products/docker-desktop
2. Set Up Durable Task Scheduler (Required for Local Debugging)β
The Azure Functions project uses the Durable Task Scheduler for orchestration state management. To run locally, you need to run the Durable Task Scheduler in Docker.
Pull the Durable Task Scheduler Docker Image
docker pull cgillum/durabletask-emulator:latest
Run the Durable Task Scheduler Container
docker run -d -p 8080:8080 --name durabletask-emulator cgillum/durabletask-emulator:latest
Verify the Container is Running
docker ps
You should see the durabletask-emulator container running on port 8080.
Stop the Container (when finished debugging)
docker stop durabletask-emulator
docker rm durabletask-emulator
3. Configure Local Settingsβ
Alert.CA.ImageAcquisition - local.settings.json
{
"IsEncrypted": false,
"Values": {
"AzureWebJobsStorage": "UseDevelopmentStorage=true",
"FUNCTIONS_WORKER_RUNTIME": "dotnet-isolated",
"ConnectionStrings:AppConfig": "https://{DEV APPCONFIG URL}.azconfig.io",
"CosmosDbOptions:CosmosDbUrl": "AccountEndpoint={DEV COSMOSDB URL};AccountKey={DEV ACCOUNT KEY};",
"StorageOptions:QueueUrl": "DefaultEndpointsProtocol=https;AccountName={DEV STORAGE ACCOUNT NAME};AccountKey={DEV ACCOUNT KEY};EndpointSuffix=core.windows.net",
"DTS_TASK_HUB": "debug",
"DTS_ENDPOINT": "Endpoint=http://localhost:8080;Authentication=None",
"AzureWebJobsSecretStorageType": "files"
}
}
Key Configuration Notes:
DURABLETASK_SCHEDULER_CONNECTION: Points to local Docker container (localhost:8080)TASKHUB_NAME: Local task hub name for development- Update connection strings to point to your development Azure resources
Alert.CA.Admin.API - appsettings.Development.json
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"ConnectionStrings": {
"AppConfig": "https://{DEV APPCONFIG URL}.azconfig.io"
}
}
4. Run the Applicationsβ
Start the Durable Task Scheduler (if not already running)
docker start durabletask-emulator
Run the Azure Functions Project
cd Alert.CA.ImageAcquisition
func start
Run the Admin API
cd Alert.CA.Admin.API
dotnet run
The Admin API will be available at https://localhost:7xxx (check console output for exact port).
The Functions app will be available at http://localhost:7071.
5. Development Workflowβ
Image Storage: Images are stored in Azure Blob Storage (development account)
Queue Processing: Message queues use Azure Queue Storage (development account)
Metadata: Table storage operations use Azure Table Storage (development account)
Durable Functions: State management uses Durable Task Scheduler (local Docker container)
API Testing: Use Swagger UI at https://localhost:7xxx/swagger for Admin API testing
6. Troubleshootingβ
Functions Not Starting
- Ensure Docker container is running:
docker ps - Check container logs:
docker logs durabletask-emulator - Verify port 8080 is not in use by another application
Authentication Issues
- Ensure you're logged into Azure CLI:
az login - Verify Managed Identity has access to App Configuration and Key Vault
- For local development, use
DefaultAzureCredentialwhich chains Visual Studio, CLI, and other credential types
Orchestration State Issues
- Restart the Durable Task Scheduler container to clear state:
docker restart durabletask-emulator
Deploymentβ
The application is designed for Azure deployment with:
- Azure Functions consumption or premium plans
- Azure Durable Task Scheduler for production orchestration
- Application Insights for monitoring
- Managed Identity for secure Azure service access
- Azure App Configuration for centralized configuration
- Azure Key Vault for secrets management
This architecture enables reliable, scalable image acquisition from hundreds of cameras while providing real-time processing, storage, and distribution capabilities. The Admin API provides comprehensive management capabilities following modern architectural patterns (CQRS, MediatR, clean architecture) for maintainability and testability.