You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sorry if this is not the right place to ask this, but I was wondering if there's an article / post somewhere detailing how the Lichess client uses the API to display the information that it does? Some friends and I want to make our own spinoff Lichess-inspired site for other games like ultimate tic tac toe and similar, and while it will probably be a fun hobby project we're concerned with doing it "right".
I've tried reading the repository wiki and searching past discussions and blogs, but I haven't really found anything that matches what I'm looking for; the source code is also a bit confusing to me as I haven't worked with Scala before. I've read through the API docs, and while I think I can infer how live games are handled, I guess my questions are:
I know there's a websocket connection, but what exactly is sent over it? Is it just so the client can send heartbeats to let Lichess know they're online?
When a game starts, how is the "your record against this player is ..." section at the bottom handled? Fetching all games and filtering by ones against a certain player seems expensive.
How are statistics like "you are better than x% of ... players" handled? Fetching all users and mapping over all of them seems expensive.
How are the rating charts on the profile pages generated? Sending every data point seems expensive, especially when theres one point per day per variant played on that day.
When reading some of the socket code, I noticed references to lag handling; how exactly does this work (both client and server side)? Is the clock purely client-side as well?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi!
Sorry if this is not the right place to ask this, but I was wondering if there's an article / post somewhere detailing how the Lichess client uses the API to display the information that it does? Some friends and I want to make our own spinoff Lichess-inspired site for other games like ultimate tic tac toe and similar, and while it will probably be a fun hobby project we're concerned with doing it "right".
I've tried reading the repository wiki and searching past discussions and blogs, but I haven't really found anything that matches what I'm looking for; the source code is also a bit confusing to me as I haven't worked with Scala before. I've read through the API docs, and while I think I can infer how live games are handled, I guess my questions are:
Thanks in advance for your time!
Beta Was this translation helpful? Give feedback.
All reactions