Example #1
0
        public ChordCylinder(IPAddress bootStrapIP, Guid bootStrapChordInstanceGuid, ProxyNodeController proxyNodeController)
        {
            this.proxyNodeController = proxyNodeController;


            registry = new RangeIChordRing[noOfChordRings];
            halo     = new ProxyHalo();


            ZhimeraProxyNode bootstrapProxyNode = (ZhimeraProxyNode)(proxyNodeController.getProxyNode(bootStrapIP));

            double perRange = totalRange / (double)(noOfChordRings);

            for (int i = 0; i < noOfChordRings; i++)
            {
                registry[i]     = new RangeIChordRing();
                registry[i].min = i * perRange;
                registry[i].max = (i + 1) * perRange;
                if (i == noOfChordRings / 2)
                {
                    registry[i].chordRing = new RealChordRing(bootStrapIP, bootStrapChordInstanceGuid);
                }
                else
                {
                    registry[i].chordRing = new ProxyChordRing(halo, noOfChordRings);
                }
            }
        }
Example #2
0
        public ZhimeraProxyNode(IPAddress ip, ProxyNodeController proxyController)
            : base(ip)
        {
            //	lowLevelComm = Base.LowLevelComm.getRefLowLevelComm();
//			selfNodeBasic = new Tashjik.Common.NodeBasic(ip);
            this.proxyController = proxyController;
        }
Example #3
0
        public ZhimeraRealNode(ProxyNodeController proxyNodeController)
        {
            this.proxyNodeController = proxyNodeController;

            erasureCoder  = new ErasureCoder();
            _SVCEncoder   = new SVCEncoder();
            chordCylinder = new ChordCylinder(proxyNodeController);
        }
Example #4
0
        public ZhimeraRealNode(ProxyNodeController proxyNodeController, IPAddress bootStrapIP, Guid bootStrapChordInstanceGuid)
        {
            this.proxyNodeController = proxyNodeController; // new ProxyNodeController(new ProxyNodeController.CreateProxyNodeDelegate(createZhimeraProxyNode), new Guid(zhimeraGUID));

            erasureCoder  = new ErasureCoder();
            _SVCEncoder   = new SVCEncoder();
            chordCylinder = new ChordCylinder(bootStrapIP, bootStrapChordInstanceGuid, proxyNodeController);
        }
Example #5
0
 private void setProxyController(ProxyNodeController c)
 {
     //need to handle synchronised calls here
     //if(proxyController!=null) WTF is this? :O
     if (proxyController == null)
     {
         proxyController = c;
     }
 }
Example #6
0
        public ChordCylinder(ProxyNodeController proxyNodeController)
        {
            this.proxyNodeController = proxyNodeController;

            registry = new RangeIChordRing[noOfChordRings];
            halo     = new RealHalo();

            double perRange = totalRange / (double)(noOfChordRings);

            for (int i = 0; i < noOfChordRings; i++)
            {
                registry[i]     = new RangeIChordRing();
                registry[i].min = i * perRange;
                registry[i].max = (i + 1) * perRange;
                if (i == noOfChordRings / 2)
                {
                    registry[i].chordRing = new RealChordRing();
                }
                else
                {
                    registry[i].chordRing = new ProxyChordRing(halo, noOfChordRings);
                }
            }
        }
Example #7
0
 public ChordProxyNode(IPAddress ip, ProxyNodeController proxyController)
     : base(ip)
 {
     //	lowLevelComm = Base.LowLevelComm.getRefLowLevelComm();
     //			selfNodeBasic = new Tashjik.Common.NodeBasic(ip);
     setProxyController(proxyController);
 }
Example #8
0
 private void setProxyController(ProxyNodeController c)
 {
     //need to handle synchronised calls here
     //if(proxyController!=null) WTF is this? :O
     if(proxyController == null)
         proxyController = c;
 }
Example #9
0
 //private void init(IChordNode bootStrapNode)
 //{
 //    thisNode.beginJoin(bootStrapNode, null, null);
 //}
 private static ProxyNode createChordProxyNode(IPAddress IP, ProxyNodeController proxyNodeController)
 {
     return new ChordProxyNode(IP, /*base.getProxyNodeController*/proxyNodeController);
     //return new ChordProxyNode(IP, base.getProxyNodeController());
     //return null;
 }
Example #10
0
        public ChordProxyNode(IPAddress ip, ProxyNodeController proxyController) : base(ip)
        {
            //	lowLevelComm = Base.LowLevelComm.getRefLowLevelComm();
//			selfNodeBasic = new Tashjik.Common.NodeBasic(ip);
            setProxyController(proxyController);
        }
Example #11
0
        //private void init(IChordNode bootStrapNode)
        //{
        //	thisNode.beginJoin(bootStrapNode, null, null);
        //}

        private static ProxyNode createChordProxyNode(IPAddress IP, ProxyNodeController proxyNodeController)
        {
            return(new ChordProxyNode(IP, /*base.getProxyNodeController*/ proxyNodeController));
            //return new ChordProxyNode(IP, base.getProxyNodeController());
            //return null;
        }
 public ZhimeraServer(IPAddress bootStrapIP, Guid bootStrapChordInstanceGuid)
 {
     proxyNodeController = new ProxyNodeController(new ProxyNodeController.CreateProxyNodeDelegate(createZhimeraProxyNode), new Guid(zhimeraGUID));
     zhimeraRealNode     = new ZhimeraRealNode(proxyNodeController, bootStrapIP, bootStrapChordInstanceGuid);
 }
 public ZhimeraServer()
 {
     proxyNodeController = new ProxyNodeController(new ProxyNodeController.CreateProxyNodeDelegate(createZhimeraProxyNode), new Guid(zhimeraGUID));
     zhimeraRealNode     = new ZhimeraRealNode(proxyNodeController);
 }