agfs支持binding client运行,本地不用额外启动agfs-server #293
chuanbao666
started this conversation in
RFC
Replies: 1 comment 2 replies
-
|
【新增参数lib_path参数,用于手动指定lib/so文件】 为啥需要手动指定lib/so文件? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
目前本地模式会自动启动一个agfs-server,viking_fs通过http接口请求fs操作。可能的问题:
这里讨论,对agfs client增加一种binding方式,来解决上述问题。OpenViking 可以通过 ctypes 直接调用 agfs-server Go 核心逻辑,无需启动独立的 HTTP 服务。
整体方案
graph TD %% 定义节点样式 classDef python fill:#3776ab,color:#fff,stroke:#333; classDef go fill:#00add8,color:#fff,stroke:#333; classDef c_bridge fill:#666,color:#fff,stroke:#333; classDef storage fill:#f39c12,color:#fff,stroke:#333; subgraph Python_Layer ["Python 层"] VFS[VikingFS]:::python BC[AGFSBindingClient]:::python end subgraph Bridge_Layer ["桥接层"] BA[BindingAdapter / libagfsbinding]:::c_bridge end subgraph Go_Core_Layer ["Go 核心层"] MFS[MountableFS / Router]:::go subgraph Backends ["后端插件"] LFS[localfs]:::go S3FS[s3fs]:::go MEM[memfs]:::go end end subgraph Infrastructure ["基础设施"] Disk[(Local Disk)]:::storage S3[(S3 / TOS)]:::storage RAM[(RAM)]:::storage end %% 调用关系 VFS -->|1. Path Mapping| BC BC -->|2. C-FFI / ctypes| BA BA -->|3. Go Function Call| MFS MFS -->|4a. Route to /local| LFS MFS -->|4b. Route to /s3| S3FS MFS -->|4c. Route to /mem| MEM LFS --> Disk S3FS --> S3 MEM --> RAM配置的修改
mode参数,默认为"http-client"。其他参数保持不变{ "storage": { "agfs": { "mode": "binding-client", "log_level": "warn", "path": "./data", "backend": "local" } }lib_path参数,用于手动指定lib/so文件。默认为当前目录third_party/agfs/bin/$lib_name相关代码见feat/agfs-binding
大家有啥想法或建议,欢迎讨论~
Beta Was this translation helpful? Give feedback.
All reactions