From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuan Fu Newsgroups: gmane.emacs.devel Subject: Re: A new collaborative editing package (maybe tangent) Date: Sat, 30 Dec 2023 12:09:36 -0800 Message-ID: References: <3E633CB5-B727-4933-8CF1-E1044CF39E70@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31969"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel To: Arne Babenhauserheide Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Dec 30 21:10:42 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rJffO-0008CB-Ov for ged-emacs-devel@m.gmane-mx.org; Sat, 30 Dec 2023 21:10:42 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rJfeb-00038e-PF; Sat, 30 Dec 2023 15:09:53 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rJfeZ-00038C-Hr for emacs-devel@gnu.org; Sat, 30 Dec 2023 15:09:51 -0500 Original-Received: from mail-oo1-xc2e.google.com ([2607:f8b0:4864:20::c2e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rJfeX-0005pa-MZ for emacs-devel@gnu.org; Sat, 30 Dec 2023 15:09:51 -0500 Original-Received: by mail-oo1-xc2e.google.com with SMTP id 006d021491bc7-59446cd46e9so3706552eaf.3 for ; Sat, 30 Dec 2023 12:09:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1703966988; x=1704571788; darn=gnu.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Ukyqr8b5VvrFNDFG1XUUnM3jzBHleldhNajUx0OneL4=; b=kXxnaqzJn3KtzZ1pG4+a2n4f6Hv1CT5mekTxJdMtY6XCyWe5d+HrW6+qBGTAHIz/rV Xd5eeeXBcLQoBF68J8gKPdqjc0bb2zSIX2/HneWVXG7pmMuCrEcba/BEk4nspVZmRLWW pvWRcuPW+fVWIX3pZyV+MCjMdgYBzAu7BZfvsSGTcdbq0bx34GuQo3t4xSzTklgISZji R5aE6UuZCaO02pMqdUS+z76yPNRdmikO+xwQUQW0jXjfUWa8gejn2rp75+clZR5rNzWL XlcyfvARN90pwh5VzcrPdvd2rhuM1DmCcXzN/uvTdapDEICtDjNBp8JRAvd59x7nQyVm Fwzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703966988; x=1704571788; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Ukyqr8b5VvrFNDFG1XUUnM3jzBHleldhNajUx0OneL4=; b=YdGwB1iesHSj6fHaH5e8TMZdpWHlzztUJHXXIRTQ28nOvts2LMGgbTwWFA0UNbuKT/ YvKZCtw59BoRdby0mjMf5wEXmDCfhiheS8fYMlv3/F9cEensU2VB76NomWHSz0ul2t1q UF4gykTJJb8v4BVtxhxeifouKm51Pt+1N5ZousKYRS5IQLxlOeOj+Y4OEkxT6ItNuBOH GYFW0avC6SGHU4erBFi//a1SZUAtbjZS2qdS+Rmi8REqGu/3i9tFcGwKeZDOIRTU1mgZ QaZmFOmzHi7gOKASCKATKqHEmDX0LX1kgA6qxH2NBSidOdlJbh3zgLtgAU2jL5AbqnW+ 9LIw== X-Gm-Message-State: AOJu0YzCIvZMdPPCLmRevN7WoC8WuT6vJ4VVlabd3rzLlt8Ve93gJ1rZ JQgE7/rmxBD3JX5LP81pKlw= X-Google-Smtp-Source: AGHT+IGnSlxJXstyKRpuSgapOQA6WOCemRb6CUCsYZPCoBnI6TpXn8Ew3tlb8RMioJh0CVsKu/GjTQ== X-Received: by 2002:a05:6358:3388:b0:173:24:b272 with SMTP id i8-20020a056358338800b001730024b272mr17096611rwd.23.1703966987734; Sat, 30 Dec 2023 12:09:47 -0800 (PST) Original-Received: from smtpclient.apple (172-117-161-177.res.spectrum.com. [172.117.161.177]) by smtp.gmail.com with ESMTPSA id ce19-20020a17090aff1300b0028c056912dbsm16418258pjb.55.2023.12.30.12.09.47 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 30 Dec 2023 12:09:47 -0800 (PST) X-Priority: 3 In-Reply-To: X-Mailer: Apple Mail (2.3731.700.6) Received-SPF: pass client-ip=2607:f8b0:4864:20::c2e; envelope-from=casouri@gmail.com; helo=mail-oo1-xc2e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:314378 Archived-At: > On Dec 30, 2023, at 12:56 AM, Arne Babenhauserheide = wrote: >=20 > Yuan Fu wrote: >> My goal for collab-mode is for it to be a p2p, cross-editor, = real-time >> collab editing package (Emacs collab with Vim!). It works kind of = like >> language servers (LSP): a local =E2=80=9Ccollab server=E2=80=9D = (called collab >> process) talks to the editor over JSONRPC, and collab processes talk >> among themselves over the internet. Most of the hard work is done by >> the collab process and the editor end should be relatively easy to >> implement. >=20 > This sounds pretty interesting! >=20 >> As of right now, collab-mode has these features: >> - Sharing a plain text file >> - Sharing a directory (still have rough edges) >=20 > Does it work well with editing modes? Plain text can be a loose = definition with Emacs :-) Plain text as opposed to rich text (which is usually stored in some = internal tree structure). >=20 > Example: When I run a plantuml code block in an org file in a shared = directory, will the other side see the generated diagram inline? >=20 >> - Undo & redo (linear) >> - Builtin NAT traversal >=20 > How do you achieve NAT traversal? > (that's interesting to me from a technical / sharing techniques = viewpoint; would love to pass it on to students in a lecture in spring) I used webrtc. Rust has a native implementation for it, other languages = probably have bindings to libwebrtc. Specifically, webrtc uses ICE (and = STUN and TURN) protocol for NAT traversal, and webrtc itself defines a = data channel abstraction on top of them. The stack roughly looks like this: ------------------------------------- Data channel protocol ------------------------------------- SCTP - congestion and flow control ------------------------------------- DTLS - security ------------------------------------- UDP & ICE - transport & NAT traversal ------------------------------------- > I've seen that you use a signaling server, does this manage to enable = direct connections between two NAT'ed computers? Right. >=20 >> |=F0=9F=A7=9A No shared docs, not here, not now. = | >> |Let=E2=80=99s create one, and here=E2=80=99s how! = | >=20 > I would suggest "here is how" instead of "and here's how". > That better matches the rhythm of the first line :-) >=20 >> |=F0=9F=A7=9A Your file is shared, and here=E2=80=99s the link = | >> |Anyone can connect with just a click! | >=20 > Anyone -> All > (also for rhythm) >=20 > Though that's less precise, since if "All" tried to connect, they = would likely break something. >=20 >> Help with rhymes >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>=20 >> I hope you don=E2=80=99t find the fairy and her bad rhymes annoying. = I=E2=80=99m not >> very good at rhymes, chatgpt is even worse. If you can come up with >> better ones, please do send them along :-) >=20 > I hope the suggestions help :-) Thanks, they help a lot :-) >=20 > How could I run a signaling server myself? In the repo there are actually two binaries. One is collab-mode, the = other is collab-signal, the signaling server. You can run the signaling server by=20 make signaling Or equivalently=20 cargo run --bin collab-signal -- run --port Yuan=