alibaba / alibaba/ROCK

feat: support Alibaba Function Compute as sandbox runtime provider

Open
#644 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
485
Forks
81
Avg merge
16h 12m
Merged PRs (30d)
8

Description

## Background

ROCK currently supports multiple deployment modes including Docker, Ray, and K8s. Adding Alibaba Cloud Function Compute (FC3) as a sandbox runtime provider would enable serverless deployment of ROCK sandboxes, reducing operational overhead and enabling auto-scaling.

## Feature Request

Add comprehensive support for Alibaba Cloud Function Compute 3.0 (FC3) as a sandbox runtime provider with three deployment modes:

1. **Custom Runtime**: Lightweight Python runtime with bootstrap script
2. **Custom Container**: Full Docker container deployment
3. **Hybrid Adapter**: HTTP/WebSocket adapter for FC3 function integration

## Key Components

### FC3 Client
- `FC3Sandbox`: Main sandbox client with session management
- `CircuitBreaker`: Thread-safe fault tolerance with OPEN/CLOSED/HALF_OPEN states
- WebSocket reconnection with exponential backoff retry
- Custom exceptions for error handling

### FC3 Rocklet
- `runtime/`: Custom Runtime bootstrap and configuration
- `container/`: Custom Container Dockerfile and configuration
- `adapter/`: Hybrid Adapter HTTP/WebSocket server with path traversal protection

### Tests
- 126 test cases covering client, adapter, and runtime configurations

## Benefits

- **Serverless**: No infrastructure management required
- **Auto-scaling**: Automatic scaling based on workload
- **Cost-effective**: Pay-per-use pricing model
- **High availability**: Built-in fault tolerance

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the existing sandbox runtime providers, then compare their structure with the proposed runtime/, container/, and adapter/ components. Review the FC3 client, session management, circuit breaker, WebSocket retry, and path-traversal requirements before running or adding the stated 126 tests. Done means all three FC3 deployment modes and their listed safeguards are supported.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, python
Domain
backend, cloud
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.