PDA

View Full Version : Managing user activity in client-server applications.



adutzu89
5th July 2016, 17:41
I know the title is a bit ambigous and I don't know how to formulate it properly so I will just explain it.

I am working on a project involving client-side and server-side instant messanging application for my bachelor degree, what bugs me is how to manage offline/online clients activity so contacts get signaled properly when someone goes offline / disconnects with regards to server's memory and network optimisation?

I am thinking of just keeping the clients connected to the server and notify when connectivity is lost, but isn't just using network bandwith wihtout any purpose?
Should I go for client sending a signal after a period of time to show the server that he is still there? Here again I see bad design that can lead to denial of service when server's bandwith gets suffocated by useless received packages when many clients are in use?
Should server periodically check for clients to see if they are still there? This will increase server's hardware resources usage.

Open to suggestions,

Thank you.

anda_skoa
5th July 2016, 20:24
If you want to reliably recognize a disconnected client, then you need to communicate with it.

Such a "ping" is really not problematic considering traffic and it is only necessary if there is really no other traffic.

Cheers,
_