dominictarr / crdt

Commutative Replicated Data Types for easy collaborative/distributed systems.
MIT License
836 stars 43 forks source link

node-client.js for "simple" example doesn't work #28

Open refset opened 11 years ago

refset commented 11 years ago

Now I know that reconnect isn't the problem I'm confident my troubles reside in this not working:

https://github.com/orfen/crdt/commit/d80b5bdddf9fe66b0aac8ecaf348b6f7f85ab7ac

The underlying stream must work to some extent but the two Docs (node-client & server) don't attempt to converge.

dominictarr commented 11 years ago

what are you seeing? does any data get across? can you attach loggers to the stream?

refset commented 11 years ago

I see nothing other than the respective heartbeats. I tried bypassing crdt and manually writing to the stream from the client to the server which seems to work but I couldn't get client to display anything when writing from the server.

By 'attach loggers' do you just mean this sort of thing...?

reconnect(function (shoe) {
    //connect to the crdt stream
    shoe
      .pipe(doc.createStream())
      .pipe(shoe)

    shoe.on('data', function(chunk) {
        console.log(chunk);
    })
  }).connect('http://localhost:3000/simple')

Because that doesn't report anything either.

dominictarr commented 11 years ago

okay, this is weird! yeah, it's just not receiving anything from the server!

dominictarr commented 11 years ago

aha, this is a problem with reconnect & shoe @0.0.15 hmm...

refset commented 11 years ago

Do you accept BTC? ;)

dominictarr commented 11 years ago

https://www.gittip.com/dominictarr/

been busy with lxjs! getting back to things

seidtgeist commented 11 years ago

aha, this is a problem with reconnect & shoe @0.0.15

any idea which version combination of node, reconnect & shoe still worked? would help to find the problem

dominictarr commented 11 years ago

okay, I've updated the examples in crdt (they where really old!) when shoe, and crdt where really new (because scuttlebutt) and before browserify@2

everything works now. can you guys confirm this?

I'm not seeing any problems here.

seidtgeist commented 11 years ago

cool! did you push? didn't see any recent commits

dominictarr commented 11 years ago

oops, i didn't realize I was on a different branch. Okay, just pushed.