privacylab / talek

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

Move batching logic from replica to frontend #51

Closed willscott closed 7 years ago

willscott commented 7 years ago

This does the next step of refactoring to put a bunch of leader code into frontend rather than centralized - which will eventually be renamed to replica.

This has the benchmarks/load test passing as well as adding unit tests for the periodic read and write behavior expected by the leader.

The configuration has gotten a bit awkward, since the current clientconfig / serverconfig / trustdomainconfig doesn't directly map with the leader/replica split. Currently the frontend uses both the 'frontendaddr' from clientconfig to know which port it should bind on / the trustdomains there to know where replicas are, and the info in 'serverconfig' to do periodic flushes and batching of requests.

willscott commented 7 years ago

Updated to address remaining concerns, i believe. @ryscheng feel free to merge, or let me know if there are other things to do before merging.