privacylab / talek

a Private Publish Subscribe System
BSD 2-Clause "Simplified" License
47 stars 5 forks source link

generalized followers #24

Open willscott opened 7 years ago

willscott commented 7 years ago

currently server/centralized.go expects act as either a leader with a single follower, or as a follower. We should at least generalize to support n followers for single leader.

ryscheng commented 7 years ago

Right now it's set up for chaining. e.g. leader -> follower1 -> follower2 -> etc. any server can choose to terminate the chain.

Is that not sufficient?

willscott commented 7 years ago

it seems like conceptually it only needs to be

leader -> follower1 leader -> follower2 ...

that makes addition / replacement of followers easier since only one other node needs to change accounting (though it adds load to the leader, i suppose)

ryscheng commented 7 years ago

Sure, conceptually it's essentially a frontend gateway (that can coexist with any one of the servers). So the leader = follower + frontendGateway