Click here to Skip to main content
15,905,912 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Thought of the day Pin
W Balboos, GHB12-May-17 5:31
W Balboos, GHB12-May-17 5:31 
GeneralRe: Thought of the day Pin
megaadam12-May-17 5:36
professionalmegaadam12-May-17 5:36 
GeneralRe: Thought of the day Pin
jeron112-May-17 5:54
jeron112-May-17 5:54 
GeneralRe: Thought of the day Pin
Daniel Pfeffer12-May-17 5:59
professionalDaniel Pfeffer12-May-17 5:59 
GeneralAPOD Pin
R. Giskard Reventlov12-May-17 4:35
R. Giskard Reventlov12-May-17 4:35 
GeneralPush vs. Asynchronous pull Pin
Rob Philpott12-May-17 0:30
Rob Philpott12-May-17 0:30 
GeneralRe: Push vs. Asynchronous pull Pin
Duncan Edwards Jones12-May-17 1:00
professionalDuncan Edwards Jones12-May-17 1:00 
GeneralRe: Push vs. Asynchronous pull Pin
Jochen Arndt12-May-17 1:03
professionalJochen Arndt12-May-17 1:03 
I don't see much differences between "Long polling" and push notifications.

You will have a blocking thread on the client in both cases (wait for answer or wait for incoming push notification).

On the server you will have some kind of signal handling upon change events. With long polling it must then step through a list of pending poll requests. Similar for push notifications where a list of registered clients must be processed.

The drawback of the long polling method is that you have active connections for longer periods of time. This might be problematic for servers handling many clients (connection handles are a limited resource). It might be also necessary to handle specific events like informing the server when a client terminates (de-register in the term of push notifictaions).

To reduce the network trafic regardless of the method use UDP because there is usually no need for acknowledgments and missing a notification (which usually happens very rarely) should not care.

If the data change rate is not too high I would go for a simple UDP push solution:
Clients register at the server using a TCP command packet and start listening for UDP packets on a defined port. The server tracks the registered clients in a list and sends UDP notifications to each registered client upon change events.

If the clients are all located within a local network it is even simpler: Just send UDP broadcasts to the local net.
GeneralRe: Push vs. Asynchronous pull Pin
Daniel Pfeffer12-May-17 1:08
professionalDaniel Pfeffer12-May-17 1:08 
GeneralRe: Push vs. Asynchronous pull Pin
Jochen Arndt12-May-17 1:16
professionalJochen Arndt12-May-17 1:16 
GeneralRe: Push vs. Asynchronous pull Pin
harold aptroot12-May-17 3:29
harold aptroot12-May-17 3:29 
GeneralRe: Push vs. Asynchronous pull Pin
Daniel Pfeffer12-May-17 5:42
professionalDaniel Pfeffer12-May-17 5:42 
GeneralRe: Push vs. Asynchronous pull Pin
raddevus12-May-17 2:26
mvaraddevus12-May-17 2:26 
GeneralRe: Push vs. Asynchronous pull Pin
Vark11112-May-17 2:48
Vark11112-May-17 2:48 
GeneralRe: Push vs. Asynchronous pull Pin
Marc Clifton12-May-17 3:33
mvaMarc Clifton12-May-17 3:33 
GeneralRe: Push vs. Asynchronous pull Pin
Ravi Bhavnani12-May-17 4:28
professionalRavi Bhavnani12-May-17 4:28 
GeneralRe: Push vs. Asynchronous pull Pin
PureNsanity12-May-17 4:33
professionalPureNsanity12-May-17 4:33 
GeneralRe: Push vs. Asynchronous pull Pin
Munchies_Matt12-May-17 5:44
Munchies_Matt12-May-17 5:44 
GeneralRe: Push vs. Asynchronous pull Pin
PIEBALDconsult14-May-17 13:09
mvePIEBALDconsult14-May-17 13:09 
GeneralSo here I am at 5:23 at work... Pin
Marc Clifton11-May-17 23:26
mvaMarc Clifton11-May-17 23:26 
GeneralRe: So here I am at 5:23 at work... Pin
OriginalGriff12-May-17 0:03
mveOriginalGriff12-May-17 0:03 
GeneralRe: So here I am at 5:23 at work... Pin
Daniel Pfeffer12-May-17 0:12
professionalDaniel Pfeffer12-May-17 0:12 
GeneralRe: So here I am at 5:23 at work... Pin
OriginalGriff12-May-17 0:19
mveOriginalGriff12-May-17 0:19 
GeneralRe: So here I am at 5:23 at work... Pin
Rage12-May-17 0:57
professionalRage12-May-17 0:57 
GeneralRe: So here I am at 5:23 at work... Pin
Super Lloyd12-May-17 2:42
Super Lloyd12-May-17 2:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.