Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace default DHT nodes w/ Trac ones #26

Open
TracSystems opened this issue Feb 16, 2024 · 4 comments
Open

Replace default DHT nodes w/ Trac ones #26

TracSystems opened this issue Feb 16, 2024 · 4 comments
Assignees

Comments

@TracSystems
Copy link
Contributor

Replace default DHT nodes w/ Trac ones and benchmark the connectivity between nodes in comparison to the built-in ones.

@eL1x00r
Copy link
Contributor

eL1x00r commented Feb 19, 2024

Example usage with new DHT servers on google cloud:

export default class TracManager {
  /**
   * Creates an instance of TracManager.
   * Sets up Corestore and Hyperswarm and prepares for data synchronization.
   */
  /**
   * @property {TapProtocol} tapProtocol - Instance of TapProtocol to manage TAP interactions and data streams.
   */
  tapProtocol;
  /**
   * @property {RestModule} restServer - Instance of RestModule for REST API access.
   */
  restServer;
  constructor() {
    this.isConnected = false;
    this.store = new Corestore("./tapstore");
    this.dht = new HyperDHT({
      // Optionally overwrite the default bootstrap servers, just need to be an array of any known dht node(s)
      // Defaults to ['node1.hyperdht.org:49737', 'node2.hyperdht.org:49737', 'node3.hyperdht.org:49737']
      bootstrap: ['34.69.114.195:34481', '34.141.187.40:38126', '34.126.94.90:33995']
    });
    this.swarm = new Hyperswarm({dht: this.dht});
    this.bee = null;
    this.tapProtocol = new TapProtocol(this);

    goodbye(() => {
      this.swarm.destroy();
    });
  }

@eL1x00r
Copy link
Contributor

eL1x00r commented Feb 19, 2024

us-central started @ 34.69.114.195:34481

@eL1x00r
Copy link
Contributor

eL1x00r commented Feb 19, 2024

europe-west started @ 34.141.187.40:38126

@eL1x00r
Copy link
Contributor

eL1x00r commented Feb 19, 2024

asia-southeast started @ 34.126.94.90:33995

(note that all three ports changed)

@TracSystems TracSystems self-assigned this Feb 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants