Friday, April 6, 2018

Data Streaming vs. Push Notifications

When dealing with mobile apps, the difference between real-time data streaming and push notifications is not always clear to everybody. Let's try to delve into this topic.
  1. With data streaming, the server sends real-time data directly to the app, leveraging WebSockets and/or HTTP. This requires the app to be running and, with iOS, to be in foreground.
  2. With push notifications, the server sends messages to Google's and Apple's servers, which deliver them to the mobile devices. Notifications are received by the device even if the app that subscribed to them is not in foreground or is not even running.

As you can see, mobile push notifications are the perfect means to reach a user when the mobile app is not running.

Push notifications are natively supported by both Android and iOS devices, based on two standards: Google's FCM and Apple's APNs.

There are several cases where you might want to use data streaming and push notifications together. You send important messages to your users via push notifications, even if they are not using your app in that moment. Then, you continue via data streaming when they open the app, thus supporting larger data volumes, increased bandwidth, decreased latency, and smart throttling.

Some typical uses of push notifications are:
  • Notify the user when the price of a financial instrument hits a given threshold
  • Notify the user when an order has been executed
  • Let the user know a new chat message has been received
  • Remind the user their favorite TV show is starting
  • Involve the user, whatever they are doing and wherever they are, as soon as something happens that could bring them back to your app.
If you are already using Lightstreamer for data streaming, the great news is that you don't need to do any additional server-side development to implement push notifications. If you already implemented your own Lightstreamer Data Adapter, it will automatically be able to route data through push notifications, in addition to data streaming.

To get started with push notifications and Lightstreamer, check out this shiny technical tutorial.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.