zoukankan      html  css  js  c++  java
  • tile38 roaming-geofences 试用

    tile38 支持动态实时的移动对象的数据监控

    环境准备

    • docker-compose 文件
    version: "3"
    services:
      app:
        image: tile38/tile38
        ports:
        - "9851:9851"
      benthos:
        image: jeffail/benthos
        volumes:
        - "./conf/webhook.yaml:/benthos.yaml"
        ports:
        - "4195:4195"
     
     
    • webhook 配置文件
    input:
      type: broker
      broker:
        inputs:
          - type: http_server
            http_server:
              path: /
            processors:
              - type: text
                text:
                  operator: prepend
                  value: "get email message: "
    output:
      type: stdout
     
     

    启动&&试用

    • 启动
    docker-compose up -d
    • 使用
      添加roaming-geofences ,容器内部 docker-compose exec app sh
     
    SETHOOK myhook http://benthos:4195/ NEARBY people FENCE ROAM people * 5000
    {"ok":true,"elapsed":"103.615µs"}

    添加数据

    SET people bob POINT 33.01 -115.01
    SET people alice POINT 33.02 -115.02
    SET people dalong POINT 33.02 -115.02
    SET people dalong2 POINT 33.02 -115.02
    SET people dalong3 POINT 33.02 -115.02

    webhook 数据

    benthos_1 | get email message: {"command":"set","group":"5c39df96bc958a00013da996","detect":"roam","hook":"myhook","key":"people","time":"2019-01-12T12:37:42.052125403Z","id":"dalong","object":{"type":"Point","coordinates":[-115.02,33.02]},"nearby":{"key":"people","id":"alice","object":{"type":"Point","coordinates":[-115.02,33.02]},"meters":0}}

    说明:
    目前测试坐标点不同的,没有成功,需要在看看,可能是bug,同时如果key 包含的对象有多个的话,会有多次webhook 的调用
    参考测试:

     
    benthos_1 | get email message: {"command":"set","group":"5c39e037bc958a00013da998","detect":"roam","hook":"myhook","key":"people","time":"2019-01-12T12:40:23.389819225Z","id":"dalong3","object":{"type":"Point","coordinates":[-115.02,33.02]},"nearby":{"key":"people","id":"dalong","object":{"type":"Point","coordinates":[-115.02,33.02]},"meters":0}}
    benthos_1 | get email message: {"command":"set","group":"5c39e037bc958a00013da998","detect":"roam","hook":"myhook","key":"people","time":"2019-01-12T12:40:23.389819225Z","id":"dalong3","object":{"type":"Point","coordinates":[-115.02,33.02]},"nearby":{"key":"people","id":"dalong2","object":{"type":"Point","coordinates":[-115.02,33.02]},"meters":0}}
    benthos_1 | get email message: {"command":"set","group":"5c39e037bc958a00013da998","detect":"roam","hook":"myhook","key":"people","time":"2019-01-12T12:40:23.389819225Z","id":"dalong3","object":{"type":"Point","coordinates":[-115.02,33.02]},"nearby":{"key":"people","id":"alice","object":{"type":"Point","coordinates":[-115.02,33.02]},"meters":0}}

    参考资料

    https://tile38.com/topics/roaming-geofences/

  • 相关阅读:
    本地Springboot项目打包成docker镜像并上传到云仓库的全流程
    vue 组件开发到发布到npm全流程
    Python创建文件
    Ngrinder脚本开发各细节锦集(groovy)
    Ngrinder多接口的混合场景压测比例设定方案
    Pycahrm出现推送失败的处理方案,出现Push failed: Failed with error: Authentication failed for 'https://gitee.com/fxcity/Temporary_Test.git/'
    接口测试提取csrf_token和session
    Postman提取html返回值
    HttpRunnerManager自动化测试安装部署(CentOS)
    【转载】centos下搭建RabbitMQ
  • 原文地址:https://www.cnblogs.com/rongfengliang/p/10260967.html
Copyright © 2011-2022 走看看