zenoh s3 存储插件使用

s3 存储插件可以方便的将数据持久化到对象存储中,同时基于s3 插件的特点以及zenoh 的能力实现方便的数据读写分离

参考玩法

可以将数据写入到s3中,同时对于不同的策略可以实现读写分离(可以基于数据复制以及基于zenoh的数据路由),玩法特别多

参考配置

  • zenoh router 配置
{
  "id":"1000",
  "mode": "router",
  "connect": {
    "endpoints": ["tcp/172.16.238.12:7447"]
  },
  "plugins": {
    "mqtt": {
      "port": 1883
    },
    // configuration of "storage-manager" plugin:
    "storage_manager": {
      "volumes": {
        // configuration of a "fs" volume (the "zenoh_backend_fs" backend library will be loaded at startup)
        "fs": {},
        "s3": {
          "region": "eu-west-1",
          "url": "http://172.16.238.10:9000"
        }
      },
      "storages": {
        // configuration of a "demo" storage using the "fs" volume
        "demo": {
          // the key expression this storage will subscribes to
          "key_expr": "demo/example/**",
          // this prefix will be stripped from the received key when converting to file path
          // this argument is optional.
          "strip_prefix": "demo/example",
          "volume": {
            "id": "fs",
            // the key/values will be stored as files within this directory (relative to ${ZENOH_BACKEND_FS_ROOT})
            "dir": "example"
          }
        },
        // s3 配置
        "s3_test": {
          // the key expression this storage will subscribes to
          "key_expr": "demo/example/**",
          // this prefix will be stripped from the received key when converting to file path
          // this argument is optional.
          // "strip_prefix": "demo/example",
          "volume": {
            "id": "s3",
            "bucket": "zenoh-bucket",
            "reuse_bucket": true,
            "private": {
              // Credentials for interacting with the S3 bucket
              "access_key": "minio",
              "secret_key": "minio123"
            }
          }
        }
      }
    },
    // Optionally, add the REST plugin
    "rest": {
      "http_port": 8000
    }
  },
  "adminspace": {
    "permissions": {
      "read": true,
      "write": true
    }
  }
}
  • 效果

说明

基于s3存储插件可以实现比较有意思的玩法,实现灵活的数据存储以及访问处理,但是目前也是有一些现实的,详细的可以参考官方的blog 文档

参考资料

https://zenoh.io/blog/2023-07-17-s3-backend/

https://github.com/eclipse-zenoh/zenoh-backend-s3

posted on   荣锋亮  阅读(17)  评论(0编辑  收藏  举报

相关博文:
阅读排行:
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· 记一次.NET内存居高不下排查解决与启示
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· .NET10 - 预览版1新功能体验(一)
历史上的今天:
2023-12-21 keto ory 团队开源的google zanzibar 实现
2023-12-21 基于pg driver 的dremio cratedb arp 扩展
2023-12-21 以前开发的一些dremio arp 扩展24.3 更新
2023-12-21 dremio 24.3 版本构建的一些问题
2023-12-21 maven toolchains 简单说明
2023-12-21 permify google zanzibar 类似的开源授权服务实现
2023-12-21 dremio arp 扩展开发icon问题

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
点击右上角即可分享
微信分享提示