runar-rkmedia / gotally

0 stars 1 forks source link

Litestream or LiteFS #7

Closed runar-rkmedia closed 1 year ago

runar-rkmedia commented 1 year ago

If the game is to be played with every move and all logic being conteolled by the server, lowering the time each request takes is vital.

Almost all this time is due to the sql-calls the server does. Each call to the database is often 150ms, which is too slow, especially if there are multiple calls.

Caching has been disabled to highlight this issue.

Sqlite brings the database much closer to the application (same host, no network-call). But the database is not distributed.

LiteFS seems like a good match here, since it is regular sqlite, but makes it distributed.

runar-rkmedia commented 1 year ago

LiteFS is now used on fly.io. It looks awesome