Example #1
0
 public NodeOverTheNetwork()
 {
     masterHost = new DistributedHashTableMasterHost();
     storageHost = new DistributedHashTableStorageHost(masterUri);
     masterHost.Start();
     storageHost.Start();
 }
            public AfterRestart()
            {
                host = new DistributedHashTableMasterHost();

                host.Start();

                using (var storageHost = new DistributedHashTableStorageHost(masterUri))
                {
                    storageHost.Start();

                    var masterProxy = new DistributedHashTableMasterClient(masterUri);
                    while(true)
                    {
                        var topology = masterProxy.GetTopology();
                        if (topology.Segments.All(x => x.AssignedEndpoint != null))
                            break;
                        Thread.Sleep(100);
                    }
                }

                //restart
                host.Dispose();
                host = new DistributedHashTableMasterHost();
                host.Start();
            }
Example #3
0
            public CanCommunicateWithMasterUsingClientProxy()
            {
                masterHost = new DistributedHashTableMasterHost();

                masterHost.Start();

                masterProxy = new DistributedHashTableMasterClient(new Uri("rhino.dht://localhost:2200"));
            }
Example #4
0
 public JoiningToCluster()
 {
     masterHost = new DistributedHashTableMasterHost();
     storageHostA = new DistributedHashTableStorageHost(masterUri);
     storageHostB = new DistributedHashTableStorageHost(masterUri, "nodeB", 2203);
     masterHost.Start();
     storageHostA.Start();
 }