Skip to content

feat(server): switch server's routes to be read or write (step towards async)#2674

Merged
stanislaw merged 2 commits intomainfrom
stanislav/concurrent
Feb 7, 2026
Merged

feat(server): switch server's routes to be read or write (step towards async)#2674
stanislaw merged 2 commits intomainfrom
stanislav/concurrent

Conversation

@stanislaw
Copy link
Collaborator

No description provided.

@stanislaw stanislaw changed the title feat: switch server's function to be async feat: switch server's functions to be async Feb 7, 2026
…s async)

WHAT:

- Make all main_router routes use a read-write lock.
- Make some routes async.

WHY:

This is a step towards better concurrency support when multiple users edit
documents on the StrictDoc server concurrently. Many webserver requests can
be served to users concurrently using async (reader lock) when only the
occasional writes block the readers.

Instead of turning FastAPI into a truly multi-worker concurrent setup, we first
try to make maximum use of a single worker model, following the
"multiple concurrent reads, single writes" approach.

HOW:
- Introduce read/write routes using asyncio read-write lock.
- Add async to some of the most used functions (e.g., get document, get asset).
@stanislaw stanislaw force-pushed the stanislav/concurrent branch from bfc0243 to 96d436b Compare February 7, 2026 18:00
@stanislaw stanislaw changed the title feat: switch server's functions to be async feat(server): switch server's routes to be read or write (step towards async) Feb 7, 2026
@stanislaw stanislaw merged commit d6a0a28 into main Feb 7, 2026
33 checks passed
@stanislaw stanislaw deleted the stanislav/concurrent branch February 7, 2026 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant