Skip to content

Releases: centrifugal/centrifuge

v0.33.5

25 Dec 09:28
Compare
Choose a tag to compare

What's Changed

  • Fix a deadlock during pub/sub and recovery sync by @FZambia in #439
  • Add missing logs for DisconnectServerError cases by @FZambia in #417
  • Unidirectional connect without automatic error to disconnect transform by @FZambia in #418
  • Add Config.UnidirectionalCodeToDisconnect by @FZambia in #421 - see how Centrifugo uses this feature in Centrifugo docs
  • Strip tokens from logs upon client disconnect by @FZambia and @Dirk007 in #422
  • Strip tokens from logs upon upon client errors by @FZambia in #424
  • Bump dependencies
❯ gorelease -base v0.33.4 -version v0.33.5
# github.com/centrifugal/centrifuge
## incompatible changes
CommandProcessedEvent.Disconnect: removed
## compatible changes
(*Client).ConnectNoErrorToDisconnect: added
CommandProcessedEvent.Error: added
Config.UnidirectionalCodeToDisconnect: added

# summary
v0.33.5 is a valid semantic version for this release.

Full Changelog: v0.33.4...v0.33.5

v0.33.4

06 Oct 14:34
3f2bf3c
Compare
Choose a tag to compare

What's Changed

  • Handle evicted history meta key scenario in Redis broker by @FZambia in #412
  • Fix Fossil delta construction in recovered publications by @FZambia in #415
  • Log connection duration as string by @FZambia in #416
  • Bump github.com/redis/rueidis from 1.0.46 to 1.0.47 by @dependabot in #413
  • Bump github.com/maypok86/otter from 1.2.2 to 1.2.3 by @dependabot in #414

Full Changelog: v0.33.3...v0.33.4

v0.33.3

02 Sep 05:43
Compare
Choose a tag to compare

What's Changed

  • Fix readme example - properly handle Enter key event, see #407
  • Bump github.com/redis/rueidis from 1.0.43 to 1.0.45 by @dependabot in #411
  • Bump github.com/prometheus/client_golang from 1.19.1 to 1.20.2 by @dependabot in #410
  • Bump github.com/maypok86/otter from 1.2.1 to 1.2.2 by @dependabot in #409

Full Changelog: v0.33.2...v0.33.3

v0.33.2

10 Aug 16:34
cfeca34
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.33.1...v0.33.2

v0.33.1

02 Aug 05:28
96afa72
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.33.0...v0.33.1

v0.33.0

27 Jul 11:05
c8d3d36
Compare
Choose a tag to compare

What's Changed

v0.33.0 is a quite massive release of Centrifuge. To highlight some important changes:

  • Delta compression support based on Fossil algorithm. It already serves as Centrifugo feature. Only Javascript SDK (centrifuge-js) supports it for now. Example of usage may be found in Compression playground which was created to evaluate the feature. BTW check out blog post Experimenting with real-time data compression by simulating a football match events which describes the experiment and possible benefits of delta compression in channels – in some cases it can reduce bandwidth dramatically.
  • Support Cache Recovery Mode – a mode in which recovery only restores the latest message in channel. It makes Centrifugo channels to work kind of real-time cache. More motivation can be found in Centrifugo docs - where this feature is already available for some time. With this release users of Centrifuge library can inherit the feature also. See example which demonstrates the usage.
  • Several new helpful metrics were added for greater observability of Centrifuge-based servers (see below)
  • Work on connection and server performance and stability - fixed a couple of possible panics, also race condition which could lead to the incorrect number of clients/subscribers on node, several performance improvements for WebSocket Upgrade process.
  • Options to use multiple brokers and presence managers open a new dimension of flexibility – new way to scale, new way to have different channel properties in different channels within one Centrifuge-based servers cluster.
  • And much more actually, see full changelog below. BTW join our communities if you need any help with the changes.

Now all changes included into v0.33.0 release:

  • chore: fix some typos in comment by @peicuiping in #377
  • Use SliceData and StringData for bytes <-> string conversion by @FZambia in #378
  • Prepared message cache for compression, websocket upgrade performance improvements by @FZambia in #376
  • Cache recovery mode, delta encoding, channel medium layer by @FZambia in #348
  • Option to send server time in connect result by @FZambia in #379
  • Support server time in unidirectional case by @FZambia in #381
  • Add server unsubscribes metric by @FZambia in #383
  • Add example of real-time document sync by @FZambia in #384
  • Option to mark positioned clients with insufficient state if publication lag exceeds threshold by @FZambia in #385
  • Integration tests with DragonflyDB, drop testing with Redis 5 by @FZambia in #386
  • Fix panic on already subscribed error by @FZambia in #390
  • Options to use multiple brokers and presence managers by @FZambia in #394
  • Prevent connection deadlock and improper subscribers count by @FZambia in #395
  • Add centrifuge_client_ping_pong_duration_seconds histogram by @FZambia in #396
  • transport label for ping_pong_duration_seconds by @FZambia in #397
  • Pin to rueidis version without panic due to client use after recycled by @FZambia in #400

New Contributors

❯ gorelease -base v0.32.2 -version v0.33.0
# github.com/centrifugal/centrifuge
## incompatible changes
BrokerEventHandler.HandlePublication: changed from func(string, *Publication, StreamPosition) error to func(string, *Publication, StreamPosition, bool, *Publication) error
## compatible changes
(*Node).HandleControl: added
(*Node).HandleJoin: added
(*Node).HandleLeave: added
(*Node).HandlePublication: added
(*Node).OnCacheEmpty: added
CacheEmptyEvent: added
CacheEmptyHandler: added
CacheEmptyReply: added
ChannelMediumOptions: added
Config.ClientChannelPositionMaxTimeLag: added
Config.ClientConnectIncludeServerTime: added
Config.GetBroker: added
Config.GetChannelMediumOptions: added
Config.GetPresenceManager: added
DeltaType: added
DeltaTypeFossil: added
Publication.Channel: added
Publication.Time: added
PublishOptions.UseDelta: added
RecoveryMode: added
RecoveryModeCache: added
RecoveryModeStream: added
SubscribeOptions.AllowedDeltaTypes: added
SubscribeOptions.RecoveryMode: added
WebsocketConfig.CompressionPreparedMessageCacheSize: added
WithDelta: added
WithRecoveryMode: added

# summary
v0.33.0 is a valid semantic version for this release.

Full Changelog: v0.32.2...v0.33.0

v0.32.2

02 May 05:14
567fb8a
Compare
Choose a tag to compare

What's Changed

  • Fix unsubscribe during inflight subscribe in goroutine by @FZambia in #372
  • Up redis/rueidis to v1.0.35

Full Changelog: v0.32.1...v0.32.2

v0.32.1

07 Apr 04:43
3034cf7
Compare
Choose a tag to compare

What's Changed

  • Fix WebSocket compression (io: read/write on closed pipe) in JSON protocol case, see commit in centrifugal/protocol
  • Delay initial timer schedule until all ops set by @FZambia in #369 - fixes occasional panic in tests
  • Reuse connection timer by @FZambia in #349 - a minor performance optimization
  • Dependencies updated

Full Changelog: v0.32.0...v0.32.1

v0.32.0

14 Mar 06:35
23c243d
Compare
Choose a tag to compare

What's Changed

  • Fix: per channel meta ttl for in memory broker by @FZambia in #366. Memory broker did not properly inherit history meta TTL provided on per-call basis - was only looking at globally configured. Now it's fixed

Full Changelog: v0.31.0...v0.32.0

v0.31.0

02 Mar 10:22
dbce3c1
Compare
Choose a tag to compare

What's Changed

This is quite a huge release. It has several backwards incompatible changes: in PresenceManager and Broker interfaces. Also, SockJS transport was removed. And several nice improvements are here. Check out the details below.

Notable changes

  • ❗Embed Gorilla Websocket to Centrifuge internal package by @FZambia in #354 . This was an unfortunate but weighted decision due to poor maintenance of Gorilla WebSocket these days. See the exact motivation in #353.
  • ❗SockJS transport was removed - see #352. Note, that since transport in Centrifuge is pluggable - you can still use SockJS in your projects if you need it. You can take SockJS transport implementation from Centrifugo (which is required to keep SockJS until v6 - that's why we still have it there).
  • 🔥 Addition of Idempotency key for Publish API by @FZambia in #336 . Centrifuge keeps publications with idempotency key set in cache for 5 mins by default and drops publications with the same key. See WithIdempotencyKey and WithIdempotentResultTTL. Check out how this could be useful in practice in Centrifugo chat/messenger tutorial. This required change in Broker interface Publish method (should not affect most users until they use custom Broker, but simple to adopt otherwise)
  • 🔥 Maintain user mapping in Redis to speed up presence stats significantly by @FZambia in #343 . This required changes in PresenceManager interface (should not affect most users until they use custom PresenceManager, but simple to adopt otherwise). But the benefit is that we have new option for RedisPresenceManager called EnableUserMapping - this allows increasing performance of PresenceStats call drastically. For channels with huge amount of subscribers the benefit may be up to 10000x better performance. Though more memory may be required on Redis side (up to 2x) since Centrifuge keeps additional data structure in that case. See also related discussion in Centrifugo
  • 🐍 Python real-time SDK - this is a 6th official real-time SDK in Centrifugal ecosystem. We had this SDK for old versions of Centrifuge/Centrifugo – but now it was revived for the latest protocol and supports all major Centrifugal protocol features.

Other changes

  • Increments cristalhq/jwt to v5 by @shyce in #351
  • All dependencies bumped to latest versions

New Contributors ❤️

All API additions/changes

Using gorelease tool:

❯ gorelease -base v0.30.6 -version v0.31.0
# github.com/centrifugal/centrifuge
## incompatible changes
(*MemoryBroker).Publish: changed from func(string, []byte, PublishOptions) (StreamPosition, error) to func(string, []byte, PublishOptions) (StreamPosition, bool, error)
(*MemoryPresenceManager).RemovePresence: changed from func(string, string) error to func(string, string, string) error
(*RedisBroker).Publish: changed from func(string, []byte, PublishOptions) (StreamPosition, error) to func(string, []byte, PublishOptions) (StreamPosition, bool, error)
(*RedisPresenceManager).RemovePresence: changed from func(string, string) error to func(string, string, string) error
Broker.Publish: changed from func(string, []byte, PublishOptions) (StreamPosition, error) to func(string, []byte, PublishOptions) (StreamPosition, bool, error)
NewSockjsHandler: removed
PresenceManager.RemovePresence: changed from func(string, string) error to func(string, string, string) error
SockjsConfig: removed
SockjsHandler: removed
## compatible changes
PublishOptions.IdempotencyKey: added
PublishOptions.IdempotentResultTTL: added
PublishResult.FromCache: added
RedisBrokerConfig.SkipPubSub: added
RedisPresenceManagerConfig.EnableUserMapping: added
WithIdempotencyKey: added
WithIdempotentResultTTL: added

# summary
v0.31.0 is a valid semantic version for this release.

Full Changelog: v0.30.6...v0.31.0