Skip to content

Commit ca09db0

Browse files
authored
Docs/xinshi/update (#4)
* chore: reorder import statements in README and docs * chore: update README documentation wording * chore: update README description for ROCK & ROLL Team
1 parent c23676e commit ca09db0

File tree

3 files changed

+26
-46
lines changed

3 files changed

+26
-46
lines changed

README.md

Lines changed: 22 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
4. [Quick Start](#-quick-start)
2929
- [Project Management](#project-management)
3030
- [Important Notes](#important-notes)
31-
- [Using GEM Protocol Environment](#using-gem-protocol-environment)
31+
- [Using Env Protocol](#using-env-protocol)
3232
- [Sandbox SDK Usage](#sandbox-sdk-usage)
3333
5. [System Architecture](#-system-architecture)
3434
- [Technical Components](#technical-components)
@@ -57,14 +57,12 @@ ROCK adopts a client-server architecture, uses Docker for containerization, and
5757

5858
## 🚀 Core Features
5959

60-
* **Sandbox Management**: Create and manage isolated development environments with resource limits
61-
* **SDK Interface**: Clean Python SDK interface supporting all core operations
62-
* **GEM Protocol Compatible**: Compatible with GEM environment interface, providing unified access to reinforcement learning environments
63-
* **Remote Execution**: Execute commands in remote sandbox environments via HTTP API
64-
* **Auto Cleanup**: Automatically clean up idle sandboxes after configurable time
65-
* **File Operations**: Upload and download files between sandbox environments
66-
* **Concurrent Testing**: Supports launching multiple independent sandbox environments simultaneously for concurrent testing
67-
* **Optional Read-Write Separation Architecture**: Supports optional read-write separation configuration to improve system performance and scalability
60+
* **GEM Environment Support**: Compatible with GEM Env protocols environment interactions
61+
* **Sandbox Runtime**: Stateful runtime environments with multiple isolation mechanisms to ensure consistency and security
62+
* **Flexible Deployment**: Supports different deployment methods for diverse environment requirements and Operating System
63+
* **Unified SDK Interface**: Clean Python SDK for Env and Sandbox interaction
64+
* **Layered Service Architecture**: Distributed Admin, Worker, and Rocklet architecture for scalable resource management
65+
* **Efficient Resource Management**: Automatic sandbox lifecycle management with configurable resource allocation
6866

6967
---
7068

@@ -111,7 +109,7 @@ If you don't want to use uv to manage the environment, you can refer to [install
111109

112110
4. **OS Support**: ROCK recommends managing environments on the same operating system, such as managing Linux image environments on a Linux system. However, it also supports cross-operating system level image management, for example, launching Ubuntu images on MacOS. For specific details, please refer to the MacOS Launch section in [quickstart.md](docs/docs/rock/quickstart.md)
113111

114-
### Using GEM Protocol Environment
112+
### Using Env Protocol
115113
ROCK is fully compatible with the GEM protocol, providing standardized environment interfaces:
116114

117115
```python
@@ -140,9 +138,9 @@ env.close()
140138
```python
141139
import asyncio
142140

141+
from rock.actions import CreateBashSessionRequest
143142
from rock.sdk.sandbox.client import Sandbox
144143
from rock.sdk.sandbox.config import SandboxConfig
145-
from rock.sdk.sandbox.request import CreateBashSessionRequest
146144

147145

148146
async def run_sandbox():
@@ -163,43 +161,23 @@ if __name__ == "__main__":
163161

164162
## 🛠️ System Architecture
165163

166-
### Technical Components
164+
### ROCK Service Architecture
165+
The service layer implements a distributed architecture with three core node roles:
167166

168-
#### SDK Components
169-
- **Sandbox Client**: Python SDK for interacting with remote sandbox environments
170-
- **Environment Management**: Tools for building and managing development environments
171-
172-
#### Admin Management Server
173-
Backend service for sandbox orchestration, supporting optional read-write separation architecture to improve performance and scalability:
174-
- **Write Cluster**: Handles sandbox creation/destruction and other write operations
175-
- **Read Cluster**: (Optional) Handles execution requests for existing sandboxes
176-
- **API Endpoints**: RESTful API for sandbox management
177-
178-
#### Support Read-Write Separation Architecture
179-
ROCK supports optional read-write separation architecture, routing different types of operations to dedicated server clusters to improve performance:
180-
181-
**Write Cluster Responsibilities**:
182-
- Sandbox environment creation and destruction
183-
- Other operations that modify system state
184-
185-
**Read Cluster Responsibilities** (Optional):
186-
- Sandbox status queries
187-
- Command execution
188-
- File upload/download
189-
- Session management operations
190-
191-
The read cluster is designed to reduce Ray pressure by directly managing sandboxes without going through an actor again, thereby improving overall system performance and response speed.
192-
193-
By default, ROCK uses a single cluster to handle all operations. When read-write separation is configured, the system routes read operations and write operations to different clusters to improve performance and scalability.
167+
- **Admin**: The scheduling node responsible for deploying Environments as Sandboxes and managing Sandbox resource scheduling and allocation
168+
- **Worker**: The working node that allocates machine physical resources to Sandboxes and executes the specific Sandbox runtime
169+
- **Rocklet**: A lightweight proxy service component that handles SDK-to-Sandbox Action communication and supports external internet service access
194170

195171
### Core Technologies
196-
- **Container Management**: Container orchestration using Docker SDK
197-
- **Web Framework**: Management services provided using FastAPI and uvicorn
198-
- **Distributed Computing**: Distributed task processing using Ray
199-
- **Concurrent Support**: Supports launching multiple independent sandbox environments simultaneously for concurrent testing, fully utilizing system resources
172+
- **Distributed Architecture**: Multi-node design with Admin, Worker, and Rocklet components for scalability
173+
- **Runtime Isolation**: Stateful sandbox runtimes with multiple isolation mechanisms
174+
- **Flexible Deployment**: Support for different deployment methods for diverse environment requirements and Operating System
175+
- **Protocol Compatibility**: Support for multiple interaction protocols
176+
- **Container Orchestration**: Docker-based container management with resource allocation
177+
200178

201-
### GEM Protocol Support
202-
ROCK is compatible with the GEM protocol, providing the following standard interfaces:
179+
#### GEM Protocol Support
180+
ROCK maintains compatibility with GEM interfaces for reinforcement learning environments:
203181
- `make(env_id)`: Create environment instance
204182
- `reset(seed)`: Reset environment state
205183
- `step(action)`: Execute action and return results

docs/docs/rock/CN/sdk.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,10 @@ ROCK SDK为开发者提供了便捷的Python接口来使用ROCK平台的功能
2727
2828
```python
2929
import asyncio
30+
31+
from rock.actions import CreateBashSessionRequest
3032
from rock.sdk.sandbox.client import Sandbox
3133
from rock.sdk.sandbox.config import SandboxConfig
32-
from rock.sdk.sandbox.request import CreateBashSessionRequest
3334
3435
async def run_sandbox():
3536
"""Run sandbox demo with admin server requirement.

docs/docs/rock/sdk.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,10 @@ ROCK SDK provides developers with convenient Python interfaces to use ROCK platf
2727
2828
```python
2929
import asyncio
30+
31+
from rock.actions import CreateBashSessionRequest
3032
from rock.sdk.sandbox.client import Sandbox
3133
from rock.sdk.sandbox.config import SandboxConfig
32-
from rock.sdk.sandbox.request import CreateBashSessionRequest
3334
3435
async def run_sandbox():
3536
"""Run sandbox demo with admin server requirement.

0 commit comments

Comments
 (0)