Design and implementation of a simple totally ordered reliable multicast protocol in java
Download
1 / 43

Design and Implementation of a Simple Totally-Ordered Reliable Multicast Protocol in Java - PowerPoint PPT Presentation


  • 95 Views
  • Uploaded on

Design and Implementation of a Simple Totally-Ordered Reliable Multicast Protocol in Java. Introduction. Computer networks allow geographically distributed processes to collaborate or share a common stream of information.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about ' Design and Implementation of a Simple Totally-Ordered Reliable Multicast Protocol in Java' - nevina


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
Design and implementation of a simple totally ordered reliable multicast protocol in java
Design and Implementation of a Simple Totally-Ordered Reliable Multicast Protocol in Java


Introduction

Introduction Reliable Multicast Protocol in Java


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.

Background


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.

Multicast


Totally ordered reliable multicast
Totally-ordered Reliable Multicast single packet is addressed to all intended hosts and the network

  • Reliability

    • guarantees data eventually delivered to non-faulty receivers.

  • Total Ordering

    • all receivers observe the same order of reception of messages.


Easy to build networking applications. single packet is addressed to all intended hosts and the network

Portable to any systems.

Object oriented - clearer structure, supports reuse.

Java


Basic concepts 1
Basic Concepts(1) single packet is addressed to all intended hosts and the network

  • 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 2
Basic Concepts(2) single packet is addressed to all intended hosts and the network

  • 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.


User level api
User-level API single packet is addressed to all intended hosts and the network

  • 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()


Sample testing program
Sample Testing Program single packet is addressed to all intended hosts and the network

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


Design

Design single packet is addressed to all intended hosts and the network


Design considerations
Design Considerations single packet is addressed to all intended hosts and the network

  • Reliability

  • Ordering

  • Flow Control


Reliability sender
Reliability (sender) single packet is addressed to all intended hosts and the network

  • (hybrid) sender-initiated approach.

  • sender maintains status of all receivers.

  • timers used for detecting ACK losses.


Reliability sender1
Reliability (sender) single packet is addressed to all intended hosts and the network

sender

receiver

ACK

ACK

timeout


Reliability receiver
Reliability (receiver) single packet is addressed to all intended hosts and the network

  • 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 receiver1
Reliability (receiver) single packet is addressed to all intended hosts and the network

sender

receiver

NAK


Ordering
Ordering single packet is addressed to all intended hosts and the network

  • 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.


LAN 3 single packet is addressed to all intended hosts and the network

LAN 1

TCP

multicast

TCP

multicast

LAN 2

multicast


Flow control
Flow Control single packet is addressed to all intended hosts and the network

  • sliding window mechanism.

  • fixed window size for simplicity.

  • bounds buffers.


Implementation
Implementation single packet is addressed to all intended hosts and the network


Additional concepts 1
Additional Concepts(1) single packet is addressed to all intended hosts and the network

  • 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 2
Additional Concepts(2) single packet is addressed to all intended hosts and the network

  • 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.


Architecture
Architecture single packet is addressed to all intended hosts and the network


Session name server
Session Name Server single packet is addressed to all intended hosts and the network

  • 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.


The default channel
The Default Channel single packet is addressed to all intended hosts and the network

  • 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.


Example configuration of a session with two channels
Example Configuration of a Session with Two Channels single packet is addressed to all intended hosts and the network

channel 1

channel 2

LAN 1

default channel

LAN 2

SNS

LAN 4

LAN 3


Session
Session single packet is addressed to all intended hosts and the network

  • 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.


Channel
Channel single packet is addressed to all intended hosts and the network

  • 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.


LAN 3 single packet is addressed to all intended hosts and the network

LAN 1

data source

channel leader

TCP

TCP

multicast

multicaster

TCP

multicaster

multicast

LAN 2

multicast


Session and related classes uml
Session and Related Classes (UML) single packet is addressed to all intended hosts and the network


Channel and related classes uml
Channel and Related Classes (UML) single packet is addressed to all intended hosts and the network


Threads synchronization
Threads Synchronization single packet is addressed to all intended hosts and the network

  • 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.


Multithread synchronization
Multithread Synchronization single packet is addressed to all intended hosts and the network

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();

}


Multithread synchronization1
Multithread Synchronization single packet is addressed to all intended hosts and the network

MCReceiveThread

NackThread

NackThread()

handleNackEvent()

initialization

requestResend()

detect message lost

acquire lock

update lost queue

ask for resend to the multicaster

notify()

cancelResend()

receive resent message

update lost queue

lost message queue is empty

release lock

wait()


Testing

Testing single packet is addressed to all intended hosts and the network


Functions tested
Functions Tested single packet is addressed to all intended hosts and the network

  • session name server support.

  • join and leave session, channels.

  • ordering.

  • reliability.

  • failure handling (message loss, host crash).

  • performance.


Testing environment
Testing Environment single packet is addressed to all intended hosts and the network

session s1

SNS

labss3a

labss3d

labss4a

labss4d

compute

LAN1

paladin

jet

LAN2

muck

LAN3

channel c1

Channel c2


Performance test
Performance Test single packet is addressed to all intended hosts and the network

Purpose:

To compare TRMP latency with TCP (base line).

Result:

TRMP has lower latency for more than 12 receivers.


Trmp vs tcp
TRMP Vs. TCP single packet is addressed to all intended hosts and the network


Summary
Summary single packet is addressed to all intended hosts and the network

  • 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.


Related work
Related Work single packet is addressed to all intended hosts and the network

  • 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).


Future work
Future Work single packet is addressed to all intended hosts and the network

  • flexible window size

  • different types of quality of service

  • NAK and re-transmission suppression

  • performance


Thank you ! single packet is addressed to all intended hosts and the network


ad