Changelog History
Page 9
-
v1.1.0 Changes
No backwards incompatible changes here.
- ๐ support enabling web interface over environment variable CENTRIFUGO_WEB
- close client's connection after its message queue exceeds 10MB (default, can be modified using
max_client_queue_size
configuration file option) - ๐ fix theoretical server crash on start when reading from redis API queue
-
v1.0.0 Changes
๐ A bad and a good news here. Let's start with a good one. Centrifugo is still real-time messaging server and just got v1.0 release. The bad โ it is not fully backwards compatible with previous versions. Actually there are three changes that ruin compatibility. If you don't use web interface and private channels then there is only one change. But it affects all stack - Centrifugo itself, client library and API library.
๐ Starting from this release Centrifugo won't support multiple registered projects. It will work with only one application. You don't need to use
project key
anymore. Changes resulted in simplified ๐ configuration file format. The only required option issecret
now. See updated documentation ๐ to see how to setsecret
. Also changes opened a way for exporting Centrifugo node statistics via HTTP APIstats
command.๐ As this is v1 release we'll try to be more careful about backwards compatibility in future. But as we are trying to make a good software required changes will be done if needed.
๐ Highlights of this release are:
- ๐ง Centrifugo now works with single project only. No more
project key
.secret
the only required configuration option. - ๐ web interface is now embedded, this means that when downloading release you get possibility to run Centrifugo web interface just providing
--web
flag tocentrifugo
when starting process. - ๐ฆ when
secret
set via environment variableCENTRIFUGO_SECRET
then configuration file is not required anymore. But note, that when Centrifugo configured via environment variables it's not possible to reload configuration sending HUP signal to process. - ๐ new
stats
command added to export various node stats and metrics via HTTP API call. Look its response example in docs chapter. - ๐ new
insecure_api
option to turn on insecure HTTP API mode. Read more in docs chapter. - โก๏ธ minor clean-ups in client protocol. But as protocol incapsulated in javascript client library you only need to update centrifuge-js.
- ๐ release built using Go 1.5.1
๐ Documentation was updated to fit all these release notes. Also all API and client libraries were updated โ Javascript browser client (
centrifuge-js
), Python API client (cent
), Django helper module (adjacent
). API clients for Ruby (centrifuge-ruby
) and PHP (phpcent
) too. Admin web interface was also updated to support changes introduced here.There are 2 new API libraries: gocent and jscent. First for Go language. And second for NodeJS.
๐ป Also if you are interested take a look at centrifuge-go โ experimental Centrifugo client for Go language. It allows to connect to Centrifugo from non-browser environment. Also it can be used as a reference to make a client in another language (still hoping that clients in Java/Objective-C/Swift to use from Android/IOS applications appear one day โ but we need community help here).
How to migrate
- ๐ป Use new versions of Centrifugal libraries - browser client and API client. Project key not needed in client connection parameters, in client token generation, in HTTP API client initialization.
- ๐ Another backwards incompatible change related to private channel subscriptions. Actually this is not related to Centrifugo but to Javascript client but it's better to write about it here. Centrifuge-js now sends JSON (
application/json
) request instead ofapplication/x-www-form-urlencoded
when client wants to subscribe on private channel. See in docs how to deal with JSON in this case. - ๐
--web
is now a boolean flag. Previously it was used to set path to admin web interface. Now it indicates whether or not Centrifugo must serve web interface. To provide path to custom web application directory use--web_path
string option.
๐ I.e. before v1 you started Centrifugo like this to use web interface:
centrifugo --config=config.json --web=/path/to/web/app
Now all you need to do is run:
centrifugo --config=config.json --web
๐ And no need to download web interface repository at all! Just run command above and check http://localhost:8000.
๐ If you don't want to use embedded web interface you can still specify path to your own web interface directory:
centrifugo --config=config.json --web --web_path=/path/to/web/app
- ๐ง Centrifugo now works with single project only. No more
-
v0.3.0 Changes
- ๐ new
channels
API command โ allows to get list of active channnels in project at moment (with one or more subscribers). message_send_timeout
option default value is now 0 (last default value was 60 seconds) i.e. send timeout is not used by default. This means that Centrifugo won't start lots of goroutines and timers for every message sent to client. This helps to drastically reduce memory allocations. But in this case it's recommended to keep Centrifugo behind properly configured reverse proxy like Nginx to deal with connection edge cases - slow reads, slow writes etc.- ๐ง Centrifugo now sends pings into pure Websocket connections. Default value is 25 seconds and can be adjusted using
ping_interval
configuration option. Note that this option also sets SockJS heartbeat messages interval. This opens a road to set reasonable value for Nginxproxy_read_timeout
for/connection
location to mimic behaviour ofmessage_send_timeout
which is now not used by default - ๐ improvements in Redis Engine locking.
- โ tests now require Redis instance running to test Redis engine. Tests use Redis database 9 to run commands and if that database is not empty then tests will fail to prevent corrupting existing data.
- all dependencies now vendored.
- ๐ new
-
v0.2.4 Changes
- HTTP API endpoint now can handle json requests. Used in client written in Go at moment. Old behaviour have not changed, so this is absolutely optional.
- โก๏ธ dependency packages updated to latest versions - websocket, securecookie, sockjs-go.
-
v0.2.3 Changes
๐ Critical bug fix for Redis Engine!
- ๐ fixed bug when entire server could unsubscribe from Redis channel when client closed its connection.
-
v0.2.2 Changes
- โ Add TLS support. New flags are:
--ssl
- accept SSL connections. This requires an X509 certificate and a key file.--ssl_cert="file.cert"
- path to X509 certificate file.--ssl_key="file.key"
- path to X509 certificate key.
- โก๏ธ Updated Dockerfile
- โ Add TLS support. New flags are:
-
v0.2.1 Changes
- set expire on presence hash and set keys in Redis Engine. This prevents staling presence keys in Redis.
-
v0.2.0 Changes
- โ add optional
client
field to publish API requests.client
will be added on top level of published message. This means that there is now a way to includeclient
connection ID to publish API request to Centrifugo (to get client connection ID callcentrifuge.getClientId()
in javascript). This client will be included in a message as I said above and you can compare current client ID in javascript withclient
ID in message and if both values equal then in some situations you will wish to drop this message as it was published by this client and probably already processed (via optimistic optimization or after successful AJAX call to web application backend initiated this message). - client limited channels - like user limited channels but for client. Only client with ID used in
channel name can subscribe on such channel. Default client channel boundary is
&
. If you have channels with&
in its name - then you must adapt your channel names to not use&
or run Centrifugo with another client channel boundary usingclient_channel_boundary
configuration file option. - ๐ fix for presence and history client calls - check subscription on channel before returning result or return Permission Denied error if not subscribed.
- ๐ handle interrupts - unsubscribe clients from all channels. Many thanks again to Mr Klaus Post.
- ๐จ code refactoring, detach libcentrifugo real-time core from Centrifugo service.
- โ add optional
-
v0.1.1 Changes
๐จ Lots of internal refactoring, no API changes. Thanks to Mr Klaus Post (@klauspost) and Mr Dmitry Chestnykh (@dchest)
-
v0.1.0 Changes
๐ First release. New documentation.