Live data from Hacker News

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

davidreis.me

41–50 of 162 posts

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

#41

- "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…

This looks like the relevant fix: https://github.com/lichess-org/scalachess/pull/154

(the broken code checked that the only pieces on the king's path to its new position were kings and rooks of the appropriate color)

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

#42
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…

> Unfortunately, I'm afraid, drawing something like that during interview may not land a job at faang =(

Yet another reason to be skeptical of the quality of hiring in faang if anything.

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

#45
post #22

Earlier quoted context omitted.

What do you mean? If you open a web socket connection it should behave like a normal TCP connection. All sent data guaranteed to be delivered complete and in order, unless the connection fails.

Unless the connection fails, at which point you have no idea when it failed. You know that the other side received all stream offsets within [initial, X] with X ≥ last received ACK, but other than that you have no idea what X is. Even getting the last received ACK value out of whatever API or upper-level protocol you’re using could be nontrivial, because people rarely bother.

[deleted]

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

#47

Earlier quoted context omitted.

Sometimes simplicity is not the best goal. Redundancy, scalability, decoupling, resilience, best possible handling of errors, cost optimization, etc. may be more important at the scale Netflix operates at.

> 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.

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

#48

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.

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

#49
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…

> Unfortunately, I'm afraid, drawing something like that during interview may not land a job at faang =( Yet another reason to be skeptical of the quality of hiring in faang if anything.

Why feel anything about it at all? You work at FAANG: be glad for the money or quit if there isn't any. You don't work at FAANG: bad hiring makes it easier for you to get hired and make money.
Post reply on HN