A practical tutorial on building a distributed Blender rendering system with Node.js, Docker, and Docker Compose
Note: This is a tutorial to start building an example of a distributed system and is not intended for a production deployment.
π Start Tutorial β
This hands-on tutorial teaches you how to build a distributed Blender rendering system from scratch. You'll learn:
- RESTful API Development with Node.js and Express
- Process Management for long-running background tasks
- Distributed Orchestration to split workloads across multiple nodes
- Containerization with Docker
- Multi-container Deployment with Docker Compose
- Production Patterns like rate limiting, service discovery, and monitoring
By the end, you'll have a working distributed system that can render Blender animations in parallel across multiple servers!
dist-app-tutorial/
βββ docs/ # Tutorial documentation (GitHub Pages)
β βββ index.md # Landing page
β βββ 00-setup.md # Environment setup
β βββ 01-rendering-node.md # Part 1: Rendering Node
β βββ 02-orchestrator.md # Part 2: Orchestrator
β βββ 03-docker.md # Part 3: Docker
β βββ 04-docker-compose.md # Part 4: Docker Compose
β βββ 05-enhancements.md # Future improvements
β βββ _config.yml # Jekyll configuration
β
βββ examples/ # Working code for each part
β βββ part1-rendering-node/ # Express server with job management
β βββ part2-orchestrator/ # Work distribution system
β βββ part3-docker/ # Dockerfiles for containerization
β βββ part4-docker-compose/ # Complete Docker Compose setup
β
βββ img/ # Images and assets
βββ .github/workflows/ # GitHub Actions for auto-deployment
βββ CONTRIBUTING.md # Contribution guidelines
βββ CODE_OF_CONDUCT.md # Code of conduct
βββ README.md # This file
Install Node.js, Blender, and prepare your development environment.
Build a web API that accepts Blender rendering jobs and manages background processes.
Key Concepts:
- Express.js server setup
- HTTP status codes (202 Accepted, 200 OK)
- Process management with child_process
- Polling patterns
Create an orchestrator to distribute rendering workloads across multiple nodes.
Key Concepts:
- Work distribution and batching
- Parallel execution with Promise.all()
- Round-robin scheduling
- Status aggregation
Containerize the rendering node and orchestrator for consistent deployment.
Key Concepts:
- Writing Dockerfiles
- Docker networking
- Volume mounts
- Container orchestration
Deploy the entire distributed system with a single command.
Key Concepts:
- Multi-container applications
- Service dependencies
- Scaling services
- Production-ready deployment
Explore production-ready improvements and advanced patterns.
Topics:
- Rate limiting (429 Too Many Requests)
- Message queues (RabbitMQ, Kafka)
- Service discovery
- Kubernetes deployment (AKS)
- Monitoring and logging
- Security best practices
Visit the full tutorial for step-by-step instructions.
Each examples/ folder contains complete, working code:
# Part 1: Single rendering node
cd examples/part1-rendering-node
npm install
npm start
# Part 4: Complete system with Docker Compose
cd examples/part4-docker-compose
docker-compose up --buildSee individual README files in each example folder for detailed instructions.
- Node.js v14 or higher (Download)
- Blender (Download)
- Docker (for Parts 3-4) (Get Docker)
- Basic knowledge of:
- JavaScript/Node.js
- REST APIs
- Command line
We welcome contributions! Whether it's:
- π Bug fixes
- π Documentation improvements
- β¨ New features or examples
- π‘ Suggestions for enhancements
Please see CONTRIBUTING.md for guidelines.
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
- Blender Foundation for the amazing open-source 3D software
- The Node.js and Express.js communities
- All contributors to this tutorial
- Documentation Issues: Open an issue
- Questions: Start a discussion
- Tutorial Website: khnumdev.github.io/dist-app-tutorial
Ready to get started? π Begin the tutorial
Star this repo β if you find it helpful!
