Reward: Free Platinum Membership and 1 Year of Chess Mentor!

Sort:
beer-inactive

I saw this over the last few weeks, but never gave it any thought until Erik's posting yesterday.

For reference, my accounts still shows LIVE red if I stay out of chess.com for ten minutes or longer.  I have not been logged into LIVE chess for a few hours now.

beer-inactive

If Erik (or another chess.com administrator) would like to review my account in this status, please let me know and I will ignore chess.com for ten minutes so my account can go back to LIVE red. 

I will remain connected to chess.com until 0900 EDT (i.e. I will not log off until that time).

Please send me a message with any questions.

-beer

SleepyWorker

Easy solution to your problem:

Get rid of the live chess indicator

problem=solved

tactician_prodigy

beer i can check. i will be at my computer for next hour or so. I work at 9am and its 7:20am here. Message me.

tactician_prodigy

Look at this beer. got this when you went off.

GordonMcKinney

Erik, the only way to reliably detect someone is online it to have a heart beat. There is no reliable way to detect an 'exit' event from a browser. (TCP does something similar with ACK packets)

I have coded similar functions for a large multinational to ensure documents being editted are auto-saved *and* to detect multiple logins by the same user from different work stations.

The psuedo code is this:

a) Send a ping once a minute (or smaller quantum)

b) Keep a counter against that user's account (DB perm table or DB memory only table).

c) If time now is greater than ping time by more than N x quantum then the user is no longer online. The N represents the amount of time you will accept silence before the user is considered offline.

d) Live chess will throw a "live" flag along with its ping. The main site will throw a "online" flag, etc.

e) Finally, ensure the heart beat page is hack proof by using your PHP session as the identity (no request params) and check your performance profile to keep this function light on its feet.

The logic is simple and bullet proof for unreliable async communiction.

GordonMcKinney

Oh, and the site continues to go from strength to strength - I cannot imagine a more complete or polished effort. I bet the competition is green with envy Laughing

beer-inactive

Nice screen shot, tactician_prodigy (Tom Jones and all).

Gokukid

Erik, i don't or i've never played Live Chess but i visited it once so i somehow know what it looks like. 

I will present a scenario: i logged on to chess.com.  The main window appears.  I clicked Live Chess.  A new window appears bringing me to live chess.  Whether i stay on Live Chess for more or less than ten  minutes I exit it, say, I went back to the main window to check some forums, news, blogs, etc.

Now if I click the browser's Back button it will bring me back to the Live Chess window but i'm not sure whether my status remained red or not.

I click Forward to bring me to main window again.

I'm not sure if it's about the computer memory's 'cache' that's causing the bug, my thought on this is the probability is high.

Gokukid

If you're in Live Chess and your status indicator turns red, this is registered in the memory cache.  After exiting Live Chess that information in the cache might still be there.  So if the cache is cleared, say, by clicking ctrl+F5, the bug from red to green might have been reset.

beer-inactive

Logging off chess.com for the day, but the notes above provide a successful process for reproduction.

Best of luck, Erik.

chessthebest

bump

fluffycrater

Maybe they get disconnected from the server because if you were in the middle of the game you wouldn't close on purpose. You should figure out how to not get disconnected first.

beer-inactive

I logged off chess.com at 0900.  I just logged on again to check a couple of games, and my user image has the LIVE icon (in green currently) when I checked a friend's page (jaibyrd).

timepass

Well, when i am waiting for a move on a board, if the player is offline, refreshing the browser shows the player offline, so maybe having a player online setting to refresh the board or status every 2 minutes, may help us all.  Not sure if that will help you.

erik

thanks all! working on verifying different approaches. :)

Nilesh021

My dad would know, but he hates me playing chess. He's really really good, but I can't help you, sorry.

jd_ski

I'm currently seeing beer as logged into LIVE with the red icon even though he hasn't logged into live since yesterday.

erik

FYI - we're still investigating the solutions presented here. i will report mid next week. thank you all!

tactician_prodigy

your welcome, will help anyway i can.

This forum topic has been locked