Messages
The Backplane Server can retrieve different types of messages and send them on to the widgets. In Backplane Protocol terms, a Scenario is an a protocol extension that defines one or more message types and specifies their semantics, use, and so on. Currently, the Scenarios in development on the Backplane Protocol are:
- Identity Scenario — Updates all widgets with user data once a login widget publishes to a Backplane channel.
- Activity Streams Scenario — Coming soon: When a user shares activities on a social network, widgets will be informed as well.
Messages in Backplane Protocol 1.2 versus messages in Backplane Protocol 2.0 ¶
One of the improvements in the newer version is that Backplane 1.2 always delivers the entire data payload, while Backplane 2.0 delivers only the header information to browser or anonymous clients, and sends the full the data payload to authenticated clients according to the protocol. While on the surface this may appear to be a step backwards in the evolution of the Backplane protocol, it was done for two important reasons.
The first is the security principle of “least privilege,” which states that applications should only have access to data that directly concerns them, rather than a firehose of sensitive data that may or not be directly consumed by the subscriber of the content.
Secondly, it was desirable to conserve bandwidth. As payloads become more data rich, they may contain several hundred kilobytes of data each. Pumping the entire payload to the JavaScript client library would be wasteful.
Because the client implementing the Backplane 2.0 JavaScript library receives only the message header, each application subscribing to the message needs to use an API to contact their server-based applications, which then send the relevant information. Backplane 2.0 allows server-side applications (as authenticated clients) to consume the entire message content, including the payload portion.