0
votes

I'm using Worklight 6.1 on Liberty profile 8.5.5 in Windows XP in a VMWare in a Mac.

I have an Android app that receives notifications. I'm using an adapter to send the notifications.
It is my own app but the adapter is the same as in the push notifications sample project provided by IBM.

For sending the notification I'm directly calling the adapter from a browser using the REST call (protocol://server:port/app/[dev/]invoke?adapter=myAdapter&procedure...)

When I execute the application in the development server the notifications arrives almost immediately, but when I test the application in the test server (mentioned above) the notifications takes a lot of time to arrive, if they arrive.

However, when the notification does arrive, the next notifications arrives in seconds.

It is something I have experienced in the past also with previous Worklight versions.
I do not know what is the difference between the servers or if the problem is related to the server.

Any hints for debugging this?

1
Also is there some "benchmark" you've done that depicts the "slowness"? - Idan Adar
The difference is from two seconds using the studio server profile to several minutes in the stand alone server. And not always the notification arrives. Other thing is that once a notification arrives the following ones arrive also in seconds. - Jxadro
One thing to keep in mind about notifications is that once Worklight dispatches it, it does not control when will the notification(s) actually arrive to the client, that is entirely up to GCM. So what I would have you do is check in the logs for when the message was actually dispatched from the Worklight Server to GCM, in the development server compared to the testing/production server, and then also check if there is anything in the network that may interfere between the 2 server's setup - Idan Adar
Is there any trace I can configure to know exactly when the notification is sent to GCM? Not a trace in the adapter but a server trace. - Jxadro
Try with this user documentation topic: pic.dhe.ibm.com/infocenter/wrklight/v6r0m0/… ---- additionally, it might be that the first time the handshake takes some time, or that for the test server it takes more time to resolve DNS, but once it resolved the connection is fast. - Idan Adar

1 Answers

0
votes

I have enabled the trace:

<logging traceSpecification="*=audit=enabled:com.worklight.integration.notification.*=finest=enabled" />

I can see the trace:

com.worklight.integration.notification.gcm.GCMSender         1 sendNoRetry Sending JSON to GCM server: {"collapse_key":"myPush","data":{"alert":"Hay una nueva ficha","payload":"{\n   \"alias\": \"myPush\",\n   \"identificador\": \"a035\",\n   \"nombre\": \"aName35\"\n}","badge":"1"},"registration_ids":["APA91bG03cXkyVM6pA2-CO1g-tZUQL6FwJgugaa68YngIyGbbR_oDzVNn-1RULpoktvMUKwF3D1qK4bx-4OVeAbUzBqNpqO3m_1hwz0Z6I0B_DS_Jvc0wzI_fjKpJ9vqPNO58Bdt40ms"]} [project DemoM]

But I do not know if that trace means that everything has gone ok and the message is now in the GCM servers.

I have also enabled sniffers (WireShark in Mac and SmartSniff in XP) in dev server and stand alone server but I have not been able to detect any pattern. Everything is under https so I only see some traces for google hosts but I can not take any conclusions. Although it is valid to see a trace for google gcm immediately after the server trace that takes less than 500ms

Anyway now it is taking time to the notification to arrive in both servers so I guess everything is working fine in the worklight side.