Do you binary encode your messages for greater efficiency?

Yes, all of our client libraries support Message Pack which is an efficient and flexible binary protocol.  Using Message Pack reduces the amount of data that needs to be transferred between clients and servers and also, in almost every language, improves the performance when serialising and deserialising messages.

 

By default, our client libraries will use Message Pack when communicating with Ably over REST or Realtime WebSockets, however they do also support the less efficient, but human readable JSON format.  If you wish to use JSON over Message Pack, then you can configure this when instancing the library with the option useBinaryProtocol

 

Here is an example of how to force the Javascript library to use JSON over Message Pack:

 

var realtime = new Ably.Realtime({ key: apiKey, useBinaryProtocol: false });