New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: rewrite collab server connecting #4881
Conversation
This pull request is being automatically deployed with Vercel (learn more). excalidraw – ./🔍 Inspect: https://vercel.com/excalidraw/excalidraw/2er1P3TS9KSfzm6oKygvRJQiFg6E excalidraw-package-example – ./src/packages/excalidraw🔍 Inspect: https://vercel.com/excalidraw/excalidraw-package-example/FfwtjRYqPHv3zPvYQEtPcGyTwsNj |
# Conflicts: # src/excalidraw-app/collab/CollabWrapper.tsx
@@ -30,7 +30,25 @@ const generateRoomId = async () => { | |||
return bytesToHexString(buffer); | |||
}; | |||
|
|||
export const SOCKET_SERVER = process.env.REACT_APP_SOCKET_SERVER_URL; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is going to break everyone that currently uses excalidraw from source with their own specific server. Could we keep supporting both? If REACT_APP_SOCKET_SERVER_URL is set then return it otherwise use REACT_APP_PORTAL_URL instead?
Switched to a new collab server
Connecting to a collab server is done in two steps now:
portal.excalidraw.com
This allows us to switch servers etc. more-or-less immediately without having to push things and waiting for all clients to update to latest ServiceWorker (which in many cases takes months or even more).
disabled
polling
socketIO transport (all the browser we support have support for WS)removed preconnecting to our WS server. The optim is not worth the downsides (increasing load on our servers). If needed, we can optimize differently.