Download - Video Chat System Design
-
8/8/2019 Video Chat System Design
1/18
Video Chat System Design
The aim of this document is to provide the technical design specification for the Video Chat
Application.
Client Side
This part of the system will be used by the clients to connect to the chat server and to
communicate to other clients. Clients will be required to create an account to access the
system; and/or log onto the system using their existing accounts.
Functional Description
This section enables the client to register and/or log onto the chat server. In order to
successfully register to the system, the client should fill-up all required fields; and to successfully
log onto the system, the client should enter his own valid account details. This section will have
the following mode:
y Register / Create New User
y Client Login
Page Security
Clients can only update and view their own profile. Administrators can be allowed to modify
and/or delete client records, as well as view all client records. Clients who may have forgotten
their passwords and/or account details will be required to enter their email address, where thesystem would send their account information.
Database Specifications
Description: This will be used to store client information in the database.
Database: vc_db
Table Name: client_table
Fields:
ElementName
ElementType
Description Field Name DataType
Required Validation Enabled
Client ID TextField
Unique IDautogeneratedby the systemgiven to every
user.
client_id varchar Yes NA No
Client Text Last Name of client_lName varchar Yes C Yes
-
8/8/2019 Video Chat System Design
2/18
LastName
Field the client.
ClientFirst
Name
TextField
First Name ofthe client.
client_fName varchar Yes C Yes
Client
Chat Nick
Text
Field
Client Nick to
be used onchat system.
Must beunique.
client_nick varchar Yes D Yes
ClientPassword
TextField
Clientpassword
used to logonto the
system. Casesensitive.
client_password varchar Yes D Yes
ClientCreated
Date /Time
Automaticallyretrieves the
current dateand time
when clienthas createdhis account
client_created date/time Yes NA No
ClientLast
Modified
Date /Time
Automaticallyretrieves thecurrent date
and timewhen clienthas updatedhis account
client_modified date/time Yes NA No
Client IP TextField
Clients IPaddress
client_ip varchar Yes NA No
ClientEmail
TextField
Clients EmailAddress
client_email varchar Yes F Yes
ClientBirth
Month
DropDown
Client BirthMonth
client_bMonth Int Yes NA Yes
ClientBirth Day
DropDown
Client BirthDay
client_bDay int Yes A Yes
ClientBirthYear
DropDown
Client BirthYear
client_bYear long Yes A Yes
Save /Update
Button Button tosave/update
the newrecord. Save
appears whena new client is
registering,update
None NA NA NA NA
-
8/8/2019 Video Chat System Design
3/18
appears whenclient has
modified hisprofile.
Cancel Button Clears allfields and
goes back tothe previous
screen.
None NA NA NA NA
Ok Button This button isvisible on view
mode
None NA NA NA NA
Input validation criteria:
A: numbers only
B: numbers, spaces ( ), and dashes (-) only
C: letters and numbers only
D: letters, numbers, underscores (_), dashes (-), spaces ( ), and dots (.) only
E: D plus line carriage (\n\r), commas (,), and slashes (/ ,\), pluses(+), pounds(#), and parenthesis ( () )
only
F: D plus at signs (@) only
Methods
The following are the identified methods for this section:
1. registerNewClient Method
Name registerNewClientDescription This method handles the creation of client records in the database. This will
create the client information.
Input Arguments clientInfo info
Return Type Void
Visibility PublicExceptions System exception
Logical exception
Implementation Validate the clientInfo object passed:If it is null, throw logical exception with message key invalid inputexception.If one of the required fields is null, throw logical exception with message keyrequired fields input exception.If client_nick has no duplicate on the database, proceed to next step,otherwise, throw logical exception with message key chat nick should beunique.If client_email has no duplicate on the database, proceed to next step,otherwise, throw logical exception with message key email address alreadyexists.
-
8/8/2019 Video Chat System Design
4/18
Get a connection to the database. Get the next system generated ID andassign it to the clientInfo object. Use the appropriate methods to create theobject. Commit the connection.
If an IDGeneratorException or DBAccessException occurs, rollback
connection and throw system exception. Finally close database accessconnections.
2. clientLogin Method
Name clientLogin
Description This method handles the basic security and client authorization to accessthe chat server. Upon successful login, client will be directed to the chatwindow; however, an unsuccessful login will prompt the client to enter validlogin details or enter his email address in case he forgot his account details.
Input Arguments clientInfo info
Return Type VoidVisibility PublicExceptions System exception
Logical exception
Implementation Validate the clientInfo object passed:If it is null, throw logical exception with message key invalid inputexception.If one of the required fields is null, throw logical exception with message keyrequired fields input exception.If clientInfo does not match data on database, throw logical exception withmessage key nick and/or password does not match.
Get a connection to the database. Get the next system generated ID andassign it to the clientInfo object. Use the appropriate methods to create theobject. Commit the connection.
If an IDGeneratorException or DBAccessException occurs, rollbackconnection and throw system exception. Finally close database accessconnections.
-
8/8/2019 Video Chat System Design
5/18
Server Side
This part of the system will be used by the administrators and/or moderators to manage clients
and client records; chat rooms details and provide basic functionalities like add/edit/delete
administrators and moderators. Administrators will have general access to everything on the
system, while moderators will be limited to chat room management and possibly some minor
client-side requests. Upon system execution and user validation, server will be put into listener
mode, where it would listen for incoming client connections. Only successful valid client logins
will be allowed access to the system.
Functional Description
This section will be split into 2 categories, for administrators and for moderators, although they
would likely share similar methods and functionalities, as only certain areas are restricted for
moderators. System access will be determined by login details.
For the Administrators:
y Moderator Management (Create / Modify / Delete / View)
y Administrator Management
y Client Management
y Chat Room Management
y Messages Management
For the Moderators:
y
Chat Room Managementy Messages Management
Page Security
Administrators have general overall access to all system services and functionalities.
Moderators will be restricted to chat room and messages management. Administrators and
moderators can only update and view their own profile. Similar to the client side, administrators
and moderators who may have forgotten their account details will be required to enter their
email address, where the system would send their account information. Administrators will have
a prefix of ADM_ on their chat nick and moderators will have a prefix of MOD_ to distinguish
them in chat rooms.
-
8/8/2019 Video Chat System Design
6/18
Database Specifications
Description: This will be used to store administrator information in the database.
Database: vc_db
Table Name: admin_table
Fields:
ElementName
ElementType
Description Field Name DataType
Required Validation Enabled
Admin ID TextField
Unique IDautogeneratedby the systemgiven to every
user.
admin_id varchar Yes NA No
Admin
LastName
Text
Field
Last Name of
the admin.
admin_lName varchar Yes C Yes
AdminFirst
Name
TextField
First Name ofthe admin.
admin_fName varchar Yes C Yes
AdminChat Nick
TextField
Admin Nick tobe used on
chat system.Must beunique.
admin_nick varchar Yes D Yes
AdminPassword
TextField
Adminpassword
used to logonto the
system. Casesensitive.
admin_password varchar Yes D Yes
AdminCreated
Date /Time
Automaticallyretrieves thecurrent date
and timewhen adminhas createdhis account
admin_created date/time Yes NA No
Admin
LastModified
Date /
Time
Automatically
retrieves thecurrent date
and timewhen adminhas updatedhis account
admin_modified date/time Yes NA No
Admin IP TextField
Admins IPaddress
admin_ip varchar Yes NA No
Admin Text Admins Email admin_email varchar Yes F Yes
-
8/8/2019 Video Chat System Design
7/18
Email Field Address
AdminBirth
Month
DropDown
Admin BirthMonth
admin_bMonth Int Yes NA Yes
AdminBirth Day
DropDown
Admin BirthDay
admin_bDay int Yes A Yes
AdminBirthYear
DropDown
Admin BirthYear
admin_bYear long Yes A Yes
Save /Update
Button Button tosave/update
the newrecord. Save
appears whena new adminis registering,
updateappears when
admin hasmodified his
profile.
None NA NA NA NA
Cancel Button Clears allfields and
goes back tothe previous
screen.
None NA NA NA NA
Ok Button This button isvisible on view
mode
None NA NA NA NA
Input validation criteria:
A: numbers only
B: numbers, spaces ( ), and dashes (-) only
C: letters and numbers only
D: letters, numbers, underscores (_), dashes (-), spaces ( ), and dots (.) only
E: D plus line carriage (\n\r), commas (,), and slashes (/ ,\), pluses(+), pounds(#), and parenthesis ( () )
only
F: D plus at signs (@) only
-
8/8/2019 Video Chat System Design
8/18
Database Specifications
Description: This will be used to store moderator information in the database.
Database: vc_db
Table Name: moderator_table
Fields:
ElementName
ElementType
Description Field Name DataType
Required Validation Enabled
Mod ID TextField
Unique IDautogeneratedby the systemgiven to every
user.
mod_id varchar Yes NA No
Mod Last
Name
Text
Field
Last Name of
the mod.
mod_lName varchar Yes C Yes
Mod FirstName
TextField
First Name ofthe mod.
mod_fName varchar Yes C Yes
Mod ChatNick
TextField
Mod Nick tobe used on
chat system.Must beunique.
mod_nick varchar Yes D Yes
ModPassword
TextField
Modpassword
used to logonto the
system. Casesensitive.
mod_password varchar Yes D Yes
ModCreated
Date /Time
Automaticallyretrieves thecurrent date
and timewhen mod
has createdhis account
mod_created date/time Yes NA No
Mod LastModified
Date /Time
Automaticallyretrieves thecurrent date
and timewhen mod
has updatedhis account
mod_modified date/time Yes NA No
Mod IP TextField
Mods IPaddress
mod_ip varchar Yes NA No
ModEmail
TextField
Mods EmailAddress
mod_email varchar Yes F Yes
Mod Birth Drop Mods Birth mod_bMonth Int Yes NA Yes
-
8/8/2019 Video Chat System Design
9/18
Month Down Month
Mod BirthDay
DropDown
Mods BirthDay
mod_bDay int Yes A Yes
Mod BirthYear
DropDown
Mods BirthYear
mod_bYear long Yes A Yes
Save /
Update
Button Button to
save/updatethe new
record. Saveappears whena new adminis registering,
updateappears when
admin hasmodified his
profile.
None NA NA NA NA
Cancel Button Clears all
fields andgoes back tothe previous
screen.
None NA NA NA NA
Ok Button This button isvisible on view
mode
None NA NA NA NA
Input validation criteria:
A: numbers only
B: numbers, spaces ( ), and dashes (-) only
C: letters and numbers only
D: letters, numbers, underscores (_), dashes (-), spaces ( ), and dots (.) only
E: D plus line carriage (\n\r), commas (,), and slashes (/ ,\), pluses(+), pounds(#), and parenthesis ( () )
only
F: D plus at signs (@) only
-
8/8/2019 Video Chat System Design
10/18
Database Specifications
Description: This will be used to store the category information in the database.
Database: vc_db
Table Name: category_table
Fields:
ElementName
ElementType
Description Field Name DataType
Required Validation Enabled
CategoryID
TextField
Unique IDautogeneratedby the systemgiven to every
category.
category_id varchar Yes NA No
Category
Name
Text
Field
Category
Name
category_name varchar Yes C Yes
CategoryCreated
TextField
Date / TimeCategory was
created
category_created varchar Yes D Yes
CategoryModified
TextField
Date / Timecategory waslast modified
category_modified varchar Yes D Yes
CategoryAuthor
TextField
Author whocreated the
category
category_author date/time Yes NA No
CategoryDescription
TextField
Shortdescription of
the category
category_desc varchar Yes D Yes
Save /Update
Button Button tosave/update
the newrecord.
None NA NA NA NA
Cancel Button Clears allfields and
goes back tothe previous
screen.
None NA NA NA NA
Ok Button This button isvisible on view
mode
None NA NA NA NA
Input validation criteria:
A: numbers only
B: numbers, spaces ( ), and dashes (-) only
C: letters and numbers only
-
8/8/2019 Video Chat System Design
11/18
D: letters, numbers, underscores (_), dashes (-), spaces ( ), and dots (.) only
E: D plus line carriage (\n\r), commas (,), and slashes (/ ,\), pluses(+), pounds(#), and parenthesis ( () )
only
F: D plus at signs (@) only
Database Specifications
Description: This will be used to store the chatroom information in the database.
Database: vc_db
Table Name: chatroom_table
Fields:
ElementName
ElementType
Description Field Name DataType
Required Validation Enabled
Room ID TextField
Unique IDautogeneratedby the systemgiven to every
room.
room_id varchar Yes NA No
RoomCategory
DropDown
Category ofthe Room.
room_category varchar Yes C Yes
RoomName
TextField
First Name ofthe mod.
room_name varchar Yes C Yes
RoomCreated
Date /Time
Mod Nick tobe used on
chat system.
Must beunique.
room_created date/time Yes D Yes
RoomModified
Date /Time
Modpassword
used to logonto the
system. Casesensitive.
room_modified date/time Yes D Yes
RoomAuthor
Date /Time
Automaticallyretrieves thecurrent date
and time
when modhas createdhis account
room_author date/time Yes NA No
RoomUsers
TextField
Number ofclients who
can chatinside the
room
room_users int Yes A Yes
-
8/8/2019 Video Chat System Design
12/18
Save /Update
Button Button tosave/update
the newrecord.
None NA NA NA NA
Cancel Button Clears allfields and
goes back tothe previous
screen.
None NA NA NA NA
Ok Button This button isvisible on view
mode
None NA NA NA NA
Input validation criteria:
A: numbers only
B: numbers, spaces ( ), and dashes (-) only
C: letters and numbers only
D: letters, numbers, underscores (_), dashes (-), spaces ( ), and dots (.) only
E: D plus line carriage (\n\r), commas (,), and slashes (/ ,\), pluses(+), pounds(#), and parenthesis ( () )
only
F: D plus at signs (@) only
-
8/8/2019 Video Chat System Design
13/18
Database Specifications
Description: This will be used to store the chatroom messages and details in the
database.
Database: vc_db
Table Name: chatroom_messages_table
Fields:
ElementName
ElementType
Description Field Name DataType
Required Validation Enabled
MessageID
TextField
Unique IDautogeneratedby the systemgiven to every
message.
message_id varchar Yes NA No
Message TextField
Message sentto the chat
room.
message_context varchar Yes C Yes
SenderID
TextField
ID of themessagesender.
message_senderID varchar Yes C Yes
Room ID TextField
ID of theRoom.
message_roomID varchar Yes D Yes
MessageDate /Time
Date /Time
Date / Timemessage was
sent.
message_sent date/time Yes D Yes
Cancel Button Clears all
fields andgoes back tothe previous
screen.
None NA NA NA NA
Ok Button This button isvisible on view
mode
None NA NA NA NA
Input validation criteria:
A: numbers only
B: numbers, spaces ( ), and dashes (-) onlyC: letters and numbers only
D: letters, numbers, underscores (_), dashes (-), spaces ( ), and dots (.) only
E: D plus line carriage (\n\r), commas (,), and slashes (/ ,\), pluses(+), pounds(#), and parenthesis ( () )
only
F: D plus at signs (@) only
-
8/8/2019 Video Chat System Design
14/18
Database Specifications
Description: This will be used to store the private messages and details in the database.
Database: vc_db
Table Name: private_messages_table
Fields:
ElementName
ElementType
Description Field Name DataType
Required Validation Enabled
MessageID
TextField
Unique IDautogeneratedby the systemgiven to every
message.
message_id varchar Yes NA No
Message Text
Field
Message sent
to the chatroom.
message_context varchar Yes C Yes
SenderID
TextField
ID of themessagesender.
message_senderID varchar Yes C Yes
RecipientID
TextField
ID of therecipient.
message_recipientID varchar Yes D Yes
MessageDate /Time
Date /Time
Date / Timemessage was
sent.
message_sent date/time Yes D Yes
Cancel Button Clears allfields and
goes back tothe previous
screen.
None NA NA NA NA
Ok Button This button isvisible on view
mode
None NA NA NA NA
Input validation criteria:
A: numbers only
B: numbers, spaces ( ), and dashes (-) only
C: letters and numbers onlyD: letters, numbers, underscores (_), dashes (-), spaces ( ), and dots (.) only
E: D plus line carriage (\n\r), commas (,), and slashes (/ ,\), pluses(+), pounds(#), and parenthesis ( () )
only
F: D plus at signs (@) only
-
8/8/2019 Video Chat System Design
15/18
Methods
The following are the identified methods for this section:
1. createNewAdmin Method / createNewMod Method
Name createNewAdmin / createnewModDescription This method handles the creation of administrator and/or moderator records
in the database. This will create the admin and/or moderator information.
Input Arguments adminInfo info / modIndo info
Return Type Void
Visibility Public
Exceptions System exceptionLogical exception
Implementation Validate the info object passed:If it is null, throw logical exception with message key invalid inputexception.If one of the required fields is null, throw logical exception with message key
required fields input exception.If the field nick has no duplicate on the database, proceed to next step,otherwise, throw logical exception with message key chat nick should beunique.If the field email has no duplicate on the database, proceed to next step,otherwise, throw logical exception with message key email address alreadyexists.
Get a connection to the database. Get the next system generated ID andassign it to the info object. Use the appropriate methods to create theobject. Commit the connection.
If an IDGeneratorException or DBAccessException occurs, rollbackconnection and throw system exception. Finally close database accessconnections.
2. modifyAdmin Method / modifyMod Method
Name modifyAdmin / modifyMod
Description This method handles the editing of administrator and/or moderator recordsin the database. This will update the admin and/or moderator information.
Input Arguments adminInfo info / modIndo info
Return Type Void
Visibility Public
Exceptions System exceptionLogical exception
Implementation Validate the info object passed:If it is null, throw logical exception with message key invalid inputexception.If one of the required fields is null, throw logical exception with message keyrequired fields input exception.If the field nick has no duplicate on the database, proceed to next step,
-
8/8/2019 Video Chat System Design
16/18
otherwise, throw logical exception with message key chat nick should beunique.If the field email has no duplicate on the database, proceed to next step,otherwise, throw logical exception with message key email address alreadyexists.
Get a connection to the database. Define the info object to be updated.Use the appropriate methods to update the object. If the object update isnot successful, throw logical exception with message key record notupdated exception. Commit the connection.
If a DBAccessException occurs, rollback connection and throw systemexception. Finally close database access connections.
3. deleteAdmin Method / deleteMod Method
Name deleteAdmin / deleteModDescription This method handles the deletion of administrator and/or moderator records
in the database. This will delete the admin and/or moderator information.Input Arguments adminInfo info / modIndo info
Return Type VoidVisibility Public
Exceptions System exceptionLogical exception
Implementation Validate the info object passed:If it is null, throw logical exception with message key invalid inputexception.If one of the required fields is null, throw logical exception with message keyrequired fields input exception.
Get a connection to the database. Define the info object to be deleted. Usethe appropriate methods to delete the object. Commit the connection.
If a DBAccessException occurs, rollback connection and throw systemexception. Finally close database access connections.
4. viewAdmin Method / viewMod Method
Name viewAdmin / viewMod
Description This method handles the viewing of administrator and/or moderator recordsin the database. This will list the admin and/or moderator information.
Input Arguments adminInfo info / modIndo info
Return Type Collection
Visibility Public
Exceptions System exceptionLogical exception
Implementation Validate the info object passed:If it is null, throw logical exception with message key invalid inputexception.If one of the required fields is null, throw logical exception with message key
-
8/8/2019 Video Chat System Design
17/18
required fields input exception.Get a connection to the database. Assemble the objects that matches thequery. Add each record and return them in a list.
If a SQLException or a general Exception occurs, rollback connection andthrow system exception. Finally close database access connections.
5. addChatRoom Method
Name addChatRoomDescription This method handles the creation of chatroom records in the database. This
will create the chatroom information.
Input Arguments chatroomInfo info
Return Type Void
Visibility PublicExceptions System exception
Logical exception
Implementation Validate the info object passed:If it is null, throw logical exception with message key invalid inputexception.If one of the required fields is null, throw logical exception with message keyrequired fields input exception.
Get a connection to the database. Get the next system generated ID andassign it to the info object. Use the appropriate methods to create theobject. Commit the connection.
If an IDGeneratorException or DBAccessException occurs, rollbackconnection and throw system exception. Finally close database accessconnections.
6. modifyChatRoom Method
Name modifyChatRoom
Description This method handles the editing of chatroom records in the database. Thiswill update the chatroom information.
Input Arguments chatroomInfo infoReturn Type Void
Visibility Public
Exceptions System exceptionLogical exception
Implementation Validate the info object passed:If it is null, throw logical exception with message key invalid inputexception.If one of the required fields is null, throw logical exception with message keyrequired fields input exception.
Get a connection to the database. Define the info object to be updated.Use the appropriate methods to update the object. If the object update isnot successful, throw logical exception with message key record not
-
8/8/2019 Video Chat System Design
18/18
updated exception. Commit the connection.
If a DBAccessException occurs, rollback connection and throw systemexception. Finally close database access connections.
7. deleteChatRoom Method
Name deleteChatRoom
Description This method handles the deletion of chatroom records in the database. Thiswill delete the chatroom information.
Input Arguments chatroomInfo infoReturn Type Void
Visibility Public
Exceptions System exceptionLogical exception
Implementation Validate the info object passed:If it is null, throw logical exception with message key invalid inputexception.If one of the required fields is null, throw logical exception with message keyrequired fields input exception.
Get a connection to the database. Define the info object to be deleted. Usethe appropriate methods to delete the object. Commit the connection.
If a DBAccessException occurs, rollback connection and throw systemexception. Finally close database access connections.
8. viewChatroom Method
Name viewChatRoomDescription This method handles the viewing of chatroom records in the database. This
will list the chatroom information.
Input Arguments chatroomInfo info
Return Type CollectionVisibility Public
Exceptions System exceptionLogical exception
Implementation Validate the info object passed:If it is null, throw logical exception with message key invalid inputexception.If one of the required fields is null, throw logical exception with message key
required fields input exception.
Get a connection to the database. Assemble the objects that matches thequery. Add each record and return them in a list.
If a SQLException or a general Exception occurs, rollback connection andthrow system exception. Finally close database access connections.