swarm icon indicating copy to clipboard operation
swarm copied to clipboard

Scuttlebutt vs swarm?

Open nwmcsween opened this issue 10 years ago • 21 comments

What are the major differences between https://github.com/dominictarr/scuttlebutt and swarm?

nwmcsween avatar Dec 21 '14 20:12 nwmcsween

@nwmcsween thank you for link I'll take a look! I just found out bunch of bad js practices in swarm sources. People behind scuttlebutt are respectable by GitHub js community. I think @gritzko also should take a look at scuttlebutt and possibly collaborate with scuttlebutt team.

chicoxyzzy avatar Dec 23 '14 03:12 chicoxyzzy

scuttlebutt is effectively done as the developer(s) has said CRDT's cannot prove authorship and instead moved to a signed log of messages style protocol (secure-scuttlebutt) which removes all use of it client side.

nwmcsween avatar Dec 23 '14 03:12 nwmcsween

@chicoxyzzy Sergey, can you please detail on bad practices you noticed?

gritzko avatar Dec 23 '14 05:12 gritzko

@nwmcsween Is Scuttlebutt gossip-only? Swarm builds dynamic spanning trees. Swarm is op-based, not state-based CRDT. Swarm's use case is syncing in web&mobile apps.

gritzko avatar Dec 23 '14 05:12 gritzko

@gritzko sure. I'll make a PR soon. BTW can I contact you in some messenger?

chicoxyzzy avatar Dec 23 '14 10:12 chicoxyzzy

Sure. My Skype handle is gritzko.

gritzko avatar Dec 23 '14 10:12 gritzko

I'm not sure scuttlebut is an effective alternative. To use scuttlebut safely you need to use scuttle-ssb to use that you need to use scuttle-bot to use that you need to use their phoenix framework. SO :grimacing: not sure if they are even

jeregrine avatar Jan 06 '15 19:01 jeregrine

also @chicoxyzzy I am interested in helping with the cleanup as well. Wanna try to break it up into tasks and we can pick them off?

jeregrine avatar Jan 06 '15 19:01 jeregrine

@jeregrine sounds cool. I'll try to post my list of things to improve soon. @gritzko what do you think about some huge refactoring of swarm and decoupling it into some (possibly independent i.e. #37 for example) modules? P.S. still waiting for your accept of contact request in Skype

chicoxyzzy avatar Jan 07 '15 01:01 chicoxyzzy

@chicoxyzzy We had some ideas of decoupling, just considered it too early at the time. For example, each kind of storage should be a package, etc. What is your Skype handle? Ironically, Skype sync sucks, so your request may be blinking somewhere on an iPad on a shelf in a different city.

gritzko avatar Jan 07 '15 16:01 gritzko

Might be easier to setup a #swarmjs irc channel on freenode :)

On Wed, Jan 7, 2015 at 10:27 AM, Victor Grishchenko [email protected] wrote:

@chicoxyzzy We had some ideas of decoupling, just considered it too early at the time. For example, each kind of storage should be a package, etc.

What is your Skype handle? Ironically, Skype sync sucks, so your request may be blinking somewhere on an iPad on a shelf in a different city.

Reply to this email directly or view it on GitHub: https://github.com/gritzko/swarm/issues/41#issuecomment-69047292

jeregrine avatar Jan 07 '15 16:01 jeregrine

OK, grabbed #swarmjs on freenode

gritzko avatar Jan 07 '15 17:01 gritzko

Maybe gitter will be easier to access with github account? It's free for opensource. https://gitter.im/gritzko/swarm

qfox avatar Jan 07 '15 21:01 qfox

@zxqfox @chicoxyzzy We are on #swarmjs on freenode http://webchat.freenode.net/?channels=swarmjs couple folks on right now :)

jeregrine avatar Jan 07 '15 22:01 jeregrine

+1 for gitter instead of irc

chicoxyzzy avatar Jan 08 '15 11:01 chicoxyzzy

I like the idea of using gitter.im more than using IRC. The reason is that the gitter allows reading the chat history easily, also it's free but only the owners(@gritzko) are allowed to create chat.

riston avatar Mar 02 '15 10:03 riston

@gritzko - you said that swarmjs is op based CRDT, which sounds great (i'm thinking about the op basedness now), but just I took a look (on http://ppyr.us/) what goes on the wire (Chrome developer tools/Network and check the frames in websocket connection).

And it seemed like it sends the whole "data item" at the same time, not just the operation like in OT. As in OT there would only be one character sent (+ the required overhead). Here I saw the whole line of text in TodoMVC sent.

So I'm thinking about the efficiency, i.e. when editing a large document. Would it send the whole document every time I make one character edit? Does op in CRDT mean sending the "whole data item"?

Hope my question is clear and hope it's ok to ask here.

Thanks.

ile avatar Jun 17 '15 20:06 ile

@ile In the TodoMVC demo, text entries are handled as plain Strings. Hence, those are sent all at once. The reason is that todo entries are short and the overhead of maintaining versioned text simply does not worth it. Although from the UX perspective, it makes some sense to use mergeable strings (lib/Text.js). It was a small simple demo, after all.

When using versioned text, it sends something like this:

{"/Host#A002M8!0.on":""}    24  10:15:40.414
{"/Host#swarm~nodejs!2kmMS+swarm~nodejs.reon":46077340478}  58  10:15:40.468

{"/SlimText#2kmM6+A002M8!2kmMS+A002M8.on":"!2kmMB03+A002M8"}    60  10:15:40.522
{"/SlimText#2kmM6+A002M8!2kmMS+A002M8.reon":"!2kmMB03+A002M8"}  62  10:15:40.615

{"/SlimText#2kmM6+A002M8!2kmMW+A002M8.in":"2kmMB03+A002M8\t1"}  62  10:15:

Here you can see an actual 0.3 handshake (host to host) then an object sync handshake (no data passed, the object is in the local cache already) then one actual insert op:

2kmMB03+A002M8 1

"1" is inserted after symbol 2kmMB03+A002M8 The id for the new symbol is 2kmMW+A002M8 A002M8 is the current user (some numbered anonymous) 2kmMW is seconds since epoch in Base64 (which is 1.1.2010 in that version, AFAIR)

gritzko avatar Jun 18 '15 07:06 gritzko

Ok, thanks @gritzko! Looks good then.

I will have to play with Swarm.js more then, and see if I will integrate it with Derby (http://derbyjs.com/), thus replacing OT in ShareJS. I got the feeling that CRDT offers some advantages over OT that may make this a good move.

Seeking for the even holier grail, as there are some nice features in Derby :)

ile avatar Jun 18 '15 14:06 ile

@ile that is very interesting to know, actually. What Derby features do you consider the nicest?

gritzko avatar Jun 21 '15 15:06 gritzko

Compared to Swarm, RacerJS (Derby's model, based on ShareJS) has two pros:

  1. Ability to subscribe to db queries (Mongo queries mostly). Btw, is it planed in Swarm?
  2. General JSON-type, which has object ops, array ops, string ops, number ops. What it lacks is offline, which is tricky to implement in OT.

vmakhaev avatar Jul 11 '15 05:07 vmakhaev