DEV Community

Oleksandr Viktor
Oleksandr Viktor

Posted on

๐Ÿ“ฆ WJb.Demo (WASM)

๐Ÿ“ฆ WJb.Demo (WASM)

Lightweight demo application showcasing WJb background job engine running in a Blazor WebAssembly (WASM) environment.

WJb.Demo (WASM)


๐Ÿš€ Overview

WJb.Demo (WASM) demonstrates how to:

  • Execute background jobs in a client-side environment
  • Track job lifecycle and progress in real time
  • Use clean, decoupled job actions
  • Chain and configure actions
  • Handle success, failure, and cancellation scenarios

๐Ÿงฉ Features

  • โœ… Job dashboard with live updates
  • โœ… Multiple action types:
    • Hello Action
    • Configured Action
    • Progress Action
    • Chained Actions
  • โœ… Progress tracking (0โ€“100%)
  • โœ… Status handling:
    • Completed
    • Failed
  • โœ… Message output per job
  • โœ… Job cleanup support

๐Ÿ–ฅ๏ธ UI Overview

The demo UI includes:

  • Sidebar navigation
    • Dashboard
    • Action samples
  • Active Jobs table
    • ID
    • Status
    • Progress bar
    • Message
    • Remove action

Example states:

  • Completed jobs with full progress
  • Failed jobs with partial progress
  • Informational messages for each job

โš™๏ธ How It Works

WJb separates concerns into:

  • Execution โ€“ runs actions
  • Storage โ€“ tracks job state
  • Hosting โ€“ coordinates lifecycle

In this demo:

  • Jobs are triggered from UI
  • Execution happens in WASM runtime
  • Progress updates are reflected immediately

โ–ถ๏ธ Run Locally

git clone https://github.com/UkrGuru/WJb.Demo
cd WJb.Demo
dotnet run
Enter fullscreen mode Exit fullscreen mode

Then open:

https://localhost:7268
Enter fullscreen mode Exit fullscreen mode

๐Ÿงช Example Scenarios

  • Run simple job (Hello Action)
  • Execute configured job (SMTP simulation)
  • Track progress over time
  • Trigger chained jobs
  • Observe failure handling

๐Ÿ“Œ Notes

  • This is a demo application intended for showcasing WJb capabilities.
  • Behavior and APIs may evolve.
  • Some features may be simplified for demonstration purposes.

Top comments (0)