6036830049
## Problem We're trying to figure out why we sometimes see high latency when collaborating, even though the collab server logs indicate that messages are not taking long to process. We think that high volumes of certain types of messages, including `UpdateFollowers` may cause a lot of messages to queue up, causing delays before collab sees certain messages. ## Fix This PR reduces the number of `UpdateFollowers` messages that clients send to collab when scrolling around or moving the cursor, using a time-based throttle. The downside of this change is that scrolling will not be as smooth when following someone. The advantage is that it will be much easier to keep up with the stream of updates, since they will be sent much less frequently. ## Release Notes: - Fixed slowness that could occur when collaborating due to excessive messages being sent to support following. --------- Co-authored-by: Nathan <nathan@zed.dev> Co-authored-by: Conrad <conrad@zed.dev> Co-authored-by: Antonio Scandurra <me@as-cii.com> Co-authored-by: Thorsten <thorsten@zed.dev> Co-authored-by: Thorsten Ball <mrnugget@gmail.com> |
||
---|---|---|
.. | ||
k8s | ||
migrations | ||
migrations.sqlite | ||
src | ||
.admins.default.json | ||
.env.toml | ||
admin_api.conf | ||
basic.conf | ||
Cargo.toml | ||
LICENSE-AGPL | ||
README.md |
Zed Server
This crate is what we run at https://collab.zed.dev.
It contains our back-end logic for collaboration, to which we connect from the Zed client via a websocket after authenticating via https://zed.dev, which is a separate repo running on Vercel.
Local Development
Detailed instructions on getting started are here.
Deployment
We run two instances of collab:
- Staging (https://staging-collab.zed.dev)
- Production (https://collab.zed.dev)
Both of these run on the Kubernetes cluster hosted in Digital Ocean.
Deployment is triggered by pushing to the collab-staging
(or collab-production
) tag in Github. The best way to do this is:
./script/deploy-collab staging
./script/deploy-collab production
You can tell what is currently deployed with ./script/what-is-deployed
.
Database Migrations
To create a new migration:
./script/sqlx migrate add <name>
Migrations are run automatically on service start, so run foreman start
again. The service will crash if the migrations fail.
When you create a new migration, you also need to update the SQLite schema that is used for testing.