3

1214 - 替代 Google Events 的服务

 8 months ago
source link: https://atjason.com/daily/2023-12-14.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

1214 - 替代 Google Events 的服务

2023-12-14

| 每天写一点

之前非常依赖 Google Analysis 中的 Events,记录 App 中的典型行为。而 Google Analysis 升级后,Events 变得不好用了,就打算自己做一下。

经过比较和朋友推荐,数据库选择 Timescale DB,也就是在 PostgreSQL 基础上,加插件实现的时序数据库,特点时查询速度快。

  • 在 Docker 中运行 TimescaleDB
  • 按照官方文档,把简单用法跑一遍
  • 结合 Node.js,实现数据库的插入
  • 使用 Caddy,实现插入服务的反代
  • 使用 Cloudflare,实现 CDN 访问
  • 使用 Grafana,实现数据的可视化

要跑通这么个小产品,用到的东西真不少。

目前已经记录几十万的 Events,目测正常。


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK