400 likes | 517 Views
M2MC: Middleware for Many to Many Communication over broadcast networks. Chaitanya Krishna Bhavanasi 03329003 Under the guidance of Prof Sridhar Iyer Kanwal Rekhi School of Information Technology, IIT Bombay, Powai, Mumbai-76, India. B. A. C. D. G2. B . A. E. C. D. A. B. G1.
E N D
M2MC: Middleware for Many to Many Communication over broadcast networks Chaitanya Krishna Bhavanasi 03329003 Under the guidance of Prof Sridhar Iyer Kanwal Rekhi School of Information Technology, IIT Bombay, Powai, Mumbai-76, India
B A C D G2 B A E C D A B G1 Introduction B A C • Middleware • Communication Paradigms E D (3) (1) (2) (4)
M2MC middleware data Application Application msg M2MC M2MC packet Broadcast Layer Broadcast Layer
Application ApplGrpMngrClass 5 A ApplGrpMngrInterface MSP 7 4 6 B GJLP Group Manager C E 2,3 MOP Message Receiver/Buffer 8 D 1 BroadcastReceiver BroadcastSender Architecture
Components • MOP • GJLP • MSP • GroupManager • Broadcast Layer • Application
Operations • For creating a new group • For joining an existing group • For sending a message to group • On receiving a message from broadcast layer • Member Synchronization
Message Ordering Protocol • Primary objective: • Capturing semantic relationship at sender. • Representing this relationship and conveying it to receiver. • Maintain these relationships with minimum overhead.
Sb Ordering • Definition
Ordering Tree OTR C2 C1 B1 A1
Sb Ordering Properties • Response semantics • Uniqueness • Transitivity
Protocol Briefly • At sender: • Captures and sends Sb information • At receiver: • Maintains Sb order information and determines the action to be taken for received message.
Notation • Gid, pid, seqno,mid • Message Format: midc,midp,gid,data • Data Strucutures • OT • OSMS
State Diagram after delivering RCV_Deliverable In seq RECEIVED Out of order By default RCV_OutofSeq Msg received INITIAL LISTEN For sending msg RESPOND After storing in cache After sending msg
Correctness • MOP preserves Sb ordering • (OTR, A1, A2, …An) be messages in OT. • For n=1, • Hypothesis: MOP delivers (OTR,A1, A2,…,Am) in Sb order. • Induction Step: • If midp is node Am • If midp is any node Ak in OT • If midp is not in OT.
Liveness • MOP is liveness preserving. • Every message sent to the group will be eventually delivered. • Message M and Response R • M delivered. • M not received.
Algorithm and Data structures • Ordering List • InsertInOL(seqnoj) • IsPresent(seqnoj) • OSMT • InsertInOSMT(midc,midp,data) • putOSMsgsInOL(midc)
Complexities • Time Complexity: 0(n^2) • Space Complexity: O(m)
Group Join/Leave Protocols • For newly connected processes to know information about the groups. • For reconnected process to know information about new groups.
Protocol Briefly • At Sender • At every process on receiving advertisement • At every process on receiving groups information • For leaving a group.
Notations & Data Structures • <grpInfo>: gid,desc, cMemList, lMemList • <advMsg>: pid • <grpsInfoList>: list of <grpInfo> • <joinMsg>: pid,gid , <leaveMsg>:pid,gid • DataStrucutre: GroupsInfoIndexTable Desc, memlist gid1 gid2 Desc, memlist gid3 Desc, memlist Desc, memlist gid4
CreateNewGrp joinMsg leaveMsg received UpdateGrpInfo for creating new group after updating for advertising SendAdv sentAdv Initial no GrpInfo msg left in the list leave group SendLeaveMsg On received GrpInfoList sent infolist received Adv RecvGrpsInfoList SendGrpInfoList For each GrpInfoMsg in the list after sending if process joins the group SendJoinMsg State Diagram
Member Synchronization Protocol • process that newly joined a group • process that rejoined the group.
Protocol Briefly • At sender • Other processes on receiving SyncReqMsg • Sender on receiving SyncRespMsg • Other processes on receiving SyncRespMsg.
Notations & Data Structures • Notations • SyncSeqno • <SyncMsgId>:<pid, SyncSeqno, gid> • <SyncMsgList>:<list of Msgs> Msg is of the form <midc,midp,data> • <SyncReqMsg>: <SyncMsgId, SyncMsgList> • <SyncRespMsg>: <SyncMsgId, SyncMsgList> • DataStructure • Group Messages List: • Message Identities Repository: • Process Sync Status Index Table:
Protocol Illustration ACB B A m1 m1 m1 m1m2 m1m2 C B A m1m2 m1m2 m1
Application ApplGrpMngrClass 5 A ApplGrpMngrInterface MSP 7 4 6 B GJLP Group Manager C E 2,3 MOP Message Receiver/Buffer 8 D 1 BroadcastReceiver BroadcastSender Architecture
GrpJLProtocol AdMsg adMsg GrpInfoMap grpInfoMap GroupManager GrpInfoList grpInfoList LeaveMsg leaveMsg JoinMsg joinMsg sendAdvMsg() adMsgReceived(AdMsg adMsg) createNewGrp(String desc) sendJoinMsg() sendLeaveMsg() grpInfoListRecv(GrpInfoList ) leaveMsgRecv(LeaveMsg leaveMsg) Java Implementation: GJLP
Java APIs for Application Developer • Class: GroupManager • Interface: ApplGrpManagerInterface
ApplGrpMngrClass ApplGrpMgnrInterface ApplGrpMgnrClass void sendMsg2Appl(LinkedList msgList, Gid gid) void displayNewGrpInfo(GrpInfo grpInfo) Void createNewGroup(Gid gid)
Threaded Chat Application • ChatConsole • DynaTree • DynaTreeNode • NewGrpConsole • CreateNewGrpWindow