|
Hi,
I am stuck in the Push notification since some times and I can't find what is wrong in my project.
Here is my problem : I created a push service on the server. As soon as I register to this service, all my queries in the application takes forverer. Let's say I create a Company in a ViewModel and a 2nd Viewmodel query the cache to load this same entity (on the exact same model as Cocktail). This should be very fast but no, it can takes more than 1 minute (when it doesn't timout ...) !
If I don't register to the service, the application works just fine.
I tried to look what's going on in fiddler and the entityService.svc/sl waits for the response all the time.
About the configuration I added the notificationService key to the web.config and added the SL5 server polling dll to the server. On the client I added the SL5 polling dll and the push dll of devforce.
I did try to reproduce it on Temphire but it works just fine. I have the same configuration, same assemblies (I even converted temphire to SL5 to check if the problem was with SL5). Nothing looks wrong in the logs, I compared the Temphire's logs with mine and they have the same stuff about the notification.
I am using Devforce 6.1.8 with cocktail.
What could cause this delay ? What should I look for ?
if that matter, here is my test push service (and it works, I get the notification on the client) :
[AllowRpc]
public static void NewDossiersAdministratifs(Guid serviceKey, INotificationManager notificationManager, EntityManager entityManager)
{
_serviceKey = serviceKey;
_notificationManager = notificationManager;
_manager = new AdministratifEntities(entityManager);
while (true)
{
Check();
// Sleep de 30 seconds entre les checks
Thread.Sleep(1000 * 30);
}
}
private static void Check()
{
var subscribers = _notificationManager.GetSubscribers(_serviceKey);
if (!subscribers.Any()) return;
var ids = new List<int>() {1, 2};
foreach (var subscriber in subscribers)
{
_notificationManager.Send(_serviceKey, subscriber, ids);
}
}
|