Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Push Notification mechanism between a server and a client app

I am developping a desktop application using C#, which communicates with a server over a WCF Web Service. It is supposed to be a kind of synchronization application. Meaning that when I make some changes on client app I should immediately update the server too(this is easy using service calls), but also this mechanism should be provided vice versa, a change on server must immediately be applied on several clients. I know I can make polling to my server but this doesn't look neat to me, and also I've heard of duplex services, but I'm not sure if I can use it to implement this mechanism.

I am asking for some suggestions over this issue. Thanks in advance.

like image 578
Tolga Evcimen Avatar asked Aug 01 '13 06:08

Tolga Evcimen


People also ask

How do I push client/server notifications?

At a high-level, the key steps for implementing push notifications are: Adding client logic to ask the user for permission to send push notifications, and then sending client identifier information to your server for storage in a database. Adding server logic to push messages to client devices.

How does push notification Work server?

A push service receives a network request, validates it and delivers a push message to the appropriate browser. If the browser is offline, the message is queued until the the browser comes online. Each browser can use any push service they want, it's something developers have no control over.

What are the key methods of sending push notifications?

Explanation: Send highly personalized messages is the key aspects of sending effective push notifications.


2 Answers

PushSharp :A server-side library for sending Push Notifications to clients (the clients are basically mobile devices - but can be custom as well)! You google to get some tutorial on PushSharp use as well.

like image 172
marifrahman Avatar answered Nov 15 '22 22:11

marifrahman


You need to implement a publish and subscribe design. In WCF you could use net-tcp protocol to connect in duplex clients and server.

You could download a quite good implementation on http://www.idesign.net/Downloads/GetDownload/2032

And you will find a good article here.

Regards

like image 22
Brice2Paris Avatar answered Nov 15 '22 21:11

Brice2Paris