code multiplexer -- fast, safe, collaborative editor plugin ecosystem
Find a file
alemi 0154e5a032
fix: try_recv() channel error : delta may be None
basically if there was no change to report, the oneshot would not get
updated which is bad. so we put back the version we got and send a None
(the channel now has nullable TextChange). so basically its always a
try_recv, but its fine since recv is implemented with try_recv + poll
anyway
2024-08-17 00:17:01 +02:00
.github/workflows ci: ugly ci fix with ssh-agent 2024-02-09 01:26:31 +01:00
dist feat(java): expose hash function, use OptionalLong in TextChange 2024-08-16 01:21:21 +02:00
src fix: try_recv() channel error : delta may be None 2024-08-17 00:17:01 +02:00
.editorconfig fix: editorconfig for yaml 2023-08-17 22:51:04 +02:00
.gitignore chore: cleanup, reorganizing java glue 2024-08-08 00:29:54 +02:00
.rustfmt.toml build: initial commit with tonic stubs 2022-07-10 19:01:56 +02:00
build.rs feat: initial work on jni-rs java glue 2024-08-06 23:30:16 +02:00
Cargo.toml feat(lua): hand rolled a_sync! to the rescue 2024-08-17 00:06:57 +02:00
LICENSE fix: not really FOSS 2023-07-16 19:42:42 +02:00
README.md docs: mention about building docs 2023-08-20 01:22:54 +02:00

codemp

This project is heavily inspired by Microsoft Live Share plugin for Visual Studio (Code). While the functionality is incredibly good, I often find issues or glitches which slow me down, and being locked to only use Visual Studio products is limiting. I decided to write my own solution, and to make it open source, so that any editor can integrate it with a plugin.

Documentation

build the crate documentation with cargo doc and access the codemp page with the html redirect docs.html

Design

Client/Server

While initially a P2P system seemed interesting, I don't think it would easily scale with many users (due to having to integrate many changes on each client). I decided to build a client/server architecture, with a central "Workspace" managed by the server application and multiple clients connecting to it. Each client will only have to care about keeping itself in sync with the server (remembering local-only changes and acknowledged changes), leaving the task of keeping track of differences to the server.

Plugins

This software will probably be distribuited as a standalone binary that editors can use to connect to a "Workspace". A dynamic library object might also be a choice. Each editor plugin must be responsible of mapping codemp functionality to actual editor capabilities, bridging codemp client to the editor itself. The client should be able to handle a session autonomously.

Text Synchronization

A non destructive way to sync changes across clients is necessary. I initially explored CRDTs, but implementation seemed complex with little extra benefits from "more traditional" approaches (Operational Transforms). This has to be investigated more.