public:it:thingsboard

差别

这里会显示出您选择的修订版和当前版本之间的差别。

到此差别页面的链接

两侧同时换到之前的修订记录 前一修订版
后一修订版
前一修订版
public:it:thingsboard [2021/02/07 11:01] – [Tips] oakfirepublic:it:thingsboard [2023/05/19 17:46] (当前版本) – [架构] oakfire
行 10: 行 10:
     * UI: [[https://material.angular.io/|angular material]]     * UI: [[https://material.angular.io/|angular material]]
     * 存储:[[https://ngrx.io/docs|ngrx]]     * 存储:[[https://ngrx.io/docs|ngrx]]
-  * 后端架构为 [[java]] Spring, Spring Boot+  * 后端架构为 [[java]] [[https://springdoc.cn/|Spring, Spring Boot]]
   * [[postgresql]]   * [[postgresql]]
 ==== 目录结构 ==== ==== 目录结构 ====
行 21: 行 21:
 ├── img                   --仅一张readme的logo图片 ├── img                   --仅一张readme的logo图片
 ├── application           --主程序,JAVA, Spring, Spring Boot ├── application           --主程序,JAVA, Spring, Spring Boot
 +    └── target              --编译最终结果目录,包含jar包与deb包
 ├── common                --通用的JAVA代码, 包括数据信息结构,消息队列处理等等 ├── common                --通用的JAVA代码, 包括数据信息结构,消息队列处理等等
 ├── dao                   --JAVA 数据库操作相关 ├── dao                   --JAVA 数据库操作相关
行 65: 行 66:
     * 主工程 jar 包依赖 ui-ngx-3.2.0.jar, 运行时首页返回的便是ui-ngx生成的 public/index.html。     * 主工程 jar 包依赖 ui-ngx-3.2.0.jar, 运行时首页返回的便是ui-ngx生成的 public/index.html。
   * gateway 网关类型设备直接推送子设备数据时,可直接按名自动创建子设备,如果子设备被删除,需要网关断开链接再重连(session 重置)才能重新自动创建子设备   * gateway 网关类型设备直接推送子设备数据时,可直接按名自动创建子设备,如果子设备被删除,需要网关断开链接再重连(session 重置)才能重新自动创建子设备
 +  * 默认情况下 Linux 的 1024 以下端口是只有 root 用户才有权限占用, thingsboard 用的 tomcat 默认是以 thingsboard 用户起的,所以用不了 80 端口。目前使用nginx转发来解决。
 +  * ubuntu 手动替换 jar 包升级方式:
 +    * 使用 ''application/target/thingsboard-3.2.x-boot.jar'' 替换目标服务器上的 ''/usr/share/thingsboard/bin/thingsboard.jar''
 +    * 确保 替换后的 ''thingsboard.jar'' 有可执行权限
 +    * 重启服务 ''sudo service thingsboard stop '', ''sudo service thingsboard start''.
  
 ===== 改造 ===== ===== 改造 =====
行 77: 行 83:
     * https://colorhunt.co/palette/134927     * https://colorhunt.co/palette/134927
     * https://colorhunt.co/palette/89958     * https://colorhunt.co/palette/89958
 +  * 导出
 +    * 前端导出 excel 所用到的库 https://github.com/SheetJS/sheetjs
 +    * 样式调整相关:https://segmentfault.com/a/1190000022772664, [[https://blog.wj2015.com/2019/05/01/js-xlsx%E6%94%AF%E6%8C%81%E6%A0%B7%E5%BC%8F/| 这一篇也不错]], 相关库 [[https://github.com/exceljs/exceljs|exceljs]]
 +    * <del>csv: https://github.com/knrz/CSV.js</del>
 +    * 打印,大小:https://www.cnblogs.com/fps2tao/p/10842960.html
 +    * 打印前处理:https://developer.mozilla.org/zh-CN/docs/Web/API/WindowEventHandlers/onbeforeprint
 ===== 性能 ===== ===== 性能 =====
-  * 一百台设备,每个设备每 2 秒发送 4 种数据,大概需要 CPU 4核 2.4G, 内存 4G, 硬盘 1T/年, 服务器带宽 1M+  * 一百台设备,每个设备每 2 秒发送 4 种数据,大概需要 CPU 4核 2.4G, 内存 4G, 硬盘 1T/年, 服务器带宽 10Mb 
 +===== 问题 ===== 
 +  * 版本 3.2.1,规则引擎里,''Post Telemetry'' 类型消息的两个中间处理节点都会间歇性超过最大 CPU 执行时间 (''LOCAL_JS_SANDBOX_MAX_CPU_TIME'' 默认是 8000 ms), 按[[https://thingsboard.io/docs/user-guide/troubleshooting/?scenario=growing-latency|官方文档]],加上了规则引擎执行时间的日志记录,会发现日志里间歇出现 8000ms 或 7999 ms 的执行时间阻塞了整个规则引擎。有可能原因是这个: 
 +     * If you are using ''RETRY_ALL, RETRY_FAILED, RETRY_TIMED_OUT or RETRY_FAILED_AND_TIMED_OUT'' strategy for some rule-engine queue, it is possible that some failed node could block the whole processing of the messages in this queue. 
 +     * 目前解决方式是把引起阻塞问题的两个节点给删掉了,就正常了。具体为什么阻塞还得探究 
  
  • public/it/thingsboard.1612666902.txt.gz
  • 最后更改: 2021/02/07 11:01
  • oakfire