Registry
Configure and manage your actor registry
The registry is the central configuration hub for your Rivet application. It defines which actors are available and how your application runs.
Basic Setup
Create a registry by importing your actors and using the setup
function:
Creating Servers
Development Server
For development, create and run a server directly:
Production Setup
For production, get the handler and integrate with your framework:
Configuration Options
Driver Configuration
The driver configuration determines how actors are stored and managed:
Topology Options
standalone
: Single process, good for developmentpartition
: Distributed actors, good for production scalingcoordinate
: Peer-to-peer coordination, good for high availability
Storage Drivers
memory
: In-memory storage, data lost on restartfile-system
: Persistent file-based storageredis
: Redis-backed persistence and coordinationrivet
: Rivet platform integration
CORS Configuration
Configure CORS for browser clients:
Request Limits
Configure request size limits:
Worker Mode
For distributed topologies, you can create worker instances:
Type Safety
The registry provides full type safety for your client:
Testing Configuration
Use memory drivers for testing:
Environment-Specific Configuration
Use environment variables to configure different environments:
Best Practices
Registry Organization
Keep your registry clean and organized:
Actor Naming
Use consistent naming conventions:
Configuration Management
Separate configuration from registry definition: