TB Core Services - Distributed Background Workers for Automated Dispensary

TB Core Services is a suite of 7 modular .NET Worker Services designed to power the backend operations of an automated dispensary system. These background services handle key responsibilities like ordering, reporting, synchronization, backups, video processing, and automated software updates. Each service runs independently, either in the central server or on individual vending machines, ensuring robust, scalable automation across the entire ecosystem. Built entirely by me, these workers form the backbone of system operations and maintenance, ensuring uninterrupted service, data consistency, and machine-server communication.

Tech Stack & Integration:
  • .NET Core Worker Services (C#) for long-running background processes
  • PostgreSQL with Entity Framework Core for persistent, scalable data storage
  • REST API for secure internal communication and manual process triggering

TB Order Automated Intelligent Ordering Engine

Smart, reliable service that automates restocking across vending machine networks. It schedules orders and triggers urgent replenishments to keep machines stocked without manual effort. Designed to optimize supply chain efficiency and prevent stockouts, TB Order scales effortlessly from small setups to large enterprise operations.

Runs on: Central Server

Key features:
  • Operates in two intelligent modes:
    • Main Cycle - periodic ordering based on customer schedules
    • Critical Cycle - urgent replenishment triggered by low stock
  • Advanced ordering logic that:
    • Accounts for supplier constraints (e.g., minimum order quantities)
    • Aggregates demand across multiple locations
    • Prevents over-ordering by tracking current and in-transit stock
  • Flexible order outputs:
    • Email-ready attachments (PDF, Excel, CSV) for suppliers
    • Order tracking via TB WMS web interface
    • Automated delivery manifests sent to vending machines
    • Optional REST API integration for ERP systems to enable full automation

Designed for extensibility: Adapts to diverse needs from small-scale to enterprise supply chains

TB Report Advanced Notification & Custom Report Generator

Keeps your operations visible and responsive with automated alerts and customized reporting. It delivers timely insights to the right people, helping teams react quickly to machine issues or performance changes. Whether it’s real-time notifications or scheduled reports, TB Report ensures critical information never gets missed.

Runs on: Central Server

Key features:
  • Automated Email Alerts for:
    • Failed dispenses
    • Low stock levels
    • Hardware warnings
    • Other critical vending machine events
  • Context-Rich Attachments:
    • Include logs, photos, or video clips for enhanced diagnostics
  • Custom Report Generation:
    • Based on user-defined schedules and templates
    • Supports Excel, PDF, and CSV formats
  • Multi-Channel Delivery:
    • Via email or TB WMS web interface

Designed for flexibility: Tailored to customer needs, supporting fast reactions and operational transparency

TB Sync Reliable Two-Way Synchronization Engine

Ensures your data stays consistent across all vending machines and the central server even in challenging network conditions. With real-time updates, smart conflict handling, and offline resilience, it keeps your distributed system in perfect sync without manual intervention.

Runs on: Central Server & Vending Machine

Key features:
  • Real-Time Change Detection
    • Monitors critical records (users, products, transactions, inventory, restrictions, etc.)
  • Two-Way Sync
    • Transfers updates between machines and the central server in both directions
  • Reliable Offline Handling
    • Queues updates during connectivity loss and syncs once restored
  • Deployment-Aware Behavior:
    • The sync logic is designed to adapt based on where it’s deployed, making it suitable for complex setups with variable network conditions.
  • Custom Conflict Resolution
    • Resolves overlapping changes and partial failures using built-in safety logic
  • Deployment-Aware Behavior:
    • Resolves overlapping changes and partial failures using built-in safety logic

Deployment-aware: Adapts to network conditions and location, ensuring robust sync and conflict resolution

TB Update Client Self-Updating Software Deployment Agent

Keeps vending machines up to date automatically and unobtrusively. Designed to run in the background, it checks for new software versions, downloads updates intelligently, and installs them during idle times—keeping systems current without interrupting service.

Runs on: Vending Machine

Key features:
  • Periodic Version Checks
    • Regular polling of the central server for new updates
  • Intelligent Background Downloading
    • Retrieves update packages without disrupting machine operations
  • Idle-Time Installation
    • Applies updates only when the machine is not in use
  • Visual Feedback
    • Displays an “Update in Progress” screen for clarity
  • Update Capabilities Include:
    • Software binary replacement
    • Initialization file updates (XML, INI)
    • Database schema migrations
    • Embedded OS and system-level updates via PowerShell
  • Self-Updating Logic
    • The agent can update itself to ensure the deployment system remains current

Self-updating: Ensures deployment agent and system software remain current with minimal disruption

TB Backup Distributed Database Backup Service

Quietly safeguards your data with automated, scheduled backups on both central servers and vending machines. Lightweight and reliable, it ensures quick recovery when needed—without putting strain on system resources.

Runs on: Central Server & Vending Machines

Key features:
  • Independent Operation
    • Each device manages its own backup process
  • Configurable Scheduling
    • Set backup intervals to fit your operational needs
  • Simple File-Based Backups
    • Stored in organized folder structures for easy retrieval
  • Low Resource Footprint
    • Runs silently in the background with minimal system impact
  • Purpose:
    • Provides critical data protection with no additional operational overhead

Critical data protection: Automated, low-impact backups for fast recovery and peace of mind

TB Watch Dog Process Health Monitor

Keeps your systems running smoothly by monitoring the health of critical applications and services. It ensures high uptime across central servers and vending machines with automated restarts and zero need for manual intervention—even in the event of crashes or network disruptions.

Runs on: Central Server & Vending Machines

Key features:
  • Monitored Components:
    • WPF frontends (e.g., operator/customer UIs)
    • Web applications
    • Background/worker services
    • Automatically launches required services at boot
  • Periodic Health Checks
    • Ensures all monitored processes are running and responsive
  • Centralized & Local Operation
    • Works independently on both server and vending machines, resilient to network issues
  • Key Responsibilities:
    • Startup Orchestration
    • Self-Healing Logic
    • Restarts crashed or frozen processes to prevent service disruptions
  • Purpose:
    • Enables continuous, hands-off operation by minimizing downtime and ensuring system reliability

Continuous, hands-off operation: Maximizes uptime and reliability with automated monitoring and self-healing logic

TB VConverter Automated Video Compression Tool

Helps preserve video traceability without draining storage or performance. Running quietly in the background, it compresses raw video footage into efficient MP4 files ideal for long-term storage and easy transfer.

Runs on: Vending Machines

Key features:
  • Source Format:
    • AVI files recorded by vending machine cameras
  • Output Format:
    • Compressed MP4 optimized for space efficiency
  • Background Operation:
    • Scheduled to run during processor idle times
    • Avoids impact on critical machine tasks
  • Performance-Oriented Design:
    • Minimal system load, optimized for embedded environments
  • Purpose:
    • Maintains high video traceability while preserving storage and bandwidth

Optimized traceability: Maintains video records efficiently for storage and transfer with minimal system impact

arrow right Previous
An unhandled error has occurred. Reload 🗙