Table of Contents
In this lesson we will use the virtual synchrony service use look at the layered structure protocol composition in Appia.
The second laboratory has the following objectives:
* Use case of Group communication via JGCS * Introducing the concept of virtual synchrony * Understand the hierarchical composition of Appia
Virtual synchrony is a Group Communication paradigm that basically states that all participants in a group, see the membership of the group in the form of views, and that all see the same view changes in the same order.
There is a total ordering of the views. It also states that all messages sent within a view are delivered in that view, and if a view change is necessary then all messages of the current view are delivered before the new view is installed.
View changes occur because we expect the groups to be dynamic, that is, members will fail and leave the group, while new members will join the group.
Notes:
1. To pause a process on a console press *Control + Z*. To resume the process enter *fg* command in the same console. To kill a process use *Control + C*. 2. To start a server use: *ant runServerX (where X is the number of the server)* 3. To start a client use: *java -classpath 'build:lib/appia-core-4.1.2.jar:lib/appia-groupcomm-4.1.2.jar:lib/appia-project-4.1.2.jar:lib/appia-test-4.1.2.jar:lib/flanagan.jar:lib/jgcs-0.6.1.jar:lib/log4j-1.2.14.jar' tfsd.ClientOpenGroupTest 'config/clientX.xml'* (where X is the number of the client)
Run the following commands. Use a different console for each client and server (5 consoles in total):
1. Start the gossip server. 2. Start the server 1. 3. Start client 1. 4. In client send a message by entering 's'. 5. Observe server1 output. 6. Start server2, observe the logs and then start server3. 7. Make client 1 send a new message. Observe the logs. 8. Kill server 1. Observe the logs. 9. Send a new message. Note the logs. 10. Suspend server 2. Wait a few seconds and observe the logs. Send a new message and not the logs. 11. Resume server 2. 12. Launch server 1 again. Observe the logs and notice the differences between the resumed process. 13. Suspend the gossip server. Anything happens? Why not? 14. Make Client 1 send a new message. See any difference? 15. Pause server 3. Notice any difference? 16. (Once again) Make Client 1 send a new message. Which servers receive the new message? In which view? 17. Resume the server 3.
Do the following instructions:
1. Download the Appia code at: http://appia.di.fc.ul.pt/ 2. View the file: src/groupcomm/net/sf/appia/protocols/group/sync/VSyncLayer.java 3. Notice the static information about the events that the protocol will accept, require and provide. Remember the block and the view from the logs? 4. Note that this layer requires the view class. Look at the groupcomm/net/sf/appia/protocols/group/intra/IntraLayer.java file. 5. View the file: src/groupcomm/net/sf/appia/protocols/group/sync/VSyncSession.java. Compare the objects in the handle(Event) method with the accepted events in VSyncLayer. 6. If there is still time, change the debugFull variable to true, compile appia and replace the supplied lib with you own.
Date: | 2012-02-28 |
---|---|
Version: | 2 |