gristlabs_grist-core/test/server
Dmitry S a91d493ffc (core) Fix issue with 'UNEXPECTED ORDER OF CALLBACKS' in Client.ts.
Summary:
- Substantial refactoring of the logic when the server fails to send some
  messages to a client.
- Add seqId numbers to server messages to ensure reliable order.
- Add a needReload flag in clientConnect for a clear indication whent the
  browser client needs to reload the app.
- Reproduce some potential failure scenarios in a test case (some of which
  previously could have led to incorrectly ordered messages).
- Convert other Comm tests to typescript.
- Tweak logging of Comm and Client to be slightly more concise (in particular,
  avoid logging sessionId)

Note that despite the big refactoring, this only addresses a fairly rare
situation, with websocket failures while server is trying to send to the
client. It includes no improvements for failures while the client is sending to
the server.

(I looked for an existing library that would take care of these issues. A relevant article I found is https://docs.microsoft.com/en-us/azure/azure-web-pubsub/howto-develop-reliable-clients, but it doesn't include a library for both ends, and is still in review. Other libraries with similar purposes did not inspire enough confidence.)

Test Plan: New test cases, which reproduce some previously problematic scenarios.

Reviewers: paulfitz

Reviewed By: paulfitz

Differential Revision: https://phab.getgrist.com/D3470
2022-06-16 23:51:14 -04:00
..
lib (core) Fix issue with 'UNEXPECTED ORDER OF CALLBACKS' in Client.ts. 2022-06-16 23:51:14 -04:00
Comm.ts (core) Fix issue with 'UNEXPECTED ORDER OF CALLBACKS' in Client.ts. 2022-06-16 23:51:14 -04:00
customUtil.ts (core) Fix issue with 'UNEXPECTED ORDER OF CALLBACKS' in Client.ts. 2022-06-16 23:51:14 -04:00
docTools.ts (core) Move Notifier to /ext 2022-05-18 08:02:32 -07:00
gristClient.ts (core) Converting server-side Comm.js to typescript 2022-06-07 15:47:17 -04:00
testUtils.ts (core) Fix issue with 'UNEXPECTED ORDER OF CALLBACKS' in Client.ts. 2022-06-16 23:51:14 -04:00