AppFlowy-IO / AppFlowy-Cloud

AppFlowy is an open-source alternative to Notion. You are in charge of your data and customizations. Built with Flutter and Rust.
GNU Affero General Public License v3.0
524 stars 145 forks source link

feat: independent appflowy collab websocket server #640

Closed khorshuheng closed 1 week ago

khorshuheng commented 1 week ago

This is a minimal implementation of an independent appflowy collab websocket server. There are still some features missing, such as TLS, tracing and support for large chunk data edit over http POST.

This PR also depends on changes in https://github.com/AppFlowy-IO/AppFlowy-Cloud/pull/637.

After APPFLOWY_COLLAB_GROUP_PERSISTENCE_INTERVAL and APPFLOWY_COLLAB_GROUP_PERSISTENCE_INTERVAL APPFLOWY_COLLAB_EDIT_STATE_MAX_SECS are set to a low value (eg. 3 seconds), and LOCALHOST_WS is set to ws://localhost:8001/ws/v1, all tests under collab passed except for write_big_chunk_data_init_sync_test and post_realtime_message_test, because the required http endpoints have not been implemented yet.