[SOLVED] Client idle timeout in union 2.0

All Union Platform questions, comments, feature requests, and bug reports.

Client idle timeout in union 2.0  

Postby sathyapriya » Wed 23 Jan 2013 04:04

hi,

How to kick the clients who are all in idle for more than 30 min in union platform server?. I use client-timeout setting in union.xml but it's not working for me. Is any code modification in client or server side. I am using reactor as client

thanks,
sathya
sathyapriya
 
Posts: 13
Joined: Tue 11 Dec 2012 08:59

Re: Client idle timeout in union 2.0

Postby colin » Fri 01 Feb 2013 18:59

hi sathya,
union.xml's client_timeout setting is intended to detect network failures only, and therefore does not affect clients that successfully send heartbeats/pings on a regular basis.

Union does not currently have an application-level activity timeout detection built-in, but it's on the roadmap:

http://factory.user1.net/issues/show/689

For now, you will have to implement application-level activity detection yourself. Here is the recommended implementation:

1) on a regular interval, have every connected client send a module message to the server called ACTIVITY
2) when the server receives an ACTIVITY message from a client, it should assign the current time to a server-only, non-shared attribute named lastActive on the client
3) on a regular interval, the server-side module should loop over all connected clients, check which clients have not sent an ACTIVITY message recently, and disconnect them

alternatively, if you want to do the inactivity detection all client side, you could write some actionscript code to monitor user activity, and automatically disconnect the client (reactor.disconnect()) after receiving no inputs for a certain period.

colin
colin
 
Posts: 232
Joined: Mon 17 Oct 2011 18:47

Re: Client idle timeout in union 2.0

Postby sathyapriya » Tue 05 Feb 2013 00:14

Thanks colin. I will try out
sathyapriya
 
Posts: 13
Joined: Tue 11 Dec 2012 08:59


Return to Union Platform

Online

Users browsing this forum: No registered users and 4 guests