Implement mobile push notification server - push-notification

I want to implement a push notification server which should send push notifications via apn (apple), gcm (Google) and wns (windows). I already checked push platforms like the one from Amazon, but none of these do met the requirement that I maybe later want to implement an additional service provider (e.g. for location based push). In addition two that nearly no provider offers an api so that various systems can connect to it.
Want kind of libraries or frameworks do you know to send push notifications in an easy way?
I have already seen https://github.com/rs/pushd but I am searching for an java / Javascript based solution. Some others doesn't provide solutions for Windows.
Does anybody has any tips?
Thanks,
Fahim

Those are working well for me.
Apple:
https://github.com/notnoop/java-apns
Google:
https://github.com/google/gcm
Windows:
https://github.com/fernandospr/java-wns

Related

OpenStack Cluster Event Notification

So far, based on my understanding of OpenStack Python SDK, I am able to read the Hypervisor, Servers instances, however, I do not see an API to receive and handle the change notification/events for the operations that happens on the cluster e.g. A new VM is added, an existing VM is deleted etc.
There is a similar old post (circa 2016) and I am curious if there have been any changes in Notification handling?
Notifications to external systems from openstack
I see a documentation, which talks about emitting notifications over a message bus that indicate different events that occur within the service.
https://docs.openstack.org/ironic/latest/admin/notifications.html
I have the following questions:
Does Openstack Python SDK support notification APIs?
How do I receive/monitor notifications for VM related changes?
How do I receive/monitor notifications for compute/hypervisor related changes?
How do I receive/monitor notifications for Virtual Switch related changes?
I see other posts such as Notifications in openstack and they recommend to use Ceilometer project, which uses a Database. Is there more light-weight solution than using a completely different service like Ceilometer?
Thanks in advance for your help in this regard.
As far as I see and I know, Openstack SDK doesn't provide such a function.
Ceilometer will also not help you. It only collects data by polling and by notifications over RPC. You would still have to poll the data from ceilometer by yourself. Beside this, ceilometer alone has the problem, that it only grow and will blow up your database, that's why you should also use gnocchi, when you use ceilometer.
At the moment I see only the 3 possible solutions for you:
Write your own tool, which runs permanently in the background and collect the data in a regular interval over OpenstackSDK and REST-API requests.
Write something, which does the same like ceilometer by reciving notifications over oslo-messaging (RPC). See the oslo_messaging_notifications-section in the configs: https://docs.openstack.org/ocata/config-reference/compute/config-options.html#id35 (neutron has also such an option) and use messagingv2 as driver like ceilometer does. But be aware here, that not every event creates a notification. The list of the ceilometer meter-data should give a good overview of which event are creating a notification and what can only be collected by polling: https://docs.openstack.org/ceilometer/pike/admin/telemetry-measurements.html. The number of notification-events is really low, so its possible, that it doesn't provides all events you want.
Use in the oslo_messaging_notifications-section in the configs log as driver to write the notification in a log-file, and write a simple program to read the log-file and process or forward the read content. Here is the same problem like in number 2, that not every event creates a notification (log-entry in this case here). This has also the problem, that the notifications and so also the event-logs, are created on the compute-nodes (as far as I know) and so you would have to watch all compute-nodes by your tool.
Based on the fact, that I don't know, how much work it would be to write a tool to collect notifications over RPC and because I don't know, if all events you want to watch really creates a notification (base on the overview here: https://docs.openstack.org/ceilometer/pike/admin/telemetry-measurements.html), I would prefer number 1.
Its the easiest way to create a tool, which runs GET-Requests over REST-API in a regular interval and forward the results to the desired destination as your own custom notifications.
I followed the below references to get this working. Also, chatted with the author of this code and video.
https://github.com/gibizer/nova-notification-demo/blob/master/ws_forwarder.py
https://www.youtube.com/watch?v=WFq5JWXa9AM
In addition, I faced other issues:
By default, OpenStack server would not allow you to connect to RabbitMQ bus from remote host because of an IPTABLE rule. You will have to enable access to the RabbitMQ Port in the IP table.

Architect website/mobile notifications generated by users activities

I am working on a mobile application, this application has some features like users can follow each others, adding comments or reviews, like something .. etc.
So the requirement is we have notifications icon in the app, when the user click on it a list of notification will show up, taken in consider those notifications should be real time.
Many things comes to my mind will reviewing this feature, like using firebase to send the notification, or I can develop internal notification service for this purpose.
The question is what do you suggest guys, do you think using firebase is a good idea for such case? or there is something else you recommend for such case
Thank you in advance.
You can try signalR more manageable than firebase but you need to know programing to manage signalR

Adding Server Push to replace polling on to an asp.net WebAPI REST service

I am hoping this is not too off topic for a post here.
I have an asp.net webAPI service, which provides a number of routes to get near realtime data (ie within say 10 seconds), which required the client application to poll for changes.
I am investigating on which technology would be best to add an "opt in" push notification service, which just pushes "thin" payloads to tell the client application it is now time to call the existing REST route for an update. This way, the push payload is small, and does not contain any security sensitive data (it still gets this using the existing REST security infrastructure)
Cloud based messaging
Previously, I have been told that, for a Mobile application, I should use something like Firebase cloud messaging, or some other messaging service, however this does not seem like the right solution for "subscription based notifications" I am talking about here. I can certainly see this would be useful, if the client is on either iOS or Android device, and wanted messages/notifications/alarms (etc), which could also work when the application is not running, but this does not seem like the right thing to use of these notifications of changed data (which may be happening all the time, sometimes every 5 seconds). Also, I do not want to only target these mobile devices, but also, for example either a web or desktop application, which may also use the same REST service
Other technologies
I have seen mention of Web sockets, or, in the case of asp.net, the option to use SignalR (which will wrap the web sockets, with fallback). SignalR looks good, but my worry is the availability of client libraries for non web / Windows applications (eg iOS, Android). I am also looking at Rest Hooks. These look interesting, but I can't quite see what the actual "push mechanism" is; it almost looks like they need to POST to the subscriber using HTTP, which means the subscriber has to also act as a "server endpoint".
Just after any thoughts / best practices on this, or what others have used?
In particular, (the verification or otherwise), that for this use case, using cloud based messaging is not the right thing to use due to the frequency of these push notifications (ie something where my server gets to the application via another 3rd party service which pushes to the device/application)
Thanks in advance for any suggestions!
Signalr is an option
There are some libraries which you can use in iOS and android. I suggest you to read once https://visualstudiomagazine.com/articles/2013/11/01/how-to-use-signalr-in-ios-and-android-apps.aspx (its a bit older, but on the point)
Android Client: See How to use signalr in Android
Some alternatives :
Pusher (https://pusher.com/)
Android Client: https://pusher.com/docs/android_quick_start
iOS Client: https://pusher.com/docs/ios_quick_start
Socket.IO (https://socket.io/)
Details iOS Client: https://socket.io/blog/socket-io-on-ios/
Details Andriod Client: https://github.com/socketio/socket.io-client-java
To discuss:
Why you will only send a thin payload whith signalr? I see no benefit for that.
Why "using cloud based messaging is not the right thing"? I do not understand your arguments but I do not know how your application looks like.

Delivering notifications just to single users by Pushwoosh

Hullo,
I would like to employ Pushwoosh to deliver notifications to taxi drivers when reservations are made to them. So far I have configured it to deliver notifications to ALL users with the app installed from a php script, but I have not understood how to address them one by one and if that is possible with the free version.
Thanks,
Yes, Pushwoosh answered me and confirmed this option is only possible with the Premium account: that's a real pity.
You are right. From the official documentation :
If you want to send customized messages to only part of the subscribed devices you need to use our Remote API or Tags and Filters. Pushwoosh Remote API and Tags are available for Premium accounts only.
https://www.pushwoosh.com/notifications-to-singlegroups-of-devices/

Parse vs. StackMob vs. other for push notifications service (Appcelerator application)

We have a very basic application (iOS/Android) done in Appcelerator that will receive a single update every week. This update will be sent to all the users subscribed to the push notifications service.
By this moment, we have around 35k installs but 7,000 active users on this application on last month. We've been evaluating two services for all the push notifications:
StackMob
Parse
Appcelerator Cloud services is fine, but we're not willing to pay that much. Parse and StackMob prices are lower than Appcelerator Cloud services and by our analysis, we could even use the free service on both services (StackMob = 60k push notifications + 60k api calls, and Parse 1M api calls + 1M pushes).
If we're going to use Parse, we'll need to buy the Android and iOS module from the Marketplace ($30/year each). Which is fine. On the counterpart, I think we could use the REST API on StackMob for subscribing to the push service.
Questions:
What are your thoughts on both services? Which one do you prefer and why?
Have you used StackMob REST API for subscribing to push notifications?
How do you retrieve Android's token?
Is there any (cost effective) alternative to these services? I also reviewed PubNub, which seems to be great but costs are higher than StackMob and Parse.
Thanks in advance.
Update
I asked the same question on Appcelerator forums. After a while, users came back with several answers and users using Parse.com for this.
I ended implementing Parse.com, which was really simple by using the Android and iOS plugins that are on the Appcelerator Market.
I wanted to chime in and point you to some StackMob references around Appcelerator.
Aaron Saunders has several projects on github showing how to use StackMob with Appcelerator.
https://github.com/aaronksaunders
He also wrote a series of blog posts about it.
http://developer.appcelerator.com/blog/2011/11/titanium-appcelerator-quickie-stackmob-api-module-part-one.html
Our REST API reference is available at https://developer.stackmob.com/tutorials/dashboard/REST-API-Reference
One of the big differentiators between StackMob and others is our custom code option. You can write your own logic in Java, Scala or Clojure and host it on StackMob. The custom code can interact with your user data and other 3rd party APIs.
https://developer.stackmob.com/tutorials/custom%20code
I haven't used those services myself, so I cant comment. However, Another alternative we use (and have been pretty happy with) is Urban Airship. It's relatively cost effective, supports Android, iOS and BB and it has server side libraries for a bunch different languages. There is also a neat blog post outlining how to easily do device registration (at least for iOS) via simple web requests in Appcelerator.
The blog post on its Appcelerator integration is here.

Resources