# TOScheduler **Repository Path**: cpn-platform/toscheduler ## Basic Information - **Project Name**: TOScheduler - **Description**: 计算卸载(业务调度+决策任务合并)模块 - **Primary Language**: Go - **License**: Apache-2.0 - **Default Branch**: dev - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-11-26 - **Last Updated**: 2024-09-28 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 计算卸载调度模块(*TOScheduler*) ### 1 概述 - 基于*go*的计算卸载调度模块 - 基于**流式传输与消息队列**的计算任务调度模式 ### 2 原理 #### 2.1 设备接入数据 ```shell chRevSDK <- toTO Res: <-chRevAI ``` #### 2.2 消息队列数据 ```shell task <- chRevSDK chSndAI <- &AI ``` #### 2.3 业务推理数据 ```shell ai <- chSndAI chRevAI <- res ``` #### 2.4 卸载决策数据 ```shell td <- chSndTD torMap.Update(r.Tor) ``` ### 3 使用 #### 3.1 语言与依赖 - 编程语言及版本 - `go 1.17`及以上 - 通用依赖下载 ```shell go env -w GOPROXY=https://goproxy.io,direct go env -w GO111MODULE=on go mod tidy ``` #### 3.2 命令行参数 - 找到主程序并运行(`main.go`) ```shell cd src/main go run main.go [-sdk] [-td] [-base] [-diff] ``` - 命令行参数说明 - `-sdk`**默认为`6575`**,是面向`SDK`模块的`Server`的端口 - `-td`**默认为`IP:6580`(`IP`为`TOD`模块的`ip`地址)**,是`TOD`模块的`Server`的套接字 - `-base`**默认为`6585`**,是`AI`模块的`Server`的端口基数 - `-diff`**默认为`1`**,是`AI`模块的`Server`的端口增数 #### 3.3 *.proto*文件编译 ```c // 基本 protoc --proto_path=./protos --go_out=./pb 文件名.proto // grpc protoc --proto_path=./protos --go_out=plugins=grpc:./pb 文件名.proto ```