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

Cache recovery mode, delta encoding, channel medium layer #348

Merged
merged 70 commits into from
May 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
2b2306e
start prototyping
FZambia Dec 26, 2023
ada4d62
use subscribe option
FZambia Jan 1, 2024
d61d348
checkout changes
FZambia Jan 1, 2024
b828a68
do not add epoch from request to result
FZambia Jan 1, 2024
f512467
new skip pub rules
FZambia Jan 1, 2024
72d5f23
only include own offset to res in case of stream recovery mode
FZambia Jan 1, 2024
c0020c4
always include own offset to res
FZambia Jan 1, 2024
af7b2d0
start prototype
FZambia Mar 12, 2024
7d9e75b
prototyping
FZambia Mar 21, 2024
8917541
prototyping
FZambia Mar 23, 2024
76b3595
Merge branch 'master' into last_message_recovery
FZambia Mar 23, 2024
cf24c44
Merge branch 'sync' into last_message_recovery
FZambia Mar 23, 2024
3221564
continue prototyping
FZambia Mar 25, 2024
05421b4
work on delta and cache recovery mode
FZambia Mar 31, 2024
930c5fc
up go version
FZambia Mar 31, 2024
fcac0e5
fix list lua
FZambia Mar 31, 2024
a7a5c99
tidy go mod
FZambia Apr 1, 2024
d491b61
compression playground
FZambia Apr 8, 2024
265d73c
experiments
FZambia Apr 9, 2024
bd44837
experiments
FZambia Apr 9, 2024
b668b5b
make redis work
FZambia Apr 15, 2024
3c02f7f
experimental channel cache layer
FZambia Apr 22, 2024
a70fff2
various fixes
FZambia Apr 22, 2024
c215a30
Merge branch 'master' into last_message_recovery
FZambia Apr 22, 2024
e6d51c6
various adjustments
FZambia Apr 26, 2024
c22500c
try using js data
FZambia Apr 28, 2024
2f5234d
js data
FZambia Apr 29, 2024
c58213e
effective json string, tests
FZambia Apr 29, 2024
2bc1a24
fix lint
FZambia Apr 29, 2024
ddd8e2e
pin to latest protocol
FZambia Apr 29, 2024
b9b5b8d
move cache empty handler to node
FZambia May 1, 2024
d4699c7
cache empty handler returns error
FZambia May 1, 2024
90dae90
define revisited channel cache
FZambia May 4, 2024
32da6b5
channel layer, optional delta negotiation
FZambia May 5, 2024
9a59a69
channel layer, optional delta negotiation
FZambia May 5, 2024
b80c43f
minor cleanups
FZambia May 5, 2024
5b171fb
rename to medium
FZambia May 5, 2024
b7c82a8
test fix
FZambia May 6, 2024
ac0b9c8
Merge branch 'master' into last_message_recovery
FZambia May 6, 2024
4afdc3d
Merge branch 'master' into last_message_recovery
FZambia May 6, 2024
76f6376
change js protobuf port
FZambia May 7, 2024
8734d7b
fill the table
FZambia May 8, 2024
bdc677a
Merge branch 'master' into last_message_recovery
FZambia May 8, 2024
2bef700
Merge branch 'master' into last_message_recovery
FZambia May 8, 2024
4562794
Merge branch 'last_message_recovery' of github.com:centrifugal/centri…
FZambia May 8, 2024
1900439
use beta centrifuge-js, json over json with delay
FZambia May 8, 2024
9c05b51
cleanups
FZambia May 8, 2024
0a60351
fixe examples
FZambia May 8, 2024
0564cec
add tests, atomic delta in memory broker
FZambia May 9, 2024
dbe04c0
add tests, cleanups
FZambia May 9, 2024
e966135
add tests
FZambia May 9, 2024
acbb817
cleanups
FZambia May 10, 2024
c0417e3
tests for cache recovery
FZambia May 10, 2024
03205ad
better comments
FZambia May 11, 2024
9dc0dc0
proper delta broadcast
FZambia May 11, 2024
9ebc7f2
update broadcast bench
FZambia May 11, 2024
a721e23
optimize broadcast
FZambia May 11, 2024
9ade05b
fix using medium latestPublication
FZambia May 11, 2024
6dac13b
disable delta for offset with no positioning case
FZambia May 12, 2024
bef4b19
fix redis tests
FZambia May 12, 2024
caedca7
fix test
FZambia May 12, 2024
240e132
cleanups
FZambia May 12, 2024
10379b5
cleanups
FZambia May 12, 2024
1132a4b
pin to latest protocol
FZambia May 14, 2024
7cc3274
up deps
FZambia May 14, 2024
40dd975
up protobuf
FZambia May 14, 2024
c7b9733
Merge branch 'master' into last_message_recovery
FZambia May 14, 2024
09b64ec
only find prev payload if needed in list add
FZambia May 14, 2024
137092d
recovery mode cache example
FZambia May 15, 2024
4e575c4
example readmr
FZambia May 15, 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
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ Library highlights:
* Possibility to register a custom PUB/SUB Broker and PresenceManager implementations
* Option to register custom Transport, like [Centrifugo does with WebTransport](https://centrifugal.dev/docs/transports/webtransport)
* Message recovery mechanism for channels to survive PUB/SUB delivery problems, short network disconnects or node restart
* Cache channels – a way to quickly deliver latest publication from channel history to the client upon subscription
* Delta compression for publications inside a channel to reduce bandwidth usage
* Out-of-the-box Prometheus instrumentation
* Client SDKs for main application environments all following [single behaviour spec](https://centrifugal.dev/docs/transports/client_api) (see list of SDKs below).

Expand Down
2 changes: 1 addition & 1 deletion _examples/chat_json/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@
// subscribe on channel and bind various event listeners. Actual
// subscription request will be sent after client connects to
// a server.
const sub = centrifuge.newSubscription(channel);
const sub = centrifuge.newSubscription(channel, {});

sub.on("publication", handlePublication)
.on("join", handleJoin)
Expand Down
3 changes: 2 additions & 1 deletion _examples/chat_json/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,11 +250,12 @@ func main() {

server := &http.Server{
Handler: mux,
Addr: ":" + strconv.Itoa(*port),
Addr: "127.0.0.1:" + strconv.Itoa(*port),
ReadTimeout: 10 * time.Second,
WriteTimeout: 10 * time.Second,
}

log.Print("Starting server, visit http://localhost:8000")
go func() {
if err := server.ListenAndServe(); err != nil && !errors.Is(err, http.ErrServerClosed) {
log.Fatal(err)
Expand Down
Loading
Loading