IBM Worklight 6.0.0.1 - Error during hourly process for push notifications - apple-push-notifications

We're getting an error in WebSphere's SystemOut log approximately every hour on our Worklight Server.
It seems to be trying to validate push notification configuration. We currently have working notifications, using Apple push notifications only. Errors are:
com.notnoop.apns.internal.ApnsFeedbackConnection getInactiveDevices
Failed to retreive invalid devices ava.lang.RuntimeException:
javax.net.ssl.SSLHandshakeException
Our notifications are working, but, what is this hourly process? I don't see anything in the docs regarding a batch process that's run by Worklight Server.
Our setup: Worklight Server 6.0.0.20130909-1459, WAS 8.0.0.6, JDK 1.6.

Worklight uses notnoop open source library to push notification to APNS. This is a known harmless bug in notnoop.
https://github.com/notnoop/java-apns/issues/29

I believe this check is part of the way APNS's feedback service works.
From: Provider Communication with Apple Push Notification Service
Section: General Provider Requirements
Connect regularly with the feedback service and fetch the current list
of those devices that have repeatedly reported failed-delivery
attempts. Then stop sending notifications to the devices associated
with those applications. See “The Feedback Service” for more
information.
As for what it means, it looks to me like your exception quote is cut. Is that all of it?

Related

Push notification from local API in xamarin forms

I am having an API locally hosted in one of the servers (LAN). What I am looking to understand if it is feasible to enable push notification from the server in case of a record entry. Every time a post request is made to the local server, Is it possible to push a notification to a certain mobile device? Please note, I am not considering push notification from web services such as google, Azure, Firebase etc.
It is feasible.
As Sushi said, you can use WebSockets or other Sockets to keep connect between Apps and Server. When client connected to your server, server will record which app is connecting.
By the way, you can custom notification's url between server and app.Use some special characters to distinguish between your various parameters, such as &/[ ]. You are free to set the header and body style of the message. Also, when your message needs to be encrypted, some encryption methods can be used.
Here is a similar discussion about Building an Android notification server can be refer .

Using SignalR to push to clients from a long running process

Firstly, here is state of my application:
I have a request coming in from a client (angularjs app) into my API (web api 2). This request is processed and a record is stored in a database. A response is then sent back to the client.
Currently, I have a windows service polling and processing this record(s).
Processing this record can be long running. As a side effect to processing this record, there might be notifications generated to be sent back to one or more clients.
My question is how do I architect this, such that I can utilise SignalR to be able to push the notifications back to the client.
My stumbling block:
I can register and store (in-memory backed by a db) the client's SignalR connectionid along with the application's own user identifier. This way I can match a generated notification with a signalr client.
At the moment, I'm hosting the SignalR hubs within the IIS process. So how do I get back from the Windows Service to IIS to notify the client when a notification is generated?
Furthermore, I should say I am already using SignalR elsewhere in the application and am using a SQL Server backplane.
The issue's with the current architecture:
Any processing is done in the same web request, and notifications are sent out via SignalR before a response to the client is returned. Luckily, the processing is minimal and very quick.
I think this is not very good in terms of performance or maintenance in the long run.
Potential solutions:
Remove SignalR hubs from IIS and host them somewhere else - windows service?
Expose an endpoint on the API to for the windows service to call to push the notification once a notification is generated?
Finally, to add more ingredients to the mix: Use a service bus to remove the polling component of the windows service, and move to a pub/sub architecture. Although this is more work than I want to chew off right now.
Any ideas/recommendations/constructive criticisms are welcome.
Thanks.
Take a look at this sample for starters
Another more advanced solution can be using a backplane to manage the communications between the front end and the backend...
HTH

Slow APNS on IBM Bluemix

I developed a PHP backend for a mobile app that runs as an Bluemix CF app. I use custom PHP code to send push notifications via APNS. Everything works but the connection to APNS is extremly slow. The same app uses GCM for push Android devices and this works great. Any advice?
It is not uncommon to see a delay in APNs Push Notifications as seen in some of the other posts:
Apple's APNS Delivery is Sometimes Slow
How much delay of ios push notification?
In regards to PHP specifically I also found a post about delay in connection:
Pushing notifications using ApnsPHP is slow
Finally I will share with you a document from Apple showing the architecture of APNs in order to get a better idea of how and where the delay may occur:
Apple Push Service

Sending email in a queue such as MSMQ

I have asp.net MVC 3 application that sending various emails such as client registration, activation etc
Currently using smtpclient and smtp server authsmtp.com. In last 3 months there was number times application used to hang when sending email and smtp is not responding.
I am now required to review the process and improve with following improvement.
1.) Application should not hang when smtp server is not responding.
2.) Queue email for later delivery if smtp server is not available. Re-try delivery for next 24 hours
3.) Add extra logging for email queued, sent or failed (After 24 hrs)
I would like to know what will best option to implement the above requirement.
The application is hosted in windows azure environment.
I thought to use MSMQ as provides message queueing and I can log the details once each task is started and completed.
Reference : http://dotnetslackers.com/articles/aspnet/Sending-email-from-ASP-NET-MVC-through-MVC-and-MSMQ-Part1.aspx
The problem is that MSMQ is not supported on windows azure.
Please advise ?
Thanks
There is an example on WindowsAzure.com that covers a similar topic as this http://www.windowsazure.com/en-us/develop/net/tutorials/multi-tier-web-site/1-overview/

Clarification on Apple APNS

Does APNS Feedback Service accounts all the reasons that could cause notifications delivery failure. There can be multiple reasons for failure like
a. The user has uninstalled the application.
b. The device is switched off for a longer duration.
c. The device does not have internet connection.
The apple doc on "Feedback Service" says that
"If a provider attempts to deliver a push notification to an application, but the application no longer exists on the device, the device reports that fact to Apple Push Notification Service. This situation often happens when the user has uninstalled the application"
This seems to suggest that APNS only invalidate the devices which have uninstalled the application. Can anyone please clarify if my assumption is correct?
How many times does APNS attempt to deliver the notification before it blacklist the device in the feedback service?
As you have correctly stated, the Feedback service will only return device tokens that have uninstalled the app.
Regarding situations b and c:
b) and c), taken from the Quality of Service section in the official Push Notification guide it states the following:
Apple Push Notification Service includes a default Quality of Service
(QoS) component that performs a store-and-forward function.
If APNs attempts to deliver a notification but the device is offline,
the QoS stores the notification.
It retains only one notification per application on a device: the last
notification received from a provider for that application.
When the offline device later reconnects, the QoS forwards the stored
notification to the device. The QoS retains a notification for a
limited period before deleting it.
I believe this answers those queries; in relation to "how many attempts before being blacklisted" - I sincerely doubt you will find any specific numbers for this. (else people would use them as workarounds)
After completing the delivery of a message, I would highly recommend connecting to the feedback service, seeing if any tokens were rejected and then immediately removing these from your database. Hope this helps!

Resources