Presentation is loading. Please wait.

Presentation is loading. Please wait.

7/26/2001 1 Design and Implementation of a Simple Totally-Ordered Reliable Multicast Protocol in Java.

Similar presentations


Presentation on theme: "7/26/2001 1 Design and Implementation of a Simple Totally-Ordered Reliable Multicast Protocol in Java."— Presentation transcript:

1 7/26/2001 1 Design and Implementation of a Simple Totally-Ordered Reliable Multicast Protocol in Java

2 7/26/2001 2 Introduction

3 7/26/2001 3 Background –Computer networks allow geographically distributed processes to collaborate or share a common stream of information. –Major characteristic of group communication applications is one source sends data to multiple receivers. –Multicast is well-suited for the distributed applications that focus on group activities, compared with unicast and broadcast.

4 7/26/2001 4 Multicast Multicast aims to deliver data to a select group of hosts. A single packet is addressed to all intended hosts and the network replicates packets only as needed. IP Multicast is an internet protocol that enables transmission of data to a group of receivers. IP Multicast is unreliable.

5 7/26/2001 5 Reliability –guarantees data eventually delivered to non- faulty receivers. Totally-ordered Reliable Multicast Total Ordering –all receivers observe the same order of reception of messages.

6 7/26/2001 6 Easy to build networking applications. Portable to any systems. Object oriented - clearer structure, supports reuse. Java

7 7/26/2001 7 session –a collaborative group, includes a collection of processes. –members cooperate to fulfill a common goal or share a common stream of information. channel –the communication pipe for session members. –encapsulates the transmission protocol to session members. Basic Concepts(1)

8 7/26/2001 8 session name server –a program running at a well-known address. –maintains a list of the current sessions along with session member information. default channel –a special channel, created for each session when the session is created. –the services of a session are implemented through the default channel. Basic Concepts(2)

9 7/26/2001 9 Session() int join(String name, int netmask) int leave() int query(Session_Info si) Channel() int join(Session s, String cname) int send(int sid, byte[] buffer) int receive(int sid, byte[] buffer) int leave() User-level API

10 7/26/2001 10 import TRMP.*; import java.lang.*; public class Test implements Constants{ public static void main(String[] args){ Session s = new Session(); long netmask = Long.parseLong(args[0], 16); s.join(“s1”, netmask); Channel ch = new Channel(); ch.join(s, “c1”); String str = “Hello."; byte[] bytes = str.getBytes(); ch.send(ALL,bytes); ch.leave(); s.leave(); } } * Appendix A Sample Testing Program

11 7/26/2001 11 Design

12 7/26/2001 12 Reliability Ordering Flow Control Design Considerations

13 7/26/2001 13 (hybrid) sender-initiated approach. sender maintains status of all receivers. timers used for detecting ACK losses. Reliability (sender)

14 7/26/2001 14 senderreceiver timeout Reliability (sender) ACK

15 7/26/2001 15 sends ACKs. detects out of ordered packets, and sends NAK when discontinued packet sequence number is detected. timers applied for the loss of NAKs. suppress ACKs for fragmented packets. Reliability (receiver)

16 7/26/2001 16 Reliability (receiver) sender receiver NAK

17 7/26/2001 17 a centralized scheme, one process sequences all the messages in a group. TCP tunneling and multicasting locally. large messages fragmented before multicasting and reassembled by receivers. Ordering

18 7/26/2001 18 LAN 2 LAN 1LAN 3 TCP multicast

19 7/26/2001 19 sliding window mechanism. fixed window size for simplicity. bounds buffers. Flow Control

20 7/26/2001 20 Implementation

21 7/26/2001 21 Session owner –the oldest member in a session –grants session membership and sequences the membership messages sent in the default channel. Membership database –kept on each session member. –contains current session and channel information. Membership messages –contain session and channel membership updates. Additional Concepts(1)

22 7/26/2001 22 Channel leader –the oldest channel member in a channel. –sequence the messages transmitted in the channel. Multicaster –the oldest channel member in one subnet of the channel. –multicast the messages within its subnet. Additional Concepts(2)

23 7/26/2001 23 Architecture

24 7/26/2001 24 Session Name Server Session information is provided to processes when they join a session. SNS accepts four types of messages. –joining session request. –leaving session request –terminating session request. –querying sessions request.

25 7/26/2001 25 The Default Channel –automatically joins when a process joins a session. –contains all the session members. –transmits the membership messages. –session owner sequences the membership messages. –supports reliable point to point message (TCP) as well as multicasting.

26 7/26/2001 26 Example Configuration of a Session with Two Channels SNS channel 1 channel 2 default channel LAN 4 LAN 3 LAN 2 LAN 1

27 7/26/2001 27 Session –session and channel membership database created locally when a process joins a session. –members update the membership database whenever they receive join and leave session, join and leave channel, and crash (leave) messages. –provides the same views of the session and channels states to all the session members.

28 7/26/2001 28 Channel –provide totally-ordered reliable multicast message delivery to channel members by TCP tunneling and local multicasting. –multiple channels may exist simultaneously in one session. –one session member may join more than one channel at a time. –members of a channel divided into subnet groups according to their subnet address.

29 7/26/2001 29 LAN 2 LAN 1LAN 3 TCP multicast channel leader multicaster TCP data source

30 7/26/2001 30 Session and Related Classes (UML)

31 7/26/2001 31 Channel and Related Classes (UML)

32 7/26/2001 32 Threads Synchronization In Java, each object has a monitor associated with it. No two threads can acquire an object's monitor at the same time. Multiple threads can synchronize access to an object with each other through the use of wait()/notify() calls. Multithread synchronization is heavily used in the implementation.

33 7/26/2001 33 Multithread Synchronization public synchronized void handleNackEvent() { while (true) { if ( mcrt.lostMsgs.size() == 0) wait(); //mcrt.lostMsgs is the lost message queue... } public synchronized void requestResend(int seq) { // add new element to the list with associated information... if ( mcrt.lostMsgs.size() == 1 ) notify(); }

34 7/26/2001 34 Multithread Synchronization MCReceiveThreadNackThread NackThread() initialization requestResend() update lost queue handleNackEvent() notify() detect message lost acquire lock ask for resend to the multicaster lost message queue is empty wait() receive resent message cancelResend() update lost queue release lock

35 7/26/2001 35 Testing

36 7/26/2001 36 Functions Tested –session name server support. –join and leave session, channels. –ordering. –reliability. –failure handling (message loss, host crash). –performance.

37 7/26/2001 37 Testing Environment labss3alabss4alabss3dlabss4dcompute paladin jet muck LAN1 LAN2 LAN3 session s1 channel c1Channel c2 SNS

38 7/26/2001 38 Performance Test Purpose: To compare TRMP latency with TCP (base line). Result: TRMP has lower latency for more than 12 receivers.

39 7/26/2001 39 TRMP Vs. TCP

40 7/26/2001 40 Summary –We have designed and implemented a totally- ordered reliable multicast protocol (TRMP) in Java. –Simple test applications are implemented to test the functions and the performance of the protocol. The test results show that the protocol can provide totally-ordered reliable multicast with reasonable speed. –The TRMP package contains 38 classes and 4,661 lines of Java code.

41 7/26/2001 41 Related Work –Group Communication Support for Distributed Collaboration System (CCTL). –A Reliable Multicast Framework for Light- Weight Sessions and Application Level Framing (SRM). –Reliable Multicasting of Continuous Data Streams (RMTP). –The Java Reliable Multicast Service: A Reliable Multicast Library(JRMS).

42 7/26/2001 42 Future Work flexible window size different types of quality of service NAK and re-transmission suppression performance

43 7/26/2001 43 Thank you !


Download ppt "7/26/2001 1 Design and Implementation of a Simple Totally-Ordered Reliable Multicast Protocol in Java."

Similar presentations


Ads by Google