Skip to content
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

Scuttlebutt vs swarm? #41

Open
nwmcsween opened this issue Dec 21, 2014 · 21 comments
Open

Scuttlebutt vs swarm? #41

nwmcsween opened this issue Dec 21, 2014 · 21 comments

Comments

@nwmcsween
Copy link

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

@chicoxyzzy
Copy link

@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.

@nwmcsween
Copy link
Author

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.

@gritzko
Copy link
Owner

gritzko commented Dec 23, 2014

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

@gritzko
Copy link
Owner

gritzko commented Dec 23, 2014

@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.

@chicoxyzzy
Copy link

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

@gritzko
Copy link
Owner

gritzko commented Dec 23, 2014

Sure. My Skype handle is gritzko.

@jeregrine
Copy link

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 😬 not sure if they are even

@jeregrine
Copy link

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?

@chicoxyzzy
Copy link

@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

@gritzko
Copy link
Owner

gritzko commented Jan 7, 2015

@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.

@jeregrine
Copy link

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:
#41 (comment)

@gritzko
Copy link
Owner

gritzko commented Jan 7, 2015

OK, grabbed #swarmjs on freenode

@qfox
Copy link

qfox commented Jan 7, 2015

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

@jeregrine
Copy link

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

@chicoxyzzy
Copy link

+1 for gitter instead of irc

@riston
Copy link

riston commented Mar 2, 2015

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.

@ile
Copy link

ile commented Jun 17, 2015

@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.

@gritzko
Copy link
Owner

gritzko commented Jun 18, 2015

@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)

@ile
Copy link

ile commented Jun 18, 2015

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 :)

@gritzko
Copy link
Owner

gritzko commented Jun 21, 2015

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

@vmakhaev
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants