Giter VIP home page Giter VIP logo

Comments (5)

GoogleCodeExporter avatar GoogleCodeExporter commented on July 25, 2024
The main barrier behind this now solved. Now every node/dispatcher can identify 
and can 
update the node list/dispatcher list before the leader election starts up 
again. So the 
LE side of this request now fixed. Have to complete the node/dispatcher side 
work now.

Original comment by harshana05 on 2 Jun 2010 at 6:05

from epzilla.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 25, 2024
What do you mean by "node/dispatcher side" work, re-initializing the STM with 
the new 
Leader as the server and connecting the others as clients?

Original comment by [email protected] on 3 Jun 2010 at 3:52

from epzilla.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 25, 2024
Yes. That part. Since you have pointed out the place to start work, I have done 
some 
thing like following.

I have moved the Leader Identification part which was in the leaderReg.Main to 
a new 
method. 
 public static void startSTM(){
                String leader = "";
                while (leader.equalsIgnoreCase("")) {
                    leader = LeaderElectionInitiator.getLeader();
                }
                if (leader.equalsIgnoreCase(ipAddress)) {
                    NodeController.setLeader(true);
                    initSTM();
                } else {
                    NodeController.setLeader(false);
                    NodeController.setLeaderIP(leader);
                    initSTM();
                }

    }

and in the NodeAsNonLeader, I have done the following. The section below the 
comment 
//Initializing LE. 

public static void checkServerStatus() {
        final java.util.Timer timer1 = new java.util.Timer();
        timer1.schedule(new TimerTask() {
            @Override
            public void run() {
                final SocketClient.Status serverStatus=client.getStatus();
                if (serverStatus == SocketClient.Status.DISCONNECTED) {
                    NodeUIController.appendTextToStatus("Server Status :" + 
serverStatus);
                    this.cancel();
                    //Initializing LE
                    org.epzilla.clusterNode.leaderReg.Main.triggerLEFromRemote();                    
org.epzilla.clusterNode.leaderReg.Main.startSTM();
                }
            }
        }, 10, 1000);
    }

Now this works fine and elects a leader and starts a new UI and STM. But there 
are 2 
issue AKAIK. 

1. The previous UI is not hidden. So now there are 2 UIs :).
2. The content of the previous STM is not included in the new STM.

So as our STM expert, dishan has to work on 2 and as our UI expert Chathura has 
to 
work on 1. 

I'm attaching the current work as attachments.

Original comment by harshana05 on 3 Jun 2010 at 9:00

Attachments:

from epzilla.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 25, 2024
I have not committed the current work to the repo since i wasn't sure it was 
the 
correct way of doing that.

Original comment by harshana05 on 3 Jun 2010 at 9:03

from epzilla.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 25, 2024
I have tested the fix provided by Dishan on #r814 and verified the correctness. 
I am changing the status to Verified.

Original comment by harshana05 on 12 Jun 2010 at 4:37

  • Changed state: Verified

from epzilla.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.