1. Introduction

1.1 Purpose

This document will outline the implementation of the requirements of the HTML5 Music Server.

1.2 System Overview

This project is an implementation of a music server in HTML5. Allowing users to upload and listen to music through HTML5, allowing users to access their music collections from anywhere they have a HTML5 capable web browser with internet access.

1.3 Supporting Materials

See also the Project Vision and Scope document and the Software Requirements Specification document.

1.4 Definitions and Acronyms

None at this time.

2. Design Considerations

Give an overview of important aspects uncovered during the specification and design phases that should be remembered.

2.1 Assumptions

AD-1. HTML5 support of music files.
AD-2. MySQL handling of multiple users.
AD-3. See Limitations section in the Vision and Scope Document.

2.2 Constraints

CO-1. The system shall use the current standard MySQL database engine.
CO-2. All HTML code shall conform to the WC3 HTML standard.
CO-3. All server-side scripts shall be written in PHP.

2.3 System Environment

Client will run on any device with web browser that is HTML5 WC3 compliant. Server will run on Linux server with Apache, MySQL , and PHP.

2.4 Design Methodology

Design will follow a typical iterative design practice. Prototypes will be utilized to design subsystems and integrate said subsystems with the overall system

2.5 Risks and Volatile Areas

RV-1: Security of the database.
RV-2: Collisions in updating databases
RV-3: Exceeding memory in PHP

3. Architecture

3.1 Overview

SS-1. User Interface

User interface handles and dispatches requests and control sequences to proper subsytem

SS-2. Collection Interface

Interface built in PHP to manage music collection databases

SS-3. Music Player

Music player controls the playback of music

SS-4. User administration

Handles user authentication and user accounts

SS-5. Social media integration

Allows interfacing with social media such as Facebook or Twitter

4. Database Schema

4.1 Tables, Fields and Relationships

4.1.1 Databases

EMS – Only one database should be needed for the project

4.1.2 Tables

users, collection_UserID, fb_users.

4.1.3 Fields(s)

Table Name Field Name Data Type Allow Nulls Field Description
users id unsigned int No auto_increment primary key
users name VARCHAR(32) Yes user’s name (defaults to email)
users email VARCHAR(255) No user’s email
users password VARCHAR(32) No user’s password
users session_id VARCHAR(32) Yes user’s current session id
users date_reg DATETIME No user’s date of registration
collection_UserID id unsigned int No Song ID
collection_UserID file_name VARCHAR(30) No Song file name
collection_UserID file_path VARCHAR(60) No Song file path on server
collection_UserID (TAG information) (optional)
social_media id unsigned int No auto_increment primary key
social_media user_id unsigned int No FK: users.id
social_media oauth_provider VARCHAR(10) No Oauth Provider i.e. Facebook/Twitter
social_media oauth_id text No user id returned from oauth provider
social_media username text No username from oauth

5. Detailed System Design

SS-6. User Interface

User interface handles and dispatches requests and control sequences to proper subsytem

SS-7. Collection Interface

Interface built in PHP to manage music collection databases

SS-8. Music Player

Music player controls the playback of music

SS-9. User administration

Handles user authentication and user accounts

SS-10. Social media integration

Allows interfacing with social media such as Facebook or Twitter

5.1 User Interface

5.1.1 Classification

The user interface will be built in HTML

5.1.2 Definition

User interface handles and dispatches requests and control sequences to proper subsytem

5.1.3 Responsibilities

Receiving and displaying all input and output.

5.1.4 Constraints

Input and output will be limited. Refer to the HTML5 Music Server Software Requirements Specification section 4.1 for more information on the design of the User Interface.

5.1.5 Uses/Interactions

The User Interface will handle all input through standard HTML Form elements and buttons. It will interface with all other subsystems.

5.1.6 Processing

The User Interface will process all input and output through HTML form elements and buttons.

5.2 Collection Interface

5.2.1 Classification

Subsystem

5.2.2 Definition

The PHP Collection Interface will handle all the requests to the database.

5.2.3 Responsibilities

The PHP Collection Interface will handle all the requests to the database.

5.2.4 Constraints

Constraints include storage space, timing, and locking.

5.2.5 Uses/Interactions

The PHP Collection Interface will be used by the User Interface to allow uploading and editing music and music collections. It will also be used by the Music Player to allow it access the file path of the requested music file.

5.2.6 Resources

The PHP Collection Interface will access the MySQL database needed for the project. In order to prevent race conditions or multiple clients updating the database at the same time, MySQL ’s built in LOCK TABLES functions will be utilized.

5.2.7 Processing

The PHP Collection Interface will receive input from the User Interface. From there it will either read from the database with the information received from the User Interface, or it will need to process the file to be uploaded and store its properties in the database. It may process ID3 tags of MP3’s upon upload or update of collection.

5.2.8 Interface/Exports

Most data available from the PHP Collection Interface is covered in section 4.1.3 of this document.

5.3 Music Player

5.3.1 Classification

Subsystem

5.3.2 Definition

A subsystem that controls the playback of the music.

5.3.3 Responsibilities

It is responsible for loading and playing using HTML5's built in system for playing music.

5.3.4 Constraints

Constraint: Varying support MP3 sometimes. M4A sometimes and OGG Vorbis sometimes.

5.3.5 Uses/Interactions

The Music Player will be utilized by the User Interface. It will receive input from the User Interface, the music player will request data from the PHP Collection Interface, and it will create/control the audio tags.

5.3.6 Resources

Current song source and tag attributes.

5.3.7 Processing

The Music Player will utilize the built in functionality of the HTML5 Audio tag.

5.3.8 Interface/Exports

Song length and position will be provided to the User Interface.

5.4 User Administration

5.4.1 Classification

Subsystem

5.4.2 Definition

A subsystem that handles the authorization and administration of users.

5.4.3 Responsibilities

It is responsible for securing the application, managing sessions and cookies, and updating user information.

5.4.4 Constraints

Database locking and security of the database.

5.4.5 Uses/Interactions

The User Administration will be used by the User Interface to allow access to user information.

5.4.6 Resources

Information covered in section 4.1.3 of this document. All data stored in user table.

5.4.7 Processing

The User Administration will utilize standard authentication practices. It will utilize HTML5 SharedObject class and PHP sessions.

5.4.8 Interface/Exports

User name and correct login information will be provided to the User Interface

5.5 Social Media Integration

5.5.1 Classification

Subsystem

5.5.2 Definition

A subsystem that handles the authorization and interactions of the chosen social media.

5.5.3 Responsibilities

It is responsible for authorizing user on chosen social media, and all interactions involved with that social media (i.e. status updates, tweets, etc.).

5.5.4 Constraints

Interactions depend on chosen social media.

5.5.5 Uses/Interactions

The Social Media Integration subsystem will be utilized by the User Interface to provide social media.

5.5.6 Resources

Information covered in section 4.1.3 of this document. All data stored in social media table.

5.5.7 Processing

The Social Media Integration Subsystem may use several standard Authorization and Interaction modules and or libraries for interacting with different social media websites.

5.5.8 Interface/Exports

User name and correct login information will be provided to the User Interface. Extra data based on social media chosen.

-- DavidSieg - 2011-02-23

Topic revision: r1 - 2011-02-23 - DavidSieg
 
This site is powered by the TWiki collaboration platformCopyright &© by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback