- 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.
- 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.
To get started with push notifications and Lightstreamer, check out this shiny technical tutorial.