Stable Interactive Broadcast System Final Presentation
-
Upload
violet-best -
Category
Documents
-
view
36 -
download
0
description
Transcript of Stable Interactive Broadcast System Final Presentation
Created By : Dani Shaket
Ran ZellerSupervisor : Alexander Shraer
Presentation outlinesGeneralProject goalsSystem descriptionDesign and implementationSummary and conclusionsExample
GeneralOnline applications today, often suffer from low
stability and performances.These problems can be moderate using smart
resource sharing.Our solution, is a system where each service
provider (server) “knows” all the other servers and together they can provide a better solution for online applications.
In this project we apply this solution to create a virtual class-room, which provides three multi-user applications :Text Chat, Drawing Pad and Media Streaming.
General – cont.The SiBS is composed out of two main programs,
the Server and the Client.The Client application provides the user with easy-
to-use Graphic Interface that enables the user to Create, join and participate sessions.
The Server application provides multi-session management, extremely high stability and survivability , ensuring continuity , disaster recovery and maximizing Quality/Cost Ratio by joining resources.
The Server can run in stand-alone mode , or as a servers-group member.
Project Goalsimplement a multi-threaded application in the
java.Learn and use the ensemble group-
communication package.Learn and use the JMF (Java Media Framework)
package.Learn and use the SIP (Session Initiation
Protocol) and the Jain-Sip Package.Design a system using the OOP methodology.implement User Graphic Interface.explore some characteristics of performance &
Quality measures and timing issues.
System Description
Server
Server
Server
Server
Session 1
Server
Session 2 Sessio
n 4
Client
Servers Group
Client
Manager
Client
Client
Manager
Client
Session 3
Client
Client
Manager
Client
Client
Manager
System Description - AlgorithmsServers Start-up Client Log-inSession creationUser JoinSession Action – StreamAuctionSession resumption / recoverySession Management delegationDrawing Pad algorithm
System Description - StartUp
First server start-up
Server
- Sync: View synchronization.- Heal: Partitions healing.- Migrate: process migration.- Frag: Message fragmentation re-assembly.- Switch: allow on-the-fly protocol switching- Suspect: failure detection- Flow: flow control
-Total: Total order messaging
System Description - StartUpServer
*Israel
The Server Reads configuration files and apply setup :Server ID, Known clients, available media list etc…
Try to connect to the group – no one available yet
System Description – Group
*Server
Israel
China and USA servers starts and form a group
A leader is chosen ( arbitrary )
ServerChina
ServerUSA
System Description-Login*Serve
rIsrael
A Client, Sends Login request to Israel Server
ServerChina
ServerUSA
ClientAvi
LogIn
System Description-Login*Serve
rIsrael
The Israeli server respond with Login success and empty known sessions list
ServerChina
ServerUSA
ClientAvi
Login SuccessSession List Empty
System Description - Session Creation*Serve
rIsrael
Avi requests session creation called SiBS tutorial, with some otherparameters
ServerAustrali
a
ServerUSA
ClientAvi
Create Session
*Server
Israel
The Server creates a session called SiBS tutorial, that sends Invite message to Avi as Session Master.
The Server broadcast Session creation message to the the other servers, and the session start to sending Session State message periodically.
ServerChina
ServerUSA
ClientAvi
SibS
Session Created
Session Created
Session state
Session state
Invite
System Description- Session Creation
System Description - Join*Serve
rIsrael
Client John, request login from USA server.The server respond with Login Success, and
Sessions List, including SiBS tutorial session
ServerUSA
ClientAvi
SibS
ClientJohn
Login
Success
ServerChina
System Description - Join*Serve
rIsrael
Client John, request to Join SiBS tutorial Sesssion.The server notice that the SiBS session is not
hosted by him, so he broadcast Join From User Message
ServerAustrali
a
ServerUSA
ClientAvi
SibS
ClientJohn
Join SiBS
Join From UserServerChina
System Description - Join*Serve
rIsrael
Israeli Server recognized that the session is hosted by him, and handle the join Request.
The China Server Disregard the message
ServerAustrali
a
ServerUSA
ClientAvi
SibS
ClientJohn
Invite
ServerChina
John’s View
System Description - Stream*Serve
rIsrael
Client Avi request Start Streaming Media from SiBS tutorial room
The SiBS tutorial room start broadcasting the requested media to Avi And John
ServerAustrali
a
ServerUSA
ClientAvi
SibS
ClientJohn
ServerChina
StartStream
System Description - Auction*Serve
rIsrael
four enthusiastic Chinese investors , Ying , Young, Hu and Fu, Login and join The SiBS tutorial session.
ServerAustrali
a
ServerUSA
ClientAvi
SibS
ClientJohn
ServerChina
ClientYoung
ClientYing
ClientFu
ClientHu
System Description - Auction*Serve
rIsrael
SiBS tutorial Session, recognize that his Quality & Cost is getting lower.
The Server, decide to start an Auction Process.
ServerAustrali
a
ServerUSA
ClientAvi
SibS
ClientJohn
ServerChina
ClientYoung
ClientYing
ClientFu
ClientHu
Auction On SiBS
Auction On SiBS
System Description - Auction*Serve
rIsrael
Each one of the server checks Ping-Pong Time for each one of the users, in addition to static Cost calculation.
The servers respond calculate the “what if” Quality and Cost value.
ServerAustrali
a
ServerUSA
ClientAvi
SibS
ClientJohn
ServerChina
ClientYoung
ClientYing
ClientFu
ClientHu
Quality and Cost calculationMin Quality = 0 , Max Quality = 1000.Ping-Pong time (echo time) is measured in miliSec.Each client has a specific Cost ( from 1-1000) on a
each server.Example: user Fu from china will have cost = 300
on Israel server and cost = 50 on china serverThe calculation is :
QoS = 1000 – AveragePingPongTime – Average Cost( if QoS < 0, Qos = 0 )
Session Quality level for auction process is const = 500
System Description - Auction*Serve
rIsrael
Since Israel Server is also the leader, he manages the Auction
The winner of the Auction will be the China Server
ServerAustrali
a
ServerUSA
ClientAvi
SibS
ClientJohn
ServerChina
ClientYoung
ClientYing
ClientFu
ClientHu
I Bid 800I Bid 400
System Description - Auction*Serve
rIsrael
China Server creates a new session called SiBS$1 ( which means transfer number 1) and Invites all users to that session
The clients join the new SibS$1 session and leave the old session
ServerAustrali
a
ServerUSA
ClientAvi
SibS
ClientJohn
ServerChina
ClientYoung
ClientYing
ClientFu
ClientHu
Winner
SibS $1
System Description – Recovery*Serve
rIsrael
The China server crashes
ServerAustrali
a
ServerUSA
ClientAvi
ClientJohn
ServerChina
ClientYoung
ClientYing
ClientFu
ClientHu
SibS $1
System Description – Recovery*Serve
rIsrael
The Israeli server ( and the USA server ) recognize a That the Chinese server is down.
The Israeli server , as the leader, select The USA server to resume the orphan session
ServerUSA
ClientAvi
ClientJohn
ClientYoung
ClientYing
ClientFu
ClientHu
SibS $1
Take OverSiBS$1 session
System Description – Recovery*Serve
rIsrael
The USA server creates a new Session called SiBS$2, and invites all users to join ( same as in auction process).
ServerUSA
ClientAvi
ClientJohn
ClientYoung
ClientYing
ClientFu
ClientHu
SibS $1
Take OverSiBS$1 session
SibS $2
System Description – Recovery*Serve
rIsrael
The session Resumed
ServerUSA
ClientAvi
ClientJohn
ClientYoung
ClientYing
ClientFu
ClientHu
SibS $2
System Description – Management Delegation
*Server
Israel
Client Avi is currently the Master of the session.The Management delegation can be configured as
ExclusiveRandom PrivilgedChain of command
ServerUSA
ClientAvi
ClientJohn
ClientYoung
ClientYing
ClientFu
ClientHu
SibS $2
System Description – Management Delegation
*Server
Israel
ServerUSA
ClientJohn
ClientYoung
ClientYing
ClientFu
ClientHu
SibS $2
The Session recognized that Client Avi does not respond to Ping messages and decides that Client Avihave left.
The session sends a BECOME_MASTER message to the selected client ( according to setup).
The session can become Master-less, meaning no master action can occur.
Become-Master
System Description – Drawing Pad
The Drawing pad panel, composed out of two panels : Control Panel – Select color / tool / width , clear Graphics panel – Java Graphic 2D object with the ability to
present shapes. When the user want to paint an object, he select a tool ( only pen
is implemented) color and a width. When the user left-click on the graphics panel, the application
records 2 to 20 points until the mouse is released. When the recording is finished, a Drawing message is sent to the
server , and the server forwards it to the members of the session. example :From sip:[email protected]:5075 : DRAW;PEN;3;13;29 335 28 335 30 335 38 336 50 337 62 337 77 337 92 340 108 342 120 343 131 343 145 343 156 344 168 344 181 344 189 344 197 344 204 344 213 342 226 337 235 335 244 333 254 329 264 327 272 326 277 326 279 326 284 326 293 326 301 326 ;
The Client who receive this message, paint the shape on its Graphics panel.
If two or more clients are drawing together, the shape which sent earlier will be in the back.
Drawing Pad
Design and implementation - Server
Design and implementation - ServerinfraStructure Package
SubManager – Messaging service, TimersEnsemble Communication channelSip Communication channel / Sip MultiplexerJMF’s AV-Transmitter
Server PackageServer ManagerLogin ManagerSession ManagerQoS Manager
Server System
Server
Login Manager
Session Manager
QoS Manager
RecoveryManager
Sip Multiplexer
En
sem
ble
Clients
*
*
Servers*
The Server
• Each Square represents a Subsystem
• The application will be build over an infrastructure that provides Messaging between subsystems and Multithreading support.
Design and implementation - ClientClient Manager
Client State Communication ( SIP )
Client GUIMain FrameLogin TabStreaming TabChat TabDrawing Pad Tab
Client System
Client
Sip Layer
Server
GUI
MediaPlayer
JMF Data Source
The Client
• Each Square represents a Subsystem
• The application will be build over an infrastructure that provides Messaging between subsystems and Multithreading support.
SummaryIn this project we have designed and
implemented the Stable interactive Broadcasting System (SiBS) which provides three multi-user online applications: Text Chat, Drawing Pad and Media Streaming, that runsin a context of a Session.
The SiBS provides extremely high stability and survivability , ensuring continuity , disaster recovery and maximizing Quality/Cost Ratio by joining resources, in order to give the Users the best possible solution.
During the design and implementation we have learned to use : Java under eclipse, multithreading , Ensemble, JMF, SIP, GUI design, OOP and more.
ConclusionsDuring the implementation we have
encountered problems related to JMF and timing. Internet oriented /online applications should be as timing-independent as possible.
Scalability/Stability tradeoff – enable user to select.Servers system is not scalable , but stable. Session management is scalable for users.
Ensemble provides easy interface and good performances in addition to reliable communication
JMF is bad ( bad design, bad API, bad compatibility, bad performances, bad documentation, bad stability )
Options for the futureThe SiBS can have a place in the “real world”, where
stability is needed.The project is build using the OOP methodology ,
enable to easily change parameters, add features and applications, changing communication protocols etc.. it can be used as a base for future realistic applications.
The algorithm for Auction decision can be improved in many ways – a possible subject for research :Dynamic auction limit/Panic limitCompare “what if” QoS with the real one / use statisticsGeographic distance vs. Ping-Pong time – is there really
a correlation ? Change metrics ? Implement group-communication ourselves – can be
very interesting.
Questions?? ?