M2MC: Middleware for Many to Many Communication over broadcast networks

advertisement
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
Introduction


B
A
Middleware
Communication Paradigms
A
C
E
D
B
(1)
A
(3)
B
C
G2
B
D
(2)
A
G1
D
C
(4)
E
M2MC middleware
data
Application
Application
M2MC
msg
M2MC
packet
Broadcast Layer
Broadcast Layer
Motivation
Architecture
Application
ApplGrpMngrClass
5
A
ApplGrpMngrInterface
MSP
7
6
GJLP
4
B
Group Manager
E
C
2,3
Message
Receiver/Buffer
1
BroadcastReceiver
MOP
8
D
BroadcastSender
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 Sb and
Hb
Sb Ordering

Definition
Ordering Tree
OTR
C1
A1
C2
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
State Diagram
after delivering
In seq
By
default
INITIAL
RCV_Deliverable
RECEIVED Out of order
Msg received
LISTEN
For
sending
msg
RESPOND
After sending
msg
RCV_OutofSeq
After
storing
in
cache
Protocol Illustration
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(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





<grpInfo>: gid,desc, cMemList, lMemList
<advMsg>: pid
<grpsInfoList>: list of <grpInfo>
<joinMsg>: pid,gid , <leaveMsg>:pid,gid
DataStrucutre: GroupsInfoIndexTable
gid1
Desc, memlist
gid2
Desc, memlist
gid3
Desc, memlist
gid4
Desc, memlist
State Diagram
CreateNewGrp
UpdateGrpInfo
for creating new
group
after updating
for advertising
sentAdv
Initial
no GrpInfo msg
left in the list
leave
On received
group
GrpInfoList sent infolist
received Adv
RecvGrpsInfoList
after sending
if process joins the group
SendJoinMsg
SendLeaveMsg
SendGrpInfoList
For each GrpInfoMsg in the list
SendAdv
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:
State Diagram
Protocol Illustration
A
m1
C
m1
B
m1
B
A
m1
m2
C
B
A
m1
m2
m1
m2
m1
m1
m2
Architecture
Application
ApplGrpMngrClass
5
A
ApplGrpMngrInterface
MSP
7
6
GJLP
4
B
Group Manager
E
C
2,3
Message
Receiver/Buffer
1
BroadcastReceiver
MOP
8
D
BroadcastSender
Java Implementation: MOP
Java Implementation: GJLP
GrpJLProtocol
AdMsg adMsg
GrpInfoMap grpInfoMap
GrpInfoList grpInfoList
LeaveMsg leaveMsg
JoinMsg joinMsg
sendAdvMsg()
adMsgReceived(AdMsg adMsg)
createNewGrp(String desc)
sendJoinMsg()
sendLeaveMsg()
grpInfoListRecv(GrpInfoList )
leaveMsgRecv(LeaveMsg leaveMsg)
GroupManager
Java Implementation: MSP
Java APIs for Application
Developer


Class: GroupManager
Interface:
ApplGrpManagerInterface
Threaded Chat Application
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
Demo
Download