Skip to content

Releases: centrifugal/centrifuge

v0.29.1

15 Apr 14:08
d18de41
Compare
Choose a tag to compare
  • Add ForceRESP2 option for RedisShardConfig. If set to true forces using RESP2 protocol for communicating with Redis. By default, Redis client tries to detect supported Redis protocol automatically trying RESP3 first.
gorelease -base v0.29.0 -version v0.29.1
# github.com/centrifugal/centrifuge
## compatible changes
RedisShardConfig.ForceRESP2: added

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

Full Changelog: v0.29.0...v0.29.1

v0.29.0

12 Apr 17:43
94c5b86
Compare
Choose a tag to compare

This release contains several breaking changes.

  • Removing client protocol v1 and all related parts, see #275 for more details. If you are using the latest SDK versions - this should not affect you.
  • Possibility to configure history meta TTL on a per-channel level, #264. This is optional and global history TTL value may be set over Config.HistoryMetaTTL option. By default, it's 30 days.
  • One shot encode/decode for control proto #263. Note that with this change all nodes in your Centrifuge cluster should be v0.29.0 to work properly. Do not mix nodes based on Centrifuge < v0.29.0 with nodes based on Centrifuge v0.29.0.
  • Add client level ping config, remove AppLevelPing #286 by @bfwbbrj.
❯ gorelease -base v0.28.0 -version v0.29.0
# github.com/centrifugal/centrifuge
## incompatible changes
(*Disconnect).CloseText, method set of *DisconnectEvent: removed
(*Disconnect).CloseText: removed
AppLevelPing: removed
DisableProtocolVersion1: removed
Disconnect.Reconnect: removed
DisconnectEvent.Reconnect: removed
HistoryEvent.Filter: changed from HistoryFilter to HistoryFilter
HistoryFilter.Limit: removed
HistoryFilter.Reverse: removed
HistoryFilter.Since: removed
HistoryFilter: changed from HistoryFilter to HistoryFilter
HistoryOptions.Limit: removed
HistoryOptions.Reverse: removed
HistoryOptions.Since: removed
MemoryBrokerConfig.HistoryMetaTTL: removed
ProtocolVersion1: removed
RedisBrokerConfig.HistoryMetaTTL: removed
SockjsConfig.HeartbeatDelay: removed
SockjsConfig.ProtocolVersion: removed
TransportInfo.AppLevelPing, method set of Transport: removed
TransportInfo.AppLevelPing: removed
TransportInfo.PingPongConfig: added
WebsocketConfig.PingInterval: removed
WebsocketConfig.PongTimeout: removed
WebsocketConfig.ProtocolVersion: removed
WithHistory: changed from func(int, time.Duration) PublishOption to func(int, time.Duration, ...time.Duration) PublishOption
## compatible changes
(*Node).Config: added
Config.HistoryMetaTTL: added
ConnectReply.PingPongConfig: added
HistoryFilter.Filter: added
HistoryFilter.MetaTTL: added
HistoryOptions.Filter: added
HistoryOptions.MetaTTL: added
PublishOptions.HistoryMetaTTL: added
SubscribeOptions.HistoryMetaTTL: added
WithHistoryFilter: added
WithHistoryMetaTTL: added
WithSubscribeHistoryMetaTTL: added

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

v0.28.0

20 Jan 13:01
748bec8
Compare
Choose a tag to compare
  • Centrifuge v0.28.0 comes with an updated Redis Engine implementation based on rueian/rueidis library. Allocation efficiency and throughput of Redis Broker and PresenceManager were improved in both standalone and Cluster Redis setups. See #262 and blog post Improving Centrifugo Redis Engine throughput and allocation efficiency with Rueidis Go library for the reasoning and numbers behind.
  • Work on a better observability and possibility to protect client protocol from misusing: Centrifuge now has CommandReadHandler and CommandProcessedHandler. These handlers are only available for client protocol v2, client protocol v1 will be removed soon. While it's not removed DisableProtocolVersion1 global var may be used to disable possibility for clients to connect to server with ProtocolVersion1.
  • Client now can't send infinite number of pongs to the server, only one pong after receiving ping is allowed
  • Client now can't send any command to the server after getting error in Connect command
  • Disconnect client if it sends async message (using Send method) to the server while MessageHandler not set
  • Possibility to dramatically reduce server CPU usage in case of sending many messages towards individual connections (it may be up to 5x reduction depending on message rate). This is possible with new options of ConnectReply: WriteDelay, ReplyWithoutQueue, MaxMessagesInFrame, QueueInitialCap which allow tweaking Centrifuge message write loop. See #270 for more details.
  • Several internal optimizations in client protocol to reduce memory allocations a bit.
  • More human-readable tracing logging output (especially in Protobuf protocol case). On the other hand, tracing log level is much more expensive now. We never assumed it will be used in production – so seems an acceptable trade-off.
  • Update centrifuge-js version in all examples
gorelease -base v0.27.2 -version v0.28.0

# github.com/centrifugal/centrifuge
## incompatible changes
(*Client).Handle: removed
(*Client).HandleCommand: changed from func(*github.com/centrifugal/protocol.Command) bool to func(*github.com/centrifugal/protocol.Command, int) bool
CommandReadHandler: changed from func(*Client, CommandReadEvent) to func(*Client, CommandReadEvent) error
DefaultRedisBrokerPrefix: removed
DefaultRedisConnectTimeout: removed
DefaultRedisPresenceManagerPrefix: removed
DefaultRedisPresenceTTL: removed
DefaultRedisReadTimeout: removed
DefaultRedisWriteTimeout: removed
RedisBrokerConfig.PubSubNumWorkers: removed
RedisShardConfig.IdleTimeout: removed
RedisShardConfig.ReadTimeout: removed
RedisShardConfig.TLSSkipVerify: removed
RedisShardConfig.UseTLS: removed
RedisShardConfig.WriteTimeout: removed
## compatible changes
(*Node).OnCommandProcessed: added
CommandProcessedEvent: added
CommandProcessedHandler: added
CommandReadEvent.CommandSize: added
ConnectReply.MaxMessagesInFrame: added
ConnectReply.QueueInitialCap: added
ConnectReply.ReplyWithoutQueue: added
ConnectReply.WriteDelay: added
DisableProtocolVersion1: added
DisconnectNotAvailable: added
DisconnectPermissionDenied: added
DisconnectTooManyErrors: added
DisconnectTooManyRequests: added
HandleReadFrame: added
RedisShardConfig.ClientName: added
RedisShardConfig.IOTimeout: added
RedisShardConfig.SentinelClientName: added
RedisShardConfig.SentinelTLSConfig: added

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

v0.28.0-rc.3

11 Jan 17:06
40de54d
Compare
Choose a tag to compare
v0.28.0-rc.3 Pre-release
Pre-release

v0.28.0-rc.3 contains fix of decoding large client protocol messages. The bug was introduced by v0.28.0-rc.2. This could lead to client disconnections in v0.28.0-rc.2

v0.28.0-rc.2

08 Jan 18:59
363aca1
Compare
Choose a tag to compare
v0.28.0-rc.2 Pre-release
Pre-release

One more release candidate for Centrifuge v0.28.0. See changelog about v0.28.0 to find out details of upcoming release.

v0.28.0-rc.2 contains an important fix compared to v0.28.0-rc.1 which relates to new Redis Engine we introduced in v0.28.0-rc.2: slow down subscription dissolver workers while Redis PUB/SUB is unavailable. This solves a high CPU usage which may happen while Redis PUB/SUB is unavailable and last client unsubscribes from some channel.

v0.28.0-rc.1

19 Dec 17:37
7bb5519
Compare
Choose a tag to compare
v0.28.0-rc.1 Pre-release
Pre-release

This is a release candidate of Centrifuge v0.28.0 with updated Redis Broker and PresenceManager implementations using https://github.com/rueian/rueidis library. See #210.

v0.27.2

14 Dec 11:42
e7b556d
Compare
Choose a tag to compare
  • Fix emulation layer in multi-node scenario #269

Full Changelog: v0.27.0...v0.27.2

v0.27.0

11 Nov 07:39
39f2d41
Compare
Choose a tag to compare

What's Changed

gorelease -base v0.26.0 -version v0.27.0
# github.com/centrifugal/centrifuge
## compatible changes
(*Node).OnCommandRead: added
CommandReadEvent: added
CommandReadHandler: added
DisconnectInappropriateProtocol: added

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

New Contributors

Full Changelog: v0.26.0...v0.27.0

v0.26.0

07 Sep 07:27
81c32ca
Compare
Choose a tag to compare

In this release we are finishing up a migration to client protocol v2: experimental marks removed, ping/pong configuration standardized. Most probably this is a last minor release that supports Go 1.17.

  • Standardize a way to configure server-to-client ping/pong using PingPongConfig struct - #250
  • Add possibility to set subscription Source, which may be returned later when calling Client.ChannelsWithContext method - #249
  • Refactor Redis Engine to avoid leaking connection in tests (and possibly in production in case of unstable network between application and Redis). See #237
  • Add nodeRegistry.size() to improve nodes registry performance a bit #236
  • Fix some data races in tests #240 and avoid blinking tests #241
  • Add Redis Cluster benchmarks #238
gorelease -base v0.25.0 -version v0.26.0
# github.com/centrifugal/centrifuge
## incompatible changes
HTTPStreamConfig.AppLevelPingInterval: removed
HTTPStreamConfig.AppLevelPongTimeout: removed
SSEConfig.AppLevelPingInterval: removed
SSEConfig.AppLevelPongTimeout: removed
SockjsConfig.AppLevelPingInterval: removed
SockjsConfig.AppLevelPongTimeout: removed
WebsocketConfig.AppLevelPingInterval: removed
WebsocketConfig.AppLevelPongTimeout: removed
## compatible changes
(*Client).ChannelsWithContext: added
(*RedisBroker).Close: added
(*RedisPresenceManager).Close: added
(*RedisShard).Close: added
ChannelContext: added
HTTPStreamConfig.PingInterval: added
HTTPStreamConfig.PingPongConfig: added
HTTPStreamConfig.PongTimeout: added
PingPongConfig: added
SSEConfig.PingInterval: added
SSEConfig.PingPongConfig: added
SSEConfig.PongTimeout: added
SockjsConfig.PingInterval: added
SockjsConfig.PingPongConfig: added
SockjsConfig.PongTimeout: added
SubscribeOptions.Source: added
WebsocketConfig.PingPongConfig: added
WithSubscribeSource: added

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

Full Changelog: v0.25.0...v0.26.0

v0.25.0

20 Jul 08:25
f4d24f5
Compare
Choose a tag to compare

Breaking changes

This release enables using client protocol v2 by default. Here is a list of SDKs compatible with new client protocol iteration:

  • centrifuge-js >= v3.0.0
  • centrifuge-go >= v0.9.0
  • centrifuge-dart >= v0.9.0
  • centrifuge-swift >= v0.5.0
  • centrifuge-java >= v0.2.0

All SDKs in Centrifugal ecosystem mentioned above now behave according to the client SDK API specification. The work has been done according to Centrifugo v4 roadmap.

Check out Centrifugo v4 release post that covers the reasoning behind changes here.

This means:

  • WebSocket handler will assume client connects over protocol v2. But we will still support client protocol v1 for some time (I believe half a year at least). Protocol v1 may be forced using WebsocketConfig.ProtocolVersion option (set it to ProtocolVersion1). Or client can provide ?cf_protocol_version=v1 in connection URL. Applications can smoothly migrate to new protocol, for example, see how Centrifugo v4 migration guide provides steps to migrate apps to new client protocol.
  • The same applies to SockJS handler. SockJS is now DEPRECATED in Centrifugal ecosystem (we provide our own WebSocket emulation layer, which is faster, does not require sticky sessions, has less overhead in terms of network traffic and memory usage on server side)
  • All examples in this repo were adapted to use the latest client SDK API which works according to new client SDK spec
  • Unidirectional transport examples were also updated and now use client protocol v2
  • New SDKs that work with new client protocol will be released in parallel with Centrifuge v0.25.0 and Centrifugo v4

To summarise:

  1. Current SDKs will be able to work with Centrifuge v0.25.0 – but you will need to turn on using client protocol v1 on server side. This way you can update server side without changing client side code.
  2. New client SDKs which will be released will only work with new iteration of client protocol

Please don't hesitate to join our Telegram and Discord communities in case of questions - we will try to help.