Giter VIP home page Giter VIP logo

Comments (8)

bmuller avatar bmuller commented on May 19, 2024

Don't think so - see here

from kademlia.

vdrg avatar vdrg commented on May 19, 2024

but the id is computed randomly, right? what I mean is that not only it should delete nodes with the same id, but also nodes with the same ip/port.

from kademlia.

bmuller avatar bmuller commented on May 19, 2024

from kademlia.

vdrg avatar vdrg commented on May 19, 2024

For example, if you start a server for bootstrapping and 2 nodes, if one of the nodes reconnects and then goes offline again, the remaining node will try to send two messages to the offline node:

Type a command(get/set):
set hello byebye
Did not received reply for msg id b'dyK00zT4pkYKRX3uZJ+pWIJ5TH0=' within 5 seconds
Did not received reply for msg id b'jQMY0ZiKXqz9UxC66BuYPOBVqWQ=' within 5 seconds
no response from 127.0.0.1:1235, removing from router
no response from 127.0.0.1:1235, removing from router
Value set.

BTW, I'm using the python3.5 branch

from kademlia.

bmuller avatar bmuller commented on May 19, 2024

from kademlia.

vdrg avatar vdrg commented on May 19, 2024

I think I didn't explain it well enough:

That happens when one of the nodes connects, disconnects, connects again and finally disconnects. I'm not talking about two nodes running at the same time on the same machine, what I mean is that a new node will be created and stored in the table even if it has already been stored before (which happens when the same node connects to the network multiple times, as a different id is created each time).

from kademlia.

bmuller avatar bmuller commented on May 19, 2024

I'm not sure why the node id would change on disconnect. If you mean in the case that someone destroys the existing Server object and then instantiates another, then I suppose this would happen - but I'm not sure that this would be a common occurrence. If there's a risk that your python process may die - then use the saveState and loadState methods on Server and your new instance will have the same node id and list of bootstrappable neighbors.

from kademlia.

vdrg avatar vdrg commented on May 19, 2024

Perfect, I will try that. Thanks!

from kademlia.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.