scalebox

module
v0.0.0-...-7c54862 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 14, 2026 License: Apache-2.0

README ΒΆ

Scalebox β€” A Cloud-Native Stream Computing Engine

Scalebox is a cloud-native stream computing engine that runs containerized user algorithms on distributed, heterogeneous computing clusters, enabling large-scale parallel processing through pipelines of hierarchical modules with task-level fault tolerance. Compared with existing big data processing and parallel computing frameworks, its technical characteristics are particularly suited to scenarios with distributed data, distributed compute resources, and complex algorithms.

✨ Key Features

  • Cloud-Native Design: all algorithm modules are containerized and embedded into data processing pipelines via the sidecar pattern; control messages and data channels are separated, and adjacent modules are linked through a message bus, enabling multi-language, non-intrusive parallel programming.

  • Virtual Tasks (VTask / Task Groups): an application-level coarse-grained compute unit built on top of fine-grained Tasks. Cross-module Task collections incorporate semaphores and shared variables, managed by the wait-queue β†’ vtask-head β†’ vtask-core β†’ vtask-tail pipeline for flow control, resource binding, and state tracking. Supports DEFAULT / HOST-BOUND / GROUP-BOUND modes, covering everything from lightweight batch processing to multi-node collaborative computing.

  • Cross-Cluster Computing: algorithm modules and transfer modules are normalized and processed uniformly through pipelines for intra-cluster and cross-cluster data. Full-mesh replication of t_cluster plus gRPC proxy forwarding; the CLI always connects to the local controld, and cross-cluster operations are transparently routed by the server.

  • Task-Level Fault Tolerance: automatic retries based on exit-code rules for transient errors caused by hardware failures, software bugs, network issues, or data anomalies. Fine-grained task-level fault tolerance enables trustworthy data analysis on unreliable hardware.

  • Node-Local Computing Optimization: centered on node-local storage, using "operator-level spatial expansion + local storage residency + explicit data-flow orchestration" to move inter-node communication into the node itself, significantly reducing dependence on network bandwidth and external storage.

  • WebUI Management Interface: REST gateway (:8088) with 76 endpoints covering all management functions. SPA frontend embedded as a single-file deployment, providing Dashboard statistics, App card grid, DAG topology, Task/VTask management, and semaphore/variable hierarchy trees.

  • VS Code Extension: sidebar TreeView (three-level lazy-loading tree of App β†’ Modules/Tasks/VTasks), task log Webview, DAG force-directed graph (ECharts), app.yaml LSP (syntax validation/autocompletion/hover hints). Packaged with Docker, zero local Node.js dependencies.

  • Security Framework: JWT authentication + RBAC role system (admin/viewer/operator/automation) + gRPC TLS encryption + database certificate authentication. Compose-tiered optional enablement, disabled by default with zero overhead.

  • Multi-Level Parallelism: intra-module algorithm parallelism, module-level data parallelism, and inter-module pipeline parallelism.

  • Multiple Container Engines: Docker (default), Singularity/Apptainer, Podman.

πŸš€ Quick Start

1. Prepare the Environment
# Docker 20.10+
curl -fsSL https://get.docker.com | sh
sudo systemctl enable --now docker
docker --version
2. Start Scalebox
git clone https://github.com/kaichao/scalebox.git
cd scalebox

# Generate secrets (optional)
cd build && bash gen-secrets.sh && cd ..

# Build and start
make -C build/
docker compose -f build/compose.yaml up -d

Open http://localhost:8088 in your browser to access the WebUI.

3. Run an Example
cd examples/hello-scalebox
echo "Hello Scalebox" | scalebox run
scalebox app list
4. Install the VS Code Extension
cd vscode-scalebox && make install

πŸ“Š Core Concepts

Concept Name Description
App Application An application that performs a specific computing task, consisting of multiple Modules
Module Module A containerized algorithm component that forms pipelines through cascading
Task Task The basic execution unit β€” the process of running input data on a Module
VTask Virtual Task A cross-module Task collection with built-in semaphores and variables for unified flow control and state management
Host Host The server that executes computing tasks
Slot Slot A slice of compute resources on a node, the basic unit for Task scheduling
Cluster Cluster A logical grouping of compute resources, supporting collaboration across wide-area networks

πŸ“š Documentation

Chinese User Documentation (β†’ Full TOC)
Category Document Description
Getting Started Introduction to Scalebox Product positioning, key features, core value
Getting Started Quick Start Environment preparation, deployment, installation verification
User Guide Installation Docker Compose single-node / multi-node clusters
User Guide Core Concepts App/Module/Task/VTask/Host/Slot/Cluster in detail
User Guide Running Apps Creating, managing, and monitoring apps and tasks
User Guide Example Apps From entry-level to advanced examples
User Guide Operations Monitoring, troubleshooting, backup, cluster management
User Guide Standard Modules File transfer, scheduled tasks, directory listing, etc.
User Guide WebUI Guide REST gateway, page navigation, build and deployment
User Guide VS Code Extension Installation and configuration, TreeView, DAG, LSP
Developer Guide Programming Model Two-level programming model, event-driven architecture
Developer Guide Module Development Module design, sidecar pattern, unit testing
Developer Guide App Design Design principles, pipeline patterns, best practices
Developer Guide Main Router & Status Semaphores/variables/global variables, VTask overview
Developer Guide Node-Local Computing Computing-storage integration, three-stage model, performance analysis
Developer Guide Advanced Features Fault tolerance, admission control, timeouts, slot auto-scaling
Developer Guide VTask Design Conceptual model, module structure, semaphores, pipeline flow
Developer Guide Cross-Cluster Architecture Data replication, address resolution, gRPC proxy
Developer Guide Security Framework JWT + RBAC + TLS, certificate management
Reference Technical Specifications app.yaml / module / cluster definition specifications
Reference Parameter Reference All parameters and environment variables
Reference CLI Commands Complete reference of 24 subcommands
Reference Shell Programming Built-in functions, container directories, file exchange interfaces
Reference Exit Code Specification App exit code conventions and scheduling policies
Reference FAQ Common questions on deployment, tasks, semaphores, and WebUI
English Design Documents
Document Description
VTask Design Complete VTask design document
WebUI / VS Code WebUI + VS Code extension architecture plan
REST API Complete reference of 76 endpoints
gRPC API 95 RPC call examples
Security Framework JWT + RBAC + TLS configuration

πŸ§ͺ Example Apps

  • hello-scalebox β€” the first introductory app
  • app-primes β€” prime number calculation, demonstrating data parallelism
  • app-copy β€” cross-node data transfer
  • remote-primes β€” cross-cluster prime number calculation
  • vtask β€” VTask pipeline examples (DEFAULT / HOST-BOUND)

πŸ—οΈ Standard Modules

  • dir-list β€” directory listing, generates lists of files to process
  • file-copy β€” single-file copy based on rsync-over-ssh
  • dir-copy β€” directory-level copy
  • rsync-copy β€” efficient rsync transfer
  • ftp-copy β€” FTP protocol transfer
  • cron β€” scheduled message triggering
  • cluster-head / node-agent β€” cluster node management
  • PostgreSQL β€” metadata storage
  • gRPC β€” high-efficiency inter-component communication protocol
  • Go β€” the language for cloud-native application development

🀝 Contributing

Issues and Pull Requests are welcome at GitHub Issues.

πŸ“„ License

Apache License 2.0 Β© Kaichao Wu

Directories ΒΆ

Path Synopsis
dockerfiles
examples
golang module
pkg
client
Package client provides a gRPC client singleton for scalebox SDK packages.
Package client provides a gRPC client singleton for scalebox SDK packages.
pb
vtask
Package vtask provides Go wrappers for the vtask management RPCs exposed by the scalebox controld AppService.
Package vtask provides Go wrappers for the vtask management RPCs exposed by the scalebox controld AppService.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL