Changelog History
Page 10
-
v2.0.0 Changes
๐ Features
- ๐ User presence has been added, enabling querying and subscription to who is online within a cluster
- ๐ง Introduces the configuration option
broadcastTimeout
toconfig.yml
to allow coalescing of broadcasts. This option can be used to improve broadcast message latency such as events, data-sync and presence For example, the performance of broadcasting 100 events to 1000 subscribers was improved by a factor of 20 - โ Adds client heartbeats, along with configuration option
heartbeatInterval
inconfig.yml
. If a connected client fails to send a heartbeat within this timeout, it will be considered to have disconnected #419 - โ Adds healthchecks โ deepstream now responds to http GET requests to path
/health-check
on port 6020 with code 200. This path can be configured with thehealthCheckPath
option inconfig.yml
โจ Enhancements
- ๐จ E2E tests refactored
- uWS is now compiled into the deepstream binary, eliminating reliability issues caused by dynamic linking
๐ฅ Breaking Changes
- Clients prior to v2.0.0 are no longer compatible
- ๐ Changed format of RPC request ACK messages to be more consistent with the rest of the specs #408
- ๐ We removed support for TCP and engine.io, providing huge performance gains by integrating tightly with native uWS
- ๐ Support for webRTC has been removed
- You can no longer set custom data transforms directly on deepstream
-
v1.1.2 Changes
October 17, 2016๐ Bug Fixes
- Sending an invalid connection message is not caught by server #401
-
v1.1.1 Changes
September 30, 2016๐ Bug Fixes
- ๐ Storage connector now logs errors with the correct namepspace [@Iiridayn](@Iiridayn)
โจ Enhancements
- RPC now uses distributed state and no longer depends on custom rpc discovery logic
- 0๏ธโฃ Deepstream now uses connection challenges by default rather than automatically replying with an ack
- โฌ๏ธ Upgraded to uWS 0.9.0
-
v1.1.0 Changes
September 08, 2016๐ Bug Fixes
- ๐ Fix wrong validation of valve permissions when
data
is used as a property #346
โจ Enhancements
- ๐ค Outgoing connections now have throttle options that allow you to configure maximum package sizes to find your personal sweet spot between latency and speed
- ๐ Fix wrong validation of valve permissions when
-
v1.0.4 Changes
August 16, 2016 -
v1.0.3 Changes
July 28, 2016๐ Bug Fixes
- CLI: installer for connectors sometimes fail to download (and extract) the archive #305
- Auth: File authentication doesn't contain
serverData
andclientData
#304
Read data using
FileAuthentication
using clientData and serverData rather than datauserA: password: tsA+yfWGoEk9uEU/GX1JokkzteayLj6YFTwmraQrO7k=75KQ2Mzm serverData: role: admin clientData: nickname: Dave
๐ Features
โฑ ###### Make connection timeout
๐ Users can now provide a
unauthenticatedClientTimeout
config option that forces connections to close if they don't authenticate in time. This helps reduce load on server by terminating idle connections.- โฑ
null
: Disable timeout number
: Time in milliseconds before connection is terminated
-
v1.0.2 Changes
July 19, 2016๐ Bug Fixes
- ๐ Fixed issue regarding last subscription to a deleted record not being cleared up
-
v1.0.1 Changes
July 18, 2016๐ Bug Fixes
๐ Fix issue when try to pass options to the default logger #288 (update docs as well)
๐ Fix issue deleting a record does not unsubscribe it and all other connections, not allowing resubscriptions to occur #293
โจ Enhancements
๐ ###### Throw better error if dependency doesn't implement Emitter or isReady
-
v1.0.0 Changes
July 09, 2016๐ Features
CLI
You can start deepstream via a command line interface. You find it in the bin directory. It provides these subcommands:
start
stop
status
install
info
hash
append a--help
to see the usage.
๐ง ###### File based configuration ๐ง You can now use a file based configuration instead of setting options via
ds.set(key, value)
. deepstream is shipped with a conf directory which contains three files:- config.yml this is the main config file, you can specify most of the deepstream options in that file
- permissions.yml this file can be consumed by the PermissionHandler. It's not used by default, but you can enable it in the config.yml
- users.yml this file can be consumed by the AuthenticationHandler. It's not used by default, but you can enable it in the config.yml
For all config types support these file types: .yml, .json and .js
Constructor API
There are different options what you can pass:
- not passing any arguments ( consistent with 0.x )
- passing
null
will result in loading the default configuration file in the directory conf/config.yml - passing a string which is a path to a configuration file, supported formats: .yml, .json and .js
- passing an object which defines several options, all other options will be merged from deepstream's default values
Valve permissions rules
You can write your permission into a structured file. This file supports a special syntax, which allows you to do advanced permission checks. This syntax is called Valve.
โจ Enhancements
uws
deepstream now uses uws, a native C++ websocket server
๐ ###### no process.exit on plugin initialization error or timeout deepstream will not longer stops your process via
process.exit()
. This happened before when a connector failed to initialise correctly #243 instead it will throw an error now.Currently the API provides no event or callback to handle this error other than subscribing to the global
uncaughtException
event.process.once('uncaughtException', err => { // err.code will equal to of these constant values: // C.EVENT.PLUGIN_INITIALIZATION_TIMEOUT // or C.EVENT.PLUGIN_INITIALIZATION_ERROR })
Keep in mind that deepstream will be in an unpredictable state and you should consider to create a new instance.
๐ฅ Breaking Changes
Permission Handler
In 0.x you can set a
permissionHandler
which needs to implement two functions:isValidUser(connectionData, authData, callback)
canPerformAction(username, message, callback)
In deepstream 1.0 the
isValidUser
andonClientDisconnect
methods are no longer part of thepermissionHandler
and are instead within the newauthenticationHandler
.You can reuse the same 0.x permission handler except you will have to set it on both explicitly.
const permissionHandler = new CustomPermissionHandler() ds.set( 'permissionHandler', permissionHandler ) ds.set( 'authenticationHandler', permissionHandler )
๐ ###### Plugin API ๐ All connectors including, the
permissionHandler
,authenticationHandler
andlogger
all need to implement the plugin interface which means exporting an object that:- has a constructor
- ๐ has an
isReady
property which is true once the connector has been initialized. For example in the case a database connector this would only betrue
once the connection has been established. If the connector is synchronous you can set this to true within the constructor. - extends the EventEmitter, and emits a
ready
event once initialized anderror
on error.
Logger and colors options
๐ง The color flag can't be set in the root level of the configuration anymore. ๐ The default logger will print logs to the StdOut/StdErr in colors. ๐ง You can use the deepstream.io-logger-winston which can be configured in the config.yml file with several options.
Connection redirects
๐ฒ deepstream clients now have a handshake protocol which allows them to be redirected to the most efficient node and expect an initial connection ack before logging in. As such In order to connect a client to deepstream server you need also to have a client with version 1.0 or higher.
More details in the client changelog.