Modularization - Notes

Date: Mar 13th, 2018


  • Code base is a mess. Monolithic, every part of the code calls every part of the code.


  • Rewrite part of it in Rust.
  • Improved maintainability and testability.
  • Reduce code size so we don't ship everything.

Goal of the session:

What we can do without or/and until we get the funding.


  • Identify which part can be modularize. Have standards on how to create features properly so they are better modularized or easy to modularize later.
  • Use our callgraph tools to identify the parts to extract or need love.


  • Maybe have our CI do code coverage checks.
  • Make a list of source directory to isolate modules.
  • Try to have a minimal client module for mobile compile time.
  • Dirauth module at compile time.
  • Some sort of design that does publish/subscribe instead of everything calls everything.

List of modules (incomplete):


  • Client
  • Relay
    • Hibernation
  • Directory Authority
  • Bridges
  • Hidden Services
    • Client
    • Service
    • HSDir
    • Intro/RP


  • Networking
    • Channels/Connections
    • Streams
    • Application Proxy
    • Circuits
  • Statistics
  • Controllers
  • Document Parsing
    • Consdiff/Voting/Descriptors/Consensus
  • CPU Worker
  • Entry Nodes picking logic.
  • PT Management
  • Accounting
  • Handshakes
  • Policy Handling
Last modified 3 years ago Last modified on Mar 23, 2018, 6:45:14 PM