Live data from Hacker News

What happens when you make a move in lichess.org?

davidreis.me

71–80 of 162 posts

Re: What happens when you make a move in lichess.org?

#71
post #10

- "While these moves could be calculated client-side, providing them server-side ensures consistency - especially for complex or esoteric chess variants - and optimizes performance on clients with limited processing capabilities or energy restrictions." Just a wild guess: might be intended to lower the implementation barrier for new open-source software clients on new platforms, and/or preempt them from implementing…

For those curious about the illegal move, it seems like it's allowing queen side castling through the king side rook (or vice versa). eg. if this is the first rank, R _ _ R K _ _ _, then you could make the move O-O-O and end up with _ _ _ R K _ _ _ Naturally, it's not possible to view this move anymore, but this game ( https://lichess.org/XDQeUk6j#48 ) has everything up until the last legal move right before the ille…

Wouldn't the bug with queen side castling end up with _ _ K R _ _ _ _?

Re: What happens when you make a move in lichess.org?

#72
post #37

So essentially lichess chose StackOverflow approach - (rather) beefy servers, instead of "treating them like a cattle". Interesting that they accumulate and periodically store game state. Unfortunately it is not very clear, where they store ongoing game state - in redis or on server itself. Also cost breakdown doesn't have server for redis, only for DB. BTW, their github has better architectural picture, than overly…

I remember Meta having a few outages of their own. And outlook as well. So I'm not sure what to think now. But sure, on paper FAANG is redundant and hence better.

Re: What happens when you make a move in lichess.org?

#73
post #60

Earlier quoted context omitted.

> it feels like the SERVER is tracking the time TBH this is what I expected for all online chess. How else to reconcile the two players' differing clocks and also prevent client-side cheating?

It hasn’t been done client side in any pvp game I’ve heard of.

I'm pretty sure freechess.org did.

Re: What happens when you make a move in lichess.org?

#75

Earlier quoted context omitted.

Track the two clients pings? What client side cheating prevention would you need to do in chess? Afaik you can't cheat by clipping through walls or jumping around on the map.

The client side cheating would by lying about when you received the packet in order to give yourself more time to think. Even if you only shifted it by 200ms per move, that could add up to a lot over the course of a long game.

To give additional context: bullet chess can go down to 1 minute per player. Lying about a few millisecond per move there is huge.

Re: What happens when you make a move in lichess.org?

#76

I wish this discussed the timing arbitration of each move. Based on the packet information (if that is correct & complete) then the timing is done entirely on the clients. However, they show the time in seconds which can't be right so I am curious how accurate this packet schema is (or if those are float values). Regardless, one thing I find maddening about chess.com is the time architecture of the game. I haven't se…

Vladimir Kramnik agrees with your observations about chesscom.

Yes, he had timing problems in an online tournament on chess.com (against a Mexican GM in the same room) where his computer did not have all Windows updates and/or the timezone was wrong.

chess.com confirmed the issue.

Re: What happens when you make a move in lichess.org?

#77

Earlier quoted context omitted.

> Redundancy, scalability, decoupling, resilience, best possible handling of errors, cost optimization, etc. may be more important at the scale Netflix operates at. So much that they built a tool to intentionally make things difficult (read: it arbitrarily stops production system processes/containers/etc.) and help inform what decisions to make in favor of fault tolerance. > Exposing engineers to failures more freque…

Embarrassing. I built 99% of Netflix functionality locally with VLC and a subdirectory of mkv files.

Good for you. Now please aim 10,000 requests a second at your file server.

Re: What happens when you make a move in lichess.org?

#78
post #46
post #27

lichess is one of the best sites on the internet. very happy to contribute my $5/mo

Hello, fellow Patron! Even though nowadays I hardly have time to play, I'm still happy to support such a delightfully honorable and usable(!) open-source project.

People love mentioning that they donate to LiChess.

It's a weird trend. Altruism truly does not exist

(I donated btw) (Probably more than you) (But who's counting)

Re: What happens when you make a move in lichess.org?

#80
post #59

> - l: Probably some length? I don't understand why the author didn't just look this up in the source code. Lichess is open source and we can see exactly what this field is here, it's the average lag: https://github.com/lichess-org/lila/blob/45b5f0cfbbf6c045ad7... send = (t: string, d: any, o: any = {}, noRetry = false): void => { const msg: Partial = { t }; if (d !== undefined) { if (o.withLag) d.l = Math.round(this…

To be fair, the author already put tons of work into this post. Don't begrudge them for not doing even more.
Post reply on HN