How ikanshgoyal/chorddht works
Project’s Main Components
• Application Entry Point: Highlight “App.java” as the starting point which bootstraps the application.
• Core DHT Implementation:
• Node: Manages individual node functions and the core logic of a network node.
• FingerTable: Represents the routing/finger table enabling efficient key lookups.
• ChordNetwork: Manages network operations such as node joins, leaves, and pointer updates.
• HashUtils: Implements SHA-1 hashing logic that is central to consistent hashing.
• User Interface:
• ChordUI: A Swing-based UI for visual interaction and command issuing.
• Supporting Infrastructure:
• Build/Configuration Files: The “build.gradle”, .gitignore, and Eclipse IDE-specific files.
• README: Provides comprehensive documentation and usage examples.
Relationships and Interactions
• A clear separation between the backend (core DHT logic) and the frontend (Swing-based UI).
• Flow from user commands (either via command-line through App.java or via ChordUI) to operations in ChordNetwork.
• Demonstrate that the “printstate” command pulls the network information from the Node instances and displays it via the UI or console.
Architectural Patterns and Design Principles
• Modular Design: Each class encapsulates a specific aspect of the DHT (e.g., routing, network management, UI), which should be clearly depicted.
• Decoupling: Highlight the separation between logic (e.g., Node, FingerTable) and its presentation (i.e., ChordUI) suggesting a loosely coupled design.
• Consistent Hashing: Detail the role of the HashUtils in the overall architecture indicating its importance in distributing keys across nodes.
• Dynamic Network Reconfiguration: Include notes on how nodes join or leave – with updates reflected in the FingerTable, successor, and predecessor pointers.