Shaptic / Cicada

A peer-to-peer routing protocol.
2 stars 0 forks source link

python 3 and a question #1

Closed snapo closed 6 years ago

snapo commented 7 years ago

Hi, i did just wanna ask if you at some point will upgrade it to python3?

Also i would like to ask about the algorythm about data integrity / rebalance / re-distribution: in the case (for simplicity 5 clients) where all clients have received a key with node.sendall("hello!", duplicates=3) so 3 clients have the "hello!" in there key value store. If client 3 (for what ever reason) dies, how does it rebalance it to 3 again? i dont see checks where this is happening (maybe i overlooked something). Also if a new client (6) joins, how does the network rebalance that to the new client?

Thanks for the answer already...

Shaptic commented 6 years ago

Hey Snapo,

I am planning on upgrading to python3, but I want to stabilize the current build. No ETA on that yet as this is a side-project for me. With regards to your question:

I think you may be misunderstanding the purpose of message sending. The purpose of the Cicada protocol is to provide routing. It's not a key-value store like a traditional DHT is. There is no API corresponding to a sendall operation for the high-level SwarmPeer object. There is:

If you did want the message to be stored across multiple nodes, that would have to happen at a higher level than what Cicada currently provides.

I hope that clears things up!

snapo commented 6 years ago

@Shaptic Thank you very much for your explanation, yes indeed i am looking for for a DHT with automated shard rebalancing. I did think first it wouldnt be that complicated but after the more i read the more i understand the problem on distributed data sources :-( .

Still compliment very great project you have there.

Shaptic commented 6 years ago

Thanks. :)

I see what you're talking about! That's definitely an interesting idea. In theory, here's what I would imagine:

I'm sure this is something you've already considered, though! I'm curious to know what the findings of your research are. :) either way, good luck with your project!