(Minor) Release 3.2.5

What’s smaller than a Release, but bigger than a Patch?

(Minor) Release 3.2.5

Release 3.2.5 includes some key new optimizations, fixes and even a few minor features.

Note – This is a minor update to brainCloud 3.2 – be sure to check it’s release notes for the full update on all the great 3.2 features.



Faster User Entities

We have significantly optimized the UpdateSingleton() API call by eliminating a superfluous read operation from most usage scenarios. To achieve this, we had to remove some unnecessary fields from the API’s JSON return.

As per our custom we by default preserve compatibility. To fully gain the advantages of this optimization, confirm that your app isn’t making use of the entityId, acl, createdAt and updatedAt fields that were previously returned – and then go to the Design | Core App Info | Advanced Settings page, Compatibility Settings section – and uncheck the [ ] Include entityId+ in UpdateSingleton Api output option.


Fast Log Processing

The continued growth of our platform causes us to continually re-look at our architecture and framework to ensure that we get the best performance. In this last growth spurt, the logging system came under scrutiny as the source of some slowdowns. We’ve made some incremental changes to improve this – improved batching of writes, and capping the amount of request data logged for some API calls. We have plans to do more in the future.


Faster Segment-based Push Notifications

Our User Segments feature is very useful for targeting push notifications – and some of you are taking great advantage of that, sending notifications to millions of customers daily. That said, not every user enables push notifications – and our segments weren’t recognizing that before.

To address this, we’ve added a new Push Enabled Segment Criteria.  If you configure this criteria for a segment, it will ensure that all members actually have push notification tokens registered. That way brainCloud isn’t wasting time chugging through a million records, when only 300,000 of your users have enabled push.

Note – to take advantage of this performance optimization, go to Design | Segmentation | Segments page, select a segment, and add the Push Enabled critera to it.


Minor Features

Unsubscribe from Tournaments

Your users can now unsubscribe from tournament mailings. Required legally for many locales. Just include include the code -unSubUrl- in your SendGrid email template, and it will be replaced with a custom unsubscribe URL for that user.


Client Kill Switch

This is more of a feature for us than you :).

Recently we’ve had a uptick in apps that endlessly retry an operation if an error occurs. This is considered bad client behaviour. The brainCloud libraries themselves automatically retry on a timeout and/or communications failure (they will retry 3 times before returning an error to you). If, however, we receive a 4xx or 5xx error from the server, we return it to the app – because that means that the server is unable to perform the request as formed (possibly bad parameters, bad server data, etc.)

In these cases, if you retry the operation as before, there is a 99.999% chance you will get the same error! Implementing an endless retry in your code is akin to DDOS-ing our servers! And it costs you API calls to boot!

So – we’ve implemented a way to stop you! Now, if your client app sends in the same erroneous requests ten times in a row, the client will stop actually sending the requests, and return an immediate error to your client app. This *might* cause an endless loop in your app – so once again – don’t do this! [Note – most mobile OSes will kill the app as soon as the loop is discovered]


Slow Errors

Still on the topic of endless error loops (see above), brainCloud will now intentionally delay sending error responses back to the client. It’s not a huge delay (1/2 a second) – but that can make a significant difference in the rate that a client can automatically retry – and thus the impact on our servers. This delay is applied per bundle, only if all the messages in a bundle have errors.

Note – this delay is tuneable per app. If it is negatively impacting your app, reach out to us and we can adjust it.


Miscellaneous Fixes

We’ve also include the following fixes:

  • Merging with Peer Profiles – we’ve fixed some issues associated with merging of profiles that are associated with Peer Profiles
  • Reading Leaderboard Configs – the read routines are now much-more robust
  • Incoming Events – we’ve removed the unnecessary gameId field from all incoming event calls. Note – for compatibility reasons, the change only takes effect if the [ ] Generate Legacy Event Ids compatibility flag is unset.
  • Tournament Phases – the display and configuration of Tournament Phases on the Leaderboard Config dialog and Leaderboard Monitoring pages has been improved.
  • Facebook Purchases – we fixed an issue associated with the latest changes to Facebook’s Purchase APIs.
  • Push Notification Tokens – are now properly removed when players are deleted.
  • Cloud Code Jobs – scheduled jobs are now editable again via the Monitoring | Global Monitoring | Job Queue page.