Commit Graph

60 Commits

Author SHA1 Message Date
Sean DuBois
702e562f9f Add SIP Support (#2240) 2023-11-14 14:24:54 -05:00
David Colburn
57643a42ed Agents enabled check (#2227)
* agents enabled check

* participant -> publisher

* nil check client

* add NumConnections

* add lock around agent check

* do not launch agents against other agents

* regen

* don't need atomic anymore

* update protocol
2023-11-07 19:19:07 -08:00
David Colburn
60374c6402 Agents (#2203)
* agents

* add test

* undo name changes

* remove debug logs

* fixes

* fix data race in test
2023-11-03 11:43:35 -07:00
Paul Wells
de7532b5a1 split room and participant services (#2205)
* merge

* tidy

* deps
2023-10-31 21:28:21 -07:00
Paul Wells
325e5ca753 add psrpc room service (#2171)
* add psrpc room service

* update deps

* disable by default

* feedback

* config

* test
2023-10-22 22:49:38 -07:00
David Colburn
62b057b4c1 Egress store/IO cleanup (#2152)
* egress store cleanup

* client wrapper, regenerate

* put WithClusterID back

* rename clent

* infinite loops

* client wrapper -> interface

* remove StopEgress update

* remove Update from IOClient

* avoid duplicate EgressStarted events

* update protocol
2023-10-18 14:48:51 -07:00
David Zhao
0b0431b765 Per-session TURN credentials (#2080)
Switching to using session specific TURN credentials instead of shared
credentials per Room. Also eliminates need to load Room from Redis
during TURN authentication
2023-09-17 10:08:35 -07:00
David Zhao
981fb7cac7 Adding license notices (#1913)
* Adding license notices

* remove from config
2023-07-27 16:43:19 -07:00
kannonski
cf4801064d changing key file permissions control (#1893) 2023-07-19 14:23:30 -07:00
David Colburn
0a3c22993e Remove deprecated egress client (#1701)
* remove deprecated egress client

* don't copy mutex
2023-05-09 16:54:32 -07:00
David Zhao
40ceddd18b Integrate QueuedNotifier, fixes out-of-order delivery (#1615) 2023-04-15 01:20:23 -07:00
Paul Wells
2c93d55e5c add stream retry middleware for signalling (#1503) 2023-03-08 00:51:19 -08:00
Paul Wells
e22de045ba add signal psrpc service (#1485)
* add signal psrpc service

* update protocol dep

* refactor for cloud

* update psrpc

* pr feedback
2023-03-03 15:49:46 -08:00
Paul Wells
b35d64ae86 finish timed version migration (#1443)
* finish timed version migration

* update protocol dep
2023-02-18 12:08:08 -08:00
David Colburn
6da9e85636 Remove deprecated ingress rpc (#1439)
* remove legacy ingress rpcs

* remove from io service
2023-02-17 11:40:38 -08:00
David Colburn
10c53e0ebb Move psrpc to protocol (#1426)
* move psrpc to protocol

* update checks

* update protocol

* update protocol ref

* blank line
2023-02-15 16:47:38 -08:00
David Zhao
ea12e1477f Update to go-redis v9. Fixed Redis cluster support (#1415)
* Update to go-redis v9. Fixed Redis cluster support
2023-02-12 22:22:21 -08:00
David Colburn
a87107a0f3 IOInfo service (#1305)
* IOInfo service

* only start if not nil

* use ctx in updateEgressInfo

* updates

* fix merge
2023-01-16 16:26:03 -08:00
David Zhao
17236799bb Fix handling of non-monotonic timestamps (#1304)
* Fix handling of non-monotonic timestamps

Timed version is inspired by Hybrid Clock. We used to have a mixed behavior
by using time.Time:
* during local comparisons, it does increment monotonically
* when deserializing remote timestamps, we lose that attribute

So it's possible for two requests to be sent in the same microsecond, and
for the latter one to be dropped.

To fix that behavior, I'm switching it to keeping timestamps to consolidate
that behavior, and accepting multiple updates in the same ms by incrementing ticks.

Also using @paulwe's idea of a version generator.
2023-01-12 11:57:26 -08:00
Paul Wells
a052ebd644 Ingress psrpc (#1295)
* add ingress psrpc codegen

* use psrpc for ingress

* merge entity/info update psrpc services

* split update/delete ingress methods

* add race helper test

* add race context cancel test

* sync race result with mutex
2023-01-12 11:00:43 -08:00
Benjamin Pracht
7778cdf2cd Do not use the egress version stored in redis to decide whether to enable PsRPC. Use a conf entry instead (#1262) 2022-12-30 09:32:55 +13:00
David Colburn
6719a3c714 Updated egress rpc (#1252)
* updated egress rpc

* check if egress exists on stop

* fix static check

* remove old migration code

* rename

* regenerate, update test

* latest staticcheck

* update to psrpc 0.1.0

* fix tests

* dual write rpcs on running egress

* remove unused field

* fix race, change service for egress impl

* return nil if bus is nil

* id -> ids

* add affinityFunc to StartEgress
2022-12-22 21:03:27 -08:00
David Zhao
14de2bec9c Fixed single-node routing breakage. (#1209)
* Fixed single-node routing breakage.

Due to a regression of a previous change, Redis was always enabled even
when no configuration was provided.

* updated go modules
2022-12-04 16:23:35 -08:00
David Zhao
12ae179be2 Configurable RoomService execution timeout (#1206)
* API execution timeout is now configurable

In certain environments, it can take longer than the default 2s to
fully execute API requests. Making execution timeout a configurable option.

* do not expose api to YAML. internal for now.
2022-12-04 10:13:09 -08:00
Tom Xiong
e5dabd466e Support redis cluster mode (#1181)
* use redisConfig of protocol instead of redisConfig and use redis of protocol to create redis client to support redis cluster mode too
2022-11-22 10:36:43 -08:00
Benjamin Pracht
c735668f67 Use the redis.UniversalClient interface instead of *redis.Client when interacting with go-redis (#1149)
* Use the redis.UniversalClient interface instead of *redis.Client when interacting with go-redis

* Update protocol to v1.2.1
2022-11-07 17:27:28 -08:00
David Colburn
803046b882 Auto egress (#1011)
* auto egress

* fix room service test

* reuse StartTrackEgress

* add timestamp

* update prefixed filename explicitly

* update protocol

* clean up telemetry

* fix telemetry tests

* separate room internal storage

* auto participant egress

* remove custom template url

* fix internal key

* use map for stats workers

* remove sync.Map

* remove participant composite
2022-09-21 12:04:19 -07:00
Benjamin Pracht
d8edb9b2e7 Adopt Ingress RPC interface changes (#972) 2022-08-31 14:14:40 -07:00
cnderrauber
c401ca58af turn packet and bytes stats used for telemetry and load control (#969)
* stats for turn

* add connections stats

* stats for standalone turn server only

* wire update
2022-08-31 11:00:27 +08:00
Benjamin Pracht
c333b7a026 Add support for Ingress service (#868)
Also check for Join permission on ingress API calls
2022-08-04 09:48:53 -07:00
David Colburn
7aa5888338 Keep egress info for 24h (#856)
* Keep egress info for 24h

* updates

* better version comparison

* fix test

* duplicated if
2022-07-28 20:27:59 -05:00
David Colburn
0ab4379c5c Separate egress/ingress storage (#855) 2022-07-28 17:01:33 -05:00
David Zhao
53f51c8cb0 Logging cleanup (#843)
* Logging cleanup

Changes log levels to better match significance

* fix lock
2022-07-21 00:39:49 -07:00
David Colburn
fbbcbe77df Remove recording (#811)
* remove recorder service

* update protocol
2022-07-05 18:39:32 -07:00
David Colburn
4be096cf74 Update egress RPC handler (#759)
* egress rpc handler

* add egress statuses

* nil redis client

* update protocol
2022-06-13 12:18:17 -07:00
Brint E. Kriebel
5a74c1695d Add support for Redis Sentinel (#707) 2022-05-28 10:26:58 -07:00
cnderrauber
3352ee6b79 add size limit to metadata of room & participant (#566)
* add size limit to metadata of room & participant

* description in config-sample

* solve comments
2022-03-25 12:48:11 +08:00
David Colburn
13c91678bf Remove egress store (#552)
* Remove egress store

* fix imports
2022-03-22 12:37:31 -07:00
cnderrauber
4bc03d8435 Client configuration (#452)
* client configuration

* fix init roommanager
2022-03-03 18:26:14 +08:00
Alex Beattie
96654e164a support Redis TLS Connection (#482)
* Add TLS for Redis connection

* Update to add tls flag
2022-03-02 22:17:29 -08:00
David Colburn
20f21cce2b Egress (#455)
* egress updates

* pass egressInfo to delete

* update typefakes

* export StartEgress

* update protocol

* new rpc, rename stores

* add json tag

* update tests

* update protocol
2022-02-24 14:57:14 -08:00
David Zhao
52fc53d325 Issue updated tokens to clients. (#365)
This ensures client reconnect attempts would be successful for long running rooms. It also fixes inaccurate permissions that were set incorrectly when full reconnections take place.
2022-01-23 23:15:49 -08:00
Raja Subramanian
1dcc62b569 SubscribedQualityUpdate message (#270)
* WIP commit

* SubscribedQualityUpdate message to send list of currently subscribed
qualities for a simulcast video publisher

* Correct subscriberID

* goimports

* Do quality update on add/remove of subscribed track

* do not update quality when admin mute is active

* update quality on admin unmute

* Update protocol version

* Simplify max subscribed quality loop per David's suggestion
2021-12-19 12:41:40 +05:30
David Colburn
faa870de3d Move callbacks out of messageRouter (#269)
* move callbacks out of messageRouter

* OCD

* more OCD

* fix forwarder test

* even more OCD

* maximum OCD

* package name collision, copy lock by value
2021-12-17 13:19:23 -08:00
David Zhao
2d93ccd668 Updated protocol from protocol/proto -> protocol/livekit (#242)
* Updated protocol from protocol/proto -> protocol/livekit

* separate MediaTrack from PublishedTrack
2021-12-08 13:58:38 -08:00
David Zhao
c00d799ac6 Fixed permission handling with room deletion (#233) 2021-12-03 14:27:13 -08:00
David Colburn
991c334d2d telemetry interfaces (#210)
* telemetry interfaces

* move AddUptrack under stats

* regenerate

* a space

* consistency

* fix test
2021-11-24 17:58:04 -08:00
David Colburn
95e29d3766 Interface updates (#194)
* update interfaces, a bit of cleaning

* regenerate

* return interface for RoomService

* export packetBufferSize

* update router interface

* move participant key into router

* change locks back

* read only room store

* fix server rm locks

* update SendJoinResponse

* clean up imports

* update room messaging

* regenerate
2021-11-15 15:25:50 -06:00
David Colburn
289ebd32ff Telemetry refactor (#172)
* telemetry refactor

* fix imports

* update protocol
2021-11-08 20:00:34 -06:00
Mathew Kamkar
f3e916e2fe Room Allocator Interface (#161)
* room allocator interface

* remove wire bind

* fix test
2021-10-28 21:02:17 -07:00