brainCloud 5.5 is live!
brainCloud 5.5 has something for everyone: Retention Analytics, support for Dart and Flutter, Optimized Group Leaderboards, App Alerts, an Improved Matchmaking Monitor, Improved Security, and more!
Compatibility Notes
We work hard to preserve stability and backward compatibility for existing apps.
Developers should be aware of the following changes:
- Cancelling Find Requests: the LobbyService’s
CancelFindRequest()
method now requires anentryId
be passed into it. This change was technically introduced in 5.4.X, but we note it here for completeness. - Relay Servers: Significant improvements have been made to how the Relay Servers handle large matches (i.e., matches with more than 30 players). These improvements involve reusing abandoned slot IDs, a behavior change that may impact certain games. Therefore, we made the new software available as the “V3” Relay Server protocol. The protocol APIs themselves have not changed. Most games that work with V2 should work unchanged with V3.
- Group Leaderboards: 5.5 now stores Group Leaderboards in collections separate from regular Player Leaderboards. The older combined storage is still supported and is the default for existing apps. The new compatibility flag controls this behavior: “[x] Store user and group leaderboard scores in the same collection (slower).” This flag is enabled by default for existing apps and disabled for new apps. Changing this value for an existing app will make old group scores (written to the combined collection) inaccessible.
Release Highlights
Retention Analytics
Retention is a metric that indicates how effectively your app engages new users and entices them to return. It is measured over time and represents the percentage of users who return after 1 day, 7 days, etc.
There are two common variations of retention - Classic Retention and Rolling Retention.
Classic Retention measures the percentage of users who return on a specific day (i.e., D+7 = day 7 - which is 7 days after their account was created).
Rolling Retention measures the percentage of users who return on that day or any day thereafter. (i.e., a user who returns on day 7 is also deemed “retained” on all previous days).
Rolling Retention numbers will always be higher - and will reliably decrease over time – while Classic Retention stats will bump up and down (especially during the first week) - as some users may return on day 3 that didn’t return on day 2, etc.
Classic Retention helps measure the day-to-day engagement for the first week of your app - while Rolling Retention allows for greater generalizations about your app (i.e., 20% of players are still active after 1 week).
brainCloud’s new Retention Analytics screen displays both Rolling Retention and Classic Retention.
As you can see in the image below, the screen is quite dynamic and offers many ways to view this critical metric.
Note that apps must be LIVE to generate retention analytics. These stats do not make sense for apps under development - so we do not generate them for Dev and Dev+ apps.
Related: Another metric is Churn - which is the percentage of players who stop using your app within a specific timeframe. brainCloud doesn't display it - but it is easy to calculate. Churn is the inverse of Rolling Retention. If your D+7 Rolling Retention is 20%, then the Churn after 1 week is 80%.
App Alerts
brainCloud 5.5 includes our new App Alerts feature. This feature will perform various checks on the health of your app - and display important information regarding its findings in your App Dashboard.
The initial alerts that can be triggered include:
- Apple Push Notifications - Reminders for devs to update their certs
- API Errors - Alerts if error levels are high or rising
- Logging - Alerts if the app is generating excessive logs
- Compatibility flags - Reminder to evaluate and disable unnecessary compatibility flags
- MFA Enforcement - Reminder to enable the new MFA Enforcement feature for live apps
We will continue to evolve and expand upon this feature in coming releases!
Dart and Flutter Support
Dart is a client-optimized language for developing fast apps on any platform. Developed by Google, Dart is similar to JavaScript but is simpler, faster, and more user-friendly. When paired with the Flutter UI framework - it is a highly productive foundation for building cross-platform applications.
brainCloud 5.5 includes our new Dart client library, which supports all of brainCloud's features and services - including RTT and Relay Comms. You can find the source for the library on GitHub - and the package itself on pub.dev, the official package repository for Dart and Flutter apps.
Security Improvements
Security has always been a key concern for the brainCloud Platform - and this release makes two key platform improvements in this area.
Brute Force Protection for User Accounts
A brute force attack is a hacking method that uses trial and error (often in a sequential organized fashion) to crack passwords or login credentials.
brainCloud’s new Brute Force Attack Protection feature thwarts these attacks by blocking the ability to login to an end-user account after an escalating number of bad attempts – similar to how your smartphone makes you wait between login attempts when you get the password wrong.
The feature is enabled and configured on the new App > Design > Security > User screen.
It works like this:
- brainCloud counts the number of bad login attempts in a row for end-user (e.g., player) accounts. Bad logins increment the count. Good logins reset the count to zero.
- If the # of bad attempts exceeds one of the escalating thresholds, the account becomes “blocked,” during which both good and bad login attempts are rejected… ← this is key - if we allow “good” login attempts while blocked, we won’t stop the attack!
- Note that while the account is blocked - the block time does not extend with each new login attempt - if we did, the lock time would quickly escalate to an unworkable value. So login attempts while blocked are essentially ignored - though we do increment the bad login count appropriately. We do NOT extend the “blocked until” time while the account is blocked.
- Eventually, the “block” will timeout - after which - the next login attempt will be considered. If it’s good - the user will log in - and the bad login count will be cleared to 0. If the login attempt is bad, the count will increment - and become “blocked” again for a duration appropriate to the new threshold level.
- If Sendgrid integration is enabled - the user can enable emails that will be sent to the user each time the account becomes “blocked” due to this feature.
Important - during the period that logins are “blocked” - both bad and good logins are rejected. Note that anonymous reconnects are by default NOT blocked - so users already logged into a device are not inconvenienced by the attacker’s activity.
Unblocking End-user accounts
The User Summary page has been enhanced to show additional information regarding bad login attempts. See the Portal Updates section for more details.
What about Brute Force Protection for Portal Accounts?
brainCloud already provides this sort of protection for Portal accounts. And the new Team MFA Enforcement feature (below) makes these accounts even more secure!
Team MFA Enforcement
This feature adds additional protection to a developer’s Team Member (i.e., Portal) Accounts.
brainCloud has long supported MFA authentication for Portal Accounts - but now Team Administrators can make MFA mandatory for all Team Members. This is done via the Team > Setup > Team Info screen.
Once enabled, only Portal Users using MFA will be allowed to log into the team.
Team members not using MFA can configure it from the Team Selection screen by clicking the Enable MFA or the [Edit Security] button.
Note that for Private Licensees, SSO-based Portal Users are treated as MFA-enabled - as it is assumed that MFA is provided by their SSO solution.
Additional Improvements
Release 5.5 includes a ton of other improvements as well. These include:
API Improvements
- New APIs have been added to the AppStore, Authentication, and Lobby services. See the API Changes section for more details.
[Refresh] App Metrics
- App metrics are daily processes that aggregate and calculate various statistics about your app - such as API Usage, sales aggregation, retention data, etc.
- In some rare circumstances - the calculation of those metrics may be interrupted.
- To re-trigger the calculation of the metrics - navigate to App > Design > Admin Tools > Cache and click [ Refresh Metrics ]
Client-Server Protocol
- We have improved our protocol handling so that client retry attempts are now properly compressed (when applicable)
[Optimized] Group Leaderboards
- Before 5.5 brainCloud, player- and group-based leaderboards were stored in the same collections. This is not optimal - especially when dealing with large [sharded] leaderboards. brainCloud now stores player-based leaderboards and group-based leaderboards separately.
- A new compatibility flag controls this behavior. When enabled, the flag preserves the old behavior. The flag is enabled by default for existing apps and disabled for new apps.
Hosted Servers
- A new "Retrieve Logs" option was added, which determines whether the logs from successful room/relay server sessions will be retrieved. By default logs will only be retrieved if the container exited with a non-zero result.
Matchmaking Monitor
- The Matchmaking Monitor has been enhanced to show stats for how fast players are launched into actual matches. ← Before the stats stopped at being added to a Lobby
Portal SSO and Builder API
- The Builder API has been enhanced to support dynamic authentication as an OAuth SSO Provider
- This allows Private and Platform Licensees to build custom applications that use brainCloud’s Portal Accounts for authentication - and access brainCloud’s Builder API via new dynamic [and temporary] API keys
- Note that this SSO Provider is for portal accounts only - not the end-user accounts of brainCloud apps [that is a future feature under consideration]
S2S IP Security for Room and Relay Servers
- brainCloud can now dynamically restrict the S2S interfaces associated with Room and Relay servers to the IP addresses of the currently running servers.
- To enable this feature - go to App > Design > Servers > My Servers, choose the appropriate server type, and enable IP Security.
Relay Server Improvements
- Improvements for when dealing with larger player counts
- Ability to restrict relay comms to less than 40 players (now defaults to max of 32 for webgl compatibility)
- Improved disconnect handling
- Note that the above improvements are all made available via the “V3” version of the Relay Server. The behavioural changes are very subtle and shouldn’t impact the great majority of apps. We highly recommend that devs using “V2” upgrade to “V3” in their test apps (no API changes) and upgrade production when convenient.
Portal Updates
We continue to rapidly evolve the Design Portal.
Team Menu
The flag to enable Team MFA Enforcement has been added to the Team > Setup > Team Info screen.
App Menu
App Dashboard
The new App Alerts section is front and center on the App Dashboard.
We have also added your Client Library version to the App Profile section.
Cloud Code (rendered view)
We’ve added an option to view the rendered version of a cloud code script. If the [x] Show Rendered option is enabled, the editor shows a read-only view of the script with all included scripts shown inline. This view matches the version of the script that brainCloud keeps cached for runtime execution.
Security
This release consolidates App-related Security sections under App > Design > Security.
You will find the old settings from App > Design > Core App Info > Security here, as well as the new Brute-Force Protection settings.
Matchmaking Monitor
The Matchmaking Monitor has been enhanced with a new screen that shows a summary of matchmaking activity across all lobby types.
Click on any row to navigate to the detailed monitoring charts for that Lobby Type.
The details screen has been enhanced to show how long it takes for matches to launch on servers.
The time displayed includes the time it takes to spin up a container (on-demand) - as well as the time to cold-launch a node (server) for the container to run upon (if applicable).
Blocked Users
The User Browser (preview blade) and User Summary screens now show information about Bad Login Attempts and whether a user has been blocked. There are also controls that allow a Team Member to [UNBLOCK] the user and/or [Reset] the bad login attempt count.
Retention Analytics
The new Retention Analytics screen can be found at App > Reports > Analytics > Retention.
Previous day usage
In addition to Today and Yesterday - the API Usage and API Errors screens now include a tab labeled “Previous,” - which displays the stats for the day before yesterday.
API Changes
The following changes and additions have been made to the brainCloud API:
AppStore Service
- New API for rewarding products (without a corresponding purchase)
- New API for recording a purchase (for cases where purchase is handled by custom client code).
Authentication Service
- Password reset calls are now accessible from cloud code
- New
GetServerVersion()
call available to retrieve the brainCloud server version before authenticating. This is useful for our example apps.
Bridge (cloud-code only)
- New
DeleteSessionCacheObject()
method - useful if you only need a session cache object temporarily - like when passing information from a pre- to post-hook script.
- New
Event Service
- New
SendEventToProfiles()
method allows for sending the same event to multiple users
- New
Friend Service
- New
GetProfileInfoForCredentialIfExists()
method is the same asGetProfileInfoForCredential()
- but skips writing the log entry if the credential doesn’t exist
- New
Group Service
- The
UpdateGroupAcl()
andUpdateGroupEntityAcl()
methods are now available from the client libs; previously, they were cloud-code only.
- The
Identity Service
- The
GetIdentityStatus()
method is now available from the client libs
- The
Leaderboard Service
- The
PostScoreToDynamicGroupLeaderboardUsingConfig()
method is now available from the client libs. This method should be used instead ofPostScoreToDynamicGroupLeaderboardUTC()
andPostScoreToDynamicGroupLeaderboardDaysUTC()
.
- The
Lobby Service
- The
CancelFindRequest()
method now requires anentryId
as a parameter. TheentryId
is included in the response from the various Find Lobby API calls. - New SYS APIs:
SysCreateLobby()
,SysCreateLobbyWithPingData()
,SysGetLobbyData()
,SysAddMember()
,SysAddMemberWithPingData()
,SysRemoveMember()
,SysUpdateSettings()
- The
Mail Service
- New
SendAdvancedEmailByAddresses()
method for sending a single email with multiple addresses in the “to:” list.
- New
PlaybackStream Service
- The
ProtectStreamUntil()
method has been added to the client libs. This allows a developer to keep a playback stream around for longer than the default – which is currently 150 days in our Public BaaS. Extending specific streams is helpful for games that use the streams for ghost replays - and want to keep “featured replays” around longer.
- The
[New!] Report Service
- SysGetLatestReport() - returns the data from the latest generated report (of the specified type).
- SysGetReportForStartDate() - returns the data from the specified report.
Libraries and Examples
Release window - Updated Client and S2S libraries are made available within two weeks of the launch of the updated server software. Updated examples are made available in the two weeks after the client lib updates.
Client Libraries
All Libraries
- All new and missing methods were added as described in the API Changes section.
braincloud-csharp (C#/Unity/Godot)
- Created overloaded
FindLobby
functions that do not requiretimeoutSecs
parameter. Original functions have been deprecated. - Improved country/region code retrieval for UWP with Windows.Globalization
- Improved error-handling for Relay Comms ordered packet IDs management
- Fixed issue with WebSocket in WebGL on iOS where the browser resets due to running out of memory
braincloud-unreal-plugin (Unreal)
- Implemented request/response compression
RTT bug fixes/improvements
- Fixed issue where the disconnect callback wasn't being triggered in a situation where RTT connection is lost from internet connection becoming unavailable (tested by not sending heartbeat messages)
- Fixed issue where calling EnableRTT twice before a connection is established causes connection issues, the function is now safeguarded from double calls
- Fixed issue where received RTT messages were incorrectly processing special characters / non-ASCII characters
braincloud-js (JavaScript)
Fixed bug in
attachAdvancedIdentity
function- The conditional statement for optional
externalAuthName
was not checking forauthenticationSubType
correctly
- The conditional statement for optional
braincloud-dart
- A brand new library with full support for all brainCloud APIs - including RTT and RelayComms
The source can be found in the following github repos:
- braincloud-dart - the core dart library. No flutter dependencies.
- braincloud-dart-persistence - An add-in library that utilizes Flutter to implement the persistence required by the brainCloud wrapper. It is highly recommended that devs use this with the core library.
The packages can be found on
pub.dev
at the following locations:- braincloud - the core library package
- braincloud_data_persistence - (see description above)
S2S Libraries
No changes in this release.
Examples
All examples will be updated to use brainCloud 5.5 in the coming weeks (generally 2-4 weeks after release).
Documentation and Tutorials
BootCamp
- No changes
Documentation
- All the latest API additions and changes have been incorporated into our docs.