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

experimental: sse client support #592

Merged
merged 57 commits into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
eee1483
streaming-spike: dummy impl of streaming receiver
thomasheartman Dec 2, 2024
8ac5e4f
simpler cargo update
thomasheartman Dec 2, 2024
644debd
streaming-spike: remove full token
thomasheartman Dec 2, 2024
fc63a16
streaming-spike: satisfy clippy
thomasheartman Dec 2, 2024
a69eeac
wip: set up streaming per token
thomasheartman Dec 3, 2024
25a0227
streaming-spike: disable polling, only stream
thomasheartman Dec 3, 2024
4822888
streaming-spike: use url from client
thomasheartman Dec 3, 2024
dd43a4d
streaming-spike: minor cleanup
thomasheartman Dec 3, 2024
38e09fe
streaming-spike: add retries
thomasheartman Dec 3, 2024
a63e531
streaming-spike: add /client/streaming endpoint
thomasheartman Dec 4, 2024
95ad05a
streaming-spike: impl streaming with actix web lab
thomasheartman Dec 4, 2024
232c978
streaming-spike: send whole feature set at interval
thomasheartman Dec 4, 2024
a207957
streaming-spike: improve handling of events
thomasheartman Dec 4, 2024
280c6a5
streaming-spike: explicit comment handling
thomasheartman Dec 4, 2024
00c42e8
streaming-spike: dirty impl of broadcaster
thomasheartman Dec 5, 2024
c798ba1
streaming-spike: broadcast fewer errors
thomasheartman Dec 5, 2024
e44e7be
streaming-spike: verrrry rough rebroadcast
thomasheartman Dec 5, 2024
9aeaa53
streaming-spike: rebroadcast streaming updates
thomasheartman Dec 5, 2024
41beb29
streaming-spike: prepare to send message on connection
thomasheartman Dec 5, 2024
0227a51
streaming-spike: send data on connection
thomasheartman Dec 5, 2024
2abc296
streaming-spike: remove redundant ping
thomasheartman Dec 5, 2024
f19be5a
broken: don't use this
thomasheartman Dec 5, 2024
323ff96
fix: unbreak edge; add comments
thomasheartman Dec 5, 2024
ae70a59
extremely cursed immpl of working filters
thomasheartman Dec 5, 2024
e097a90
simplify builder
thomasheartman Dec 6, 2024
0d65761
wip: (broken) use active_connections hash map
thomasheartman Dec 6, 2024
74fab32
fix: make edge compile again
nunogois Dec 6, 2024
11423b9
refactor: remove unused code
nunogois Dec 6, 2024
3072217
refactor: remove unused, fix client_api tests
nunogois Dec 6, 2024
ba0f10b
fix: use tokio::spawn instead of actix_web::rt::spawn in spawn_ping
nunogois Dec 6, 2024
9c86270
only compile streaming conditionally
thomasheartman Dec 6, 2024
1d5d138
also conditionally compile tests
thomasheartman Dec 6, 2024
a3da33c
only start polling if you're not streaming
thomasheartman Dec 6, 2024
8f28edd
Merge branch 'main' into streaming-spike
thomasheartman Dec 6, 2024
3915279
start switch to dashmap
thomasheartman Dec 11, 2024
7307625
remove comments and old comments
thomasheartman Dec 11, 2024
d29e105
streaming-spike: remove parking lot from deps
thomasheartman Dec 11, 2024
7c855e6
make new dependencies optional
thomasheartman Dec 11, 2024
ed10879
return a client cache error if it isn't ready
thomasheartman Dec 11, 2024
7c03c5a
return result from connect
thomasheartman Dec 11, 2024
36d6efd
stopgap
thomasheartman Dec 11, 2024
481acce
remove futures_util
thomasheartman Dec 11, 2024
057f174
simplify some types
thomasheartman Dec 11, 2024
b98b859
bump log to info
thomasheartman Dec 11, 2024
5730e18
add streaming url to urls
thomasheartman Dec 11, 2024
d17c000
fix a url bug
thomasheartman Dec 11, 2024
82aec30
move broadcasting into features updated
thomasheartman Dec 11, 2024
73b2c07
don't unwrap serialization
thomasheartman Dec 11, 2024
606ec0d
print some kind of error message
thomasheartman Dec 11, 2024
4c151c9
remove comment
thomasheartman Dec 11, 2024
9b7d3e8
Merge branch 'main' into streaming-spike
thomasheartman Dec 11, 2024
e6645d5
Update server/src/http/broadcaster.rs
thomasheartman Dec 12, 2024
81aa0e1
comments from PR
thomasheartman Dec 12, 2024
f55bef8
use resolve_features
thomasheartman Dec 12, 2024
b4e72fb
use a match instead
thomasheartman Dec 12, 2024
2c66bc6
use a reference for creating data
thomasheartman Dec 12, 2024
b54158a
move broadcaster to not clone
thomasheartman Dec 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
189 changes: 185 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ repository = "https://github.com/Unleash/unleash-edge"
rust-version = "1.81.0"
version = "19.6.3"

[features]
streaming = ["actix-web-lab", "eventsource-client", "tokio-stream"]

[package.metadata.wix]
upgrade-guid = "11E5D83A-3034-48BB-9A84-9F589EBD648C"
path-guid = "6F606A3B-C7E9-43EC-8B6E-91D7B74F80FC"
Expand All @@ -30,6 +33,7 @@ actix-http = "3.9.0"
actix-middleware-etag = "0.4.2"
actix-service = "2.0.2"
actix-web = { version = "4.9.0", features = ["rustls-0_23", "compress-zstd"] }
actix-web-lab = { version = "0.23.0", optional = true }
ahash = "0.8.11"
anyhow = "1.0.91"
async-trait = "0.1.83"
Expand All @@ -41,6 +45,7 @@ cidr = "0.3.0"
clap = { version = "4.5.19", features = ["derive", "env"] }
clap-markdown = "0.1.4"
dashmap = "6.0.1"
eventsource-client = { version = "0.13.0", optional = true }
futures = "0.3.30"
futures-core = "0.3.30"
iter_tools = "0.24.0"
Expand Down Expand Up @@ -88,6 +93,7 @@ tokio = { version = "1.42.0", features = [
"tracing",
"fs",
] }
tokio-stream = { version = "0.1.16", optional = true }
tracing = { version = "0.1.40", features = ["log"] }
tracing-subscriber = { version = "0.3.18", features = ["json", "env-filter"] }
ulid = "1.1.2"
Expand Down
Loading
Loading