Skip to content

shiguredo/kohaku-legacy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WebRTC Stats Collector Kohaku (Legacy)

Important

新しく Kohaku を使う方は DuckDB と Grafana を組み合わせた https://github.com/shiguredo/kohaku をご利用ください。

GitHub tag (latest SemVer) License

About Shiguredo's open source software

We will not respond to PRs or issues that have not been discussed on Discord. Also, Discord is only available in Japanese.

Please read https://github.com/shiguredo/oss/blob/master/README.en.md before use.

時雨堂のオープンソースソフトウェアについて

利用前に https://github.com/shiguredo/oss をお読みください。

WebRTC Stats Collector Kohaku について

Caution

Kohaku 2023.1.2 では Sora の統計ウェブフック機能を利用します。 統計エクスポーターは利用できません。

Caution

Kohaku 2023.1.1 では Sora の統計エクスポーター機能を利用します。 統計ウェブフックは利用できません。

Kohaku はクライアントと Sora の統計情報を Sora の統計ウェブフックを受け取り、整理してタイムシリーズデータベースに格納するゲートウェイです。タイムシリーズデータベースは TimescaleDB のみに対応しています。

特徴

  • Sora から統計ウェブフック経由でクライアントの統計情報を受け取り TimescaleDB (TSDB) に格納します
  • WebRTC 統計 API に対応しています
    • ブラウザは最新 Chrome / Firefox / Safari / Edge へ対応
    • Sora SDK は iOS / Android / Unity / C++ / Python に対応
    • WebRTC Native Client Momo に対応
  • クライアントは Sora に統計情報を送るだけでよくなるため、どこかのサーバに対して接続などが不要になります
  • すべての統計情報を Sora の Channel ID と Connection ID と関連付けて保存するため問題の追跡がしやすくなります
  • Grafana ダッシュボードを用意

Grafana ダッシュボード

すぐに使い始められるように Grafana ダッシュボードを作り込んであります。 接続一覧からコネクション ID をクリックすると受信した音声や映像(inbound-rtp)の統計情報が確認できます。

Image from Gyazo

Image from Gyazo

使ってみる

Kohaku を使ってみたい人は USE.md をお読みください。

シーケンス

sequenceDiagram
  participant C as クライアント
  participant S as Sora
  participant K as Kohaku
  participant T as TimescaleDB
  participant G as Grafana
  note over K,T: DB 接続済み
  note over C,S: WebRTC 確立済み
  S->>+C: type: stats-req
  C->>-S: type: stats<br>WebRTC 統計情報
  S->>K: 統計ウェブフック (HTTP/1.1 + JSON)
  K->>T: INSERT TO ...
  G->>T: SELECT ...
  T->>G: 結果
  S->>+C: type: stats-req
  C->>-S: type: stats<br>WebRTC 統計情報
  S->>K: 統計ウェブフック (HTTP/1.1 + JSON)
  K->>T: INSERT TO ...
Loading

ライセンス

Apache License 2.0

Copyright 2021-2025, Hiroshi Yoshida (Original Author)
Copyright 2021-2025, Shiguredo Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

About

WebRTC Stats Collector Kohaku

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 5