130 likes | 236 Views
Students: Ran Margolin & Dan Waxman Supervisor: Ittay Eyal. D istributed M edia P layer . Project Objective. Theory - Log. Synchronized Log - identical behavior. Read/Execute. Read/Execute. Log Play PauseStop PausePlay Stop. Log Play PauseStop PausePlay Stop. Synced. Issue.
E N D
Students: Ran Margolin & Dan Waxman Supervisor: Ittay Eyal Distributed Media Player
Theory - Log • Synchronized Log - identical behavior. Read/Execute Read/Execute Log Play PauseStop PausePlay Stop Log Play PauseStop PausePlay Stop Synced Issue Issue Broadcast Broadcast
Theory – NCT (Network Clock Time) • Commands executed synchronously. Synchronized Current Time (11:12) Current Time (11:12) Read/Execute Read/Execute Log 11:03 - Play 11:07 - PauseStop 11:12 - PausePlay 11:13 - Stop Log 11:03 - Play 11:07 - PauseStop 11:12 - PausePlay 11:13 - Stop Synced Issue Issue Broadcast Broadcast
Network Structure • Identical privileges and control. • Synchronization via broadcast messages & peer2peer exchange.
Software Design - Structure Presentation Tier User presses play Play Song + update GUI Broadcast command + retrieve song Logic Tier Using Database, retrieve song from hard drive Data Tier
Software Design - Modules Neighbor List Neighbor List Song List GUI NCT Controller Clock DMP Controller Media Player Listen Server Log Listen Server
Software Design – Design Patterns • Observer – • Sub modules inherit java.util.Observable • Core modules implement java.util.Observer. • Decorator – Used in GUI. Implemented using Swing library.
Software Design – Technologies • JAVA • Song library maintained using MySQL • Media files played using Java Media Framework
Software Design – Data Types Used • TreeSet – Inner implementation of NeighborList. (log[n]) • ArrayList – SongList transfer. • MySQL – Song library data (SongList).
Software Design – Inheritance/ Interface • Interface Serializable- Transfer of data between users. • Interface Observer/Class Obervable – Monitor & update changes between modules. • Interface Comparable- Facilitate comparison in data structures.
Problems • JMF non real-time oriented • Workaround: Heuristic algorithms (partial results) • Playback rate varies according to CPU workload