M2MC: Middleware for Many to Many Communication over broadcast networks Chaitanya Krishna Bhavanasi Under the guidance of Prof Sridhar Iyer Kanwal Rekhi School of Information Technology, IIT Bombay, Powai, Mumbai-76, India
Introduction Middleware Communication Paradigms AB E A B C D A D C B A E B C D G1 G2 (1) (2) (3) (4)
M2MC middleware Application M2MC Broadcast Layer Application M2MC Broadcast Layer data msg packet
Motivation
Architecture Group Manager Message Receiver/Buffer BroadcastReceiverBroadcastSender MOP MSP GJLP ApplGrpMngrInterface ApplGrpMngrClass Application 1 2, A B C D E
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.
Relation between S b and Hb
S b Ordering Definition
Ordering Tree OTR C1 C2 A1 B1
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
INITIAL LISTEN RECEIVED RESPOND RCV_Deliverable RCV_OutofSeq after delivering Msg received For sending msg In seq Out of order After storing in cache After sending msg By default
Protocol Illustration
Correctness MOP preserves S b 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(seqno j ) IsPresent(seqnoj) OSMT InsertInOSMT(midc, midp,data) putOSMsgsInOL(mid c)
OSMS
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 : gid,desc, cMemList, lMemList : pid : list of : pid,gid, :pid,gid DataStrucutre: GroupsInfoIndexTable gid1 gid2 gid3 gid4 Desc, memlist
State Diagram Initial SendGrpInfoList RecvGrpsInfoList SendAdv SendJoinMsg UpdateGrpInfo for advertising sentAdv joinMsg leaveMsg received On received GrpInfoList no GrpInfo msg left in the list For each GrpInfoMsg in the list if process joins the group after sending after updating CreateNewGrp for creating new group SendLeaveMsg leave group sent infolist received Adv
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 : Msg is of the form : DataStructure Group Messages List: Message Identities Repository: Process Sync Status Index Table:
State Diagram
Protocol Illustration A C B m1 m1 m2 A B A B C m1
Architecture Group Manager Message Receiver/Buffer BroadcastReceiverBroadcastSender MOP MSP GJLP ApplGrpMngrInterface ApplGrpMngrClass Application 1 2, A B C D E
Java Implementation: MOP
Java Implementation: GJLP GrpJLProtocol AdMsg adMsg GrpInfoMap grpInfoMap GrpInfoList grpInfoList sendAdvMsg() adMsgReceived(AdMsg adMsg) createNewGrp(String desc) sendJoinMsg() sendLeaveMsg() grpInfoListRecv(GrpInfoList ) LeaveMsg leaveMsg JoinMsg joinMsg leaveMsgRecv(LeaveMsg leaveMsg) GroupManager
Java Implementation: MSP
Java APIs for Application Developer Class: GroupManager Interface: ApplGrpManagerInterface
Threaded Chat Application
ApplGrpMngrClass ApplGrpMgnrClass void sendMsg2Appl(LinkedList msgList, Gid gid) void displayNewGrpInfo(GrpInfo grpInfo) Void createNewGroup(Gid gid) ApplGrpMgnrInterface
Threaded Chat Application ChatConsole DynaTree DynaTreeNode NewGrpConsole CreateNewGrpWindow
Related Work Anhinga Project M2MI M2MP
Demo