Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sofa-dashboard-client 功能及模块改造 #16

Open
glmapper opened this issue Jun 20, 2019 · 13 comments
Open

sofa-dashboard-client 功能及模块改造 #16

glmapper opened this issue Jun 20, 2019 · 13 comments

Comments

@glmapper
Copy link
Collaborator

随着 sofa-dashboard-client 的功能点越来越来,也希望通过以更加标准化的方式提供出去(starter 的方式),sofa-dashboard-client 将进行一定的功能模块拆分:

  • sofa-dashboard-client-core
  • sofa-dashboard-client-extention-impl
  • sofa-dashboard-client-support
  • dashboard-client-sofa-boot-starter
@glmapper
Copy link
Collaborator Author

@chpengzh

@chpengzh
Copy link
Member

I'll take this part.

@chpengzh
Copy link
Member

目前已经完成模块重组部分的功能, 修改后结果为:

模块定义

|-core(facade定义)

|-core-impl(facade主要实现)
    |-spring-actuator-dimension(基于spring-actuator的数据埋点)
    |-zookeeper-registry(应用实例会话读写)

|-extension-impl(拓展实现, 未来支持拓展不同的实现)
    |-mysql-store

|-sofa-boot-projects(SpringBoot装配, 未来会拓展不同的starter-data-xxx)
    |-sofa-boot
    |-sofa-boot-starter

关于上报

上报(写库)策略目前使用的是定时器方式,考虑到错峰,使用自然分布的随机值进行周期性上报;

默认启动写入延时期望为 30s, 上报周期为 60s, 由Env参数控制

现在比较困惑的是上报数据信息该采集哪些内容并如何高效地存取,希望给点意见。

现在采集的信息模型大致是:

field type desc
id big int primary key auto inc 自增主键
timestamp big int 时间戳
dimension_name string 数据指标名称(如: thread_summary, memory 等)
instance_id string 应用唯一标识(service_name + ip + port)
dimension_value string 数据指标序列化值

@chpengzh
Copy link
Member

@glmapper
Copy link
Collaborator Author

数据上报 reporter 的方式目前希望是报给 redis,当然可以扩展到 ES / DB 或者 内存。客户端提供以 SPI 的方式扩展上报机制

@glmapper
Copy link
Collaborator Author

mysql-store

这个 mysql store 的作用的是什么

@chpengzh
Copy link
Member

store就是一个扩展存储实现

@chpengzh
Copy link
Member

只是之前不知道默认应该拓展哪个平台的实现就尝试随便写了一个,我改成redis的实现吧。

@glmapper
Copy link
Collaborator Author

store就是一个扩展存储实现

这个应该不用吧,出于什么考虑呢?可以给个具体的场景描述

@chpengzh
Copy link
Member

chpengzh commented Jul 1, 2019

这个特性的demo现在完成了,涉及到3个项目:

https://github.com/chpengzh/sofa-dashboard/tree/optimize-application (branch optimize-application)
https://github.com/chpengzh/sofa-dashboard-client-demo
https://github.com/chpengzh/sofa-dashboard-client (branch master)

  • 本地需要启动redis服务,端口 6379
  • client未上报时,dashboard数据为空,这个时候前端还未处理判空异常
  • redis现在还未处理数据超时配置

@glmapper
Copy link
Collaborator Author

glmapper commented Jul 1, 2019

这个特性的demo现在完成了,涉及到3个项目:

https://github.com/chpengzh/sofa-dashboard/tree/optimize-application (branch optimize-application)
https://github.com/chpengzh/sofa-dashboard-client-demo
https://github.com/chpengzh/sofa-dashboard-client (branch master)

  • 本地需要启动redis服务,端口 6379
  • client未上报时,dashboard数据为空,这个时候前端还未处理判空异常
  • redis现在还未处理数据超时配置

嗯,跑了一下,功能是OK 的,我这边尽快吧 UI 那块搞定,这部分等 UI 弄好之后再合,应用面板展示有比较大的改动

@chpengzh
Copy link
Member

chpengzh commented Jul 1, 2019

这条分支修改配置了一个swagger,如果前端同学要合作,可以在启动后访问 http://localhost:8099/swagger-ui.html 查看当前实现的接口文档

@zerochina2020
Copy link

@glmapper 能否修改一下README,与改造后保持一致,并且上传包到maven仓库,避免大家走弯路,感谢。
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants