• No results found

Software Design Specification

N/A
N/A
Protected

Academic year: 2021

Share "Software Design Specification"

Copied!
21
0
0

Loading.... (view fulltext now)

Full text

(1)

Software Design Specification

Version 1.0.0

Project Title

: Alahamora p2p Network and Tool

Team Title

: Alahamora Team

Guide (KreSIT) and College : Faizan Ahmed, Integral University, Lucknow

Group Members

:

•Hashir Tufail

•Mohammed Faisal

•Sachin Kumar Verma

•Shariq Aziz

16

1. Introduction

1.1 Purpose of this document

This SDS describes the various functions of our project, the Alahamora p2p Network Tool version 1.0.0. The actual design of the various modules and components of Alahamora p2p Network Tool is described in this document which takes care of various functionalities that our project aims to achieve.

1.2 Scope of the development project

The Alahamora p2p Tool is peer to peer network developed on and for the Linux environment. A peer to peer network is a powerful tool which allows like minded individuals to interact with each other and share their resources. They thus help in bridging the geographical boundaries separating these users and create a truly global village. The developers of the Alahamora p2p tool feel that it is high time that a peer to peer network is developed which is dedicated to the Linux environment, instead of giving half hearted support. We hope that this tool will provide to its users the benefits of peer to peer networks and facilitate in bringing together the Global Open Source community in general and the Indian Open Source Community in particular.

(2)

As can be seen from the diagram above, the tool has a two level Server hierarchy followed by a two level client hierarchy. Another key feature of the software is that it provides efficient searching of files based upon the file name and the file type. This feature helps the user in finding the required file, without having to go through enormous amount of unwanted results given by other p2p tools. As is the case with most peer to peer networks, we have no way of monitoring what the users share over the internet. We hope that the users act in a responsible manner and share software and files while in the legal framework.

1.3 Definitions, acronyms, and abbreviations

Alahamora : Refers to the Alahamora p2p Network Tool

p2p : Peer to Peer

Mother Server : Refers to the main Server of Alahamora

Child/Sub Server : Refers to the various File Servers of Alahamora Super Client : Refers to the Super Clients of Alahamora

1.4 References

COMPLETE REFERENCE : JAVA JAVA by Dietel and Dietel

PROFESSIONAL JAVA SERVER PROGRAMMING by Subrahmanyam et al. COMPLETE REFERENCE : LINUX

(3)

CORE JAVA2 Volume 1 and 2 by Sun Microsystems Press PRACTICAL LINUX PROGRAMMING by Ashfaq A Khan JAVA NETWORK PROGRAMMING by Merlin Hughes et al PHP manual

A Programmer’s Introduction to PHP 4.0 by W. J. Gilmore

www.php.net www.mysql.com www.sourceforge.net www.sarovar.org www.codeguru.com www.in.redhat.com www.bittorrent.com www.wikipedia.com

1.5 Overview of document

• The first section describes the introduction of document.

• The second section describes the system architecture; in this section we mention the modules of this project and their structures.

• The third section consists of detailed description of the modules described in the previous section modules.

• The fourth section states how our project can be reused and its relationship to other products.

• The fifth section gives the complete idea about design decision and tradeoffs which we had to do in order to simplify the design.

(4)

2. System architecture description

This section is the main focus in the first version of the SDS, the high level design. This should give a good view of exact organization of the system as per the requirements.

2.1 Overview of modules / components

Alahamora has been divided into two main components, p2p file sharing and blogging. The modules of each component are as follows:-

• Common module

 Login • For p2p file Sharing

 Indexing of files of connected nodes based on type and subsequent searching.

 Downloading of the required files by the user.  Chatting among connected users.

• For blogging.

 Posting of blogs and code snippets on our website and subsequent viewing and commenting.

2.2 Structure and relationships

The dependencies of various modules are as follows.

1. All other modules depend on the type of login to decide the level of facilities that are to be made available to the user. There are 2 modes of login

a. Registered users are those who register with us. This allows them to avail better facilities like better search, faster and preferential treatment during download, and the permission to post their blogs and code snippets on our website and write comments on existing posts. Also, only the registered users can chat using our chat engine. A new user is given the option to register with us to avail these facilities.

b. Unregistered or anonymous users can use our product but they can only search for files and download them from our network. They can not use our chat client, and can only view the blogs and code snippets posted on our website.

(5)

2. The Search module depends on the Indexing component.

(6)

So, the overall dependency diagram is as below

Login

Searching Blog Chat Download

Dep ends on Dep en ds o n D epend s on Dep ends on Indexing D epe nds on Depends on

2.3 User Interface issues

The GUI can be divided into 2 parts. One is for the user, and the other is for the Administrator of the various Servers. The user side interface will be optimized to provide the user with an easy to use interface.

(7)

3. Detailed description of components

3.1 Login Description

• Identification : Login

• Type : Module

• Purpose :

The purpose of this module is to provide entry to the software and/or website. Based on the type of login, the user is provided with various facilities and functionalities. • Function :

The main function of this module is to allow the user to use Alahamora. This module provides two types of login —Registered and Anonymous.

• Subordinates :

There are two types of login possible in Alahamora—Registered user login and Anonymous login. A Registered user will get benefits like better search, faster and preferential treatment during download, and the permission to post their blogs and code snippets on our website and write comments on existing posts. Also, only the registered users can chat using our chat engine. A new user is given the option to register with us to avail these facilities.

On the other hand, an anonymous will not be able to avail these facilities. He will not be able to post code snippets or comments, nor will he be able to use our chat client. • Dependencies :

First user connects to the mother server which in turn connects him to the child server and super peer respectively. Child server will give a token to client. This will contain the super peer id. The client will connect to super peer and upload the index of files. After this has been done the client will inform the child server and the mother server that it is now connected to the Alahamora network

(8)
(9)

For an existing, registered user the login is:-

(10)

• Interfaces :

The interface of the new user registration is as below

For the software, the login screen would look like:-

• Resources :

To connect to the Alahamora network, the client needs an internet connection. Also, Alahamora needs one mother server and 5 child servers to carry out its tasks. MySQL database engine is also required to store the registered user database.

• Processing :

When a user requests for login from the mother server, there are three scenarios that arise.

(11)

1. If the user requests for an anonymous login, he is directly connected to the Child server that is free at the moment.

2. If a new user wishes to register, he is taken to the new user registration page. 3. If an existing user requests login, his username and password are checked from

the database by the mother server. If all entries are correct, he is granted access or else an appropriate error message is displayed.

• Data :

Data on the mother server will be represented by runtime structures. On the servers, user data will be maintained in MySQL Database with relevant Fields

The Packet format will be "login :< connection detail>"

3.2 Searching Description

• Identification : Searching

• Type : Module

• Purpose :

The purpose of this module is to help the user search for the required files on all computers connected to the network.

• Function :

The main function of this module is to allow the user to search Alahamora user file database and find out the required file or resource.

Algorithm

The user file database will be maintained at the super client network. The super clients will be connected in the form of an m-ary tree. While searching, we will use tree traversal in such a way so as to balance the requests handled by each super client. • Subordinates :

When the user connects to Alahamora, a list of his files is sent to the Super Client to which he is connected. The Super Clients contain a list of all files shared by all users under it. When this super client receives a search request, he scans this database for

(12)

• Dependencies :

Searching results depend upon the indexing of files that have been shared by the clients. Better this index, faster is the search.

The simple search can be shown as:-

(13)

• Interfaces :

The interface skeleton for searching is shown below:-

• Resources :

To connect to the Alahamora network, the client needs an internet connection and the Alahamora Client tool installed on his system. Also, Alahamora needs one mother server and 5 child servers to carry out its tasks.

• Processing :

The search query will be passed to the child server. Here two conditions may occur, either the file will be present in the server cache--in this case the child server will itself reply to the client. Otherwise the query will be routed to the overlay network where it will be allowed to exist for x number of hops in the m-ary network of super clients.

(14)

3.3 Downloading Description

• Identification : Download

• Type : Module

• Purpose :

The purpose of this module is to allow the user to download files which have been searched for in the Alahamora network based upon his queries.

• Function :

The main function of this module is to allow the user to download files requested by him.

• Subordinates :

Once the results of the search request are sent to the user, he can select the file he wants to download. Once this selection has been made, the user is connected to the node containing the file and the download commences.

If, incase, the node containing the file is already busy the download request is put in the waiting queue, and it resumes as soon as the node is freed up.

• Dependencies :

After the search operation, the user gets the results of file list matching his queries. From amongst these results, the user selects the file/s he wishes to download. He is then connected directly to the client having this file, and download commences. If the client containing the file is busy, the download request is put in a wait list. As soon as the client is freed up, the request is resumed. The resumption of queries are handled on First Come First Serve basis.

(15)
(16)

• Interfaces :

The interface of Search and download module is similar. When the client clicks on one of the results, download starts.

• Resources :

To download from to the Alahamora network, the client needs an internet connection, preferably a high speed internet connection.

• Processing :

Searching module will provide the IP as well as file name to be downloaded as input to this module. A permanent TCP connection to the client will be negotiated, and the number of concurrent download threads will depend on the type of client.

• Data :

We will maintain temporary files at the client end which will be joined after the completion of operation.

(17)

3.4 Chat Description

• Identification : Chat

• Type : Module

• Purpose :

The purpose of this module is to allow the connected users to contact each other while using our tool. This would enable them to find resources easily, and increase interaction among different users.

• Function :

The main function of this module is to allow the users using Alahamora to interact with each other using a chat client.

• Subordinates :

When a client requests for permission to join chat, the request is sent to the Mother Server. If the user has logged in using registered user option, the request is transferred to the Chat Server, which adds the client in the main chat window. Now the user can send messages to all other users in the chat room.

On the other hand, if the user has logged in anonymously, he can not enter the chat room.

• Dependencies :

Any user who has logged in using registered login mode is allowed to use the chat client. The chat client will have a single chat room for the users to use, and there will be no facility of Private chat.

(18)

The detailed chat process is as follows:-

• Interfaces :

The interface of the chat room would be similar to that of Indiatimes chat, with a single room and no personal messages.

• Resources :

To connect to the Alahamora chat client, the client needs an internet connection. MySQL database engine is also required to store the registered user database.

• Processing :

When a client sends request for permission to join chat, the request is sent to the Mother Server for authentication. If it is a registered user, the request is transferred to the Chat Server, which adds the client in the main chat window. Now the user can send messages to all other users in the chat room.

On the other hand, if the user has logged in anonymously, the mother server negates his request and the client is requested to login using Registered User Login option.

(19)

• Data :

User sends request to mother server, which checks login type.

If a registered user, request transferred to Chat Server, which connects user. Else, error message displayed.

3.5 Blog Description

• Identification : Blog

• Type : Module

• Purpose :

The purpose of this module is to provide allow the users to post their code snippets and blogs, search for codes, and post comments on existing blogs and codes.

• Function :

The main function of this module is to allow the user to use Alahamora Blog website. This module provides three functions — Post Code and Blog, Search and view Code, and post comments.

• Subordinates :

Only registered users are allowed to post code snippets and blogs on the website. Unregistered users can only search and view existing postings, they can not post themselves.

• Dependencies :

When a user enters the Alahamora blog site, he is given the option to login. If he does so, he can now post his own blogs, code snippets, or comment on existing posts. If he does not do so, he can only view the code snippets.

The existing blogs and codes will be constantly be monitored for comments. If the administrators feel that the code snippet is not of much use to the Alahamora community, they can remove the post.

(20)

The simplified blog posting structure is as follows:-

The detailed posting structure is as below:-

• Interfaces :

The interface of the website will be similar to popular sites like codeguru.com. • Resources :

To connect to the Alahamora website, the client needs an internet connection. Also, Alahamora needs one mother server to carry out this task. MySQL database engine is also required to store the registered user database and various posts.

(21)

• Processing :

If user has logged in anonymous mode, allow him to only view posts. Else, allow user full functionality.

• Data :

Data on the mother server will be represented by runtime structures and will be maintained on MySQL database with relevant Fields

4. Reuse and relationships to other products

Alahamora has a very high scope of reuse. The p2p network tool can be incorporated into any existing network to enable easy and efficient search of files on different nodes in the network. The chat module can be developed as a standalone system, and more features can be added up to give it the look and feel of better chat engines like Yahoo Messenger and Rediff Bol. Also, featured rooms can be added to it to increase the interaction among like minded people.

The blog site can be further developed to increase its user friendliness, and a more general nature can be given to it. It can be used as a separate system, or as a part of any existing intranet to increase the interaction among the users of that intranet.

5. Design decisions and tradeoffs

In the searching module, the search will not be flooded in the entire network, instead it will continue for only a few hops in the m-ary super client network. This tradeoff has been made to ensure that requests do not affect functionality of the Servers and Super clients of Alahamora. In the Alahamora blog site the posts will be constantly monitored, and any post which we feel is not of much help will be deleted. This is because we cannot afford a large storage space for databases.

6. Pseudocode for components

N.A.

7. Appendices (if any)

References

Related documents

This menu option will allow the user to download the logged data from the selected instrument in the instrument drop-down list -. Clicking on this button will display the

Simple Client-Server CLIENT socket() connect() send() recv() close() Connection establishment Data response Data request End-of-file notification SERVER socket() bind()

If a user application established connection with a remote host without negotiating a mapping entry from the PCP server first, the PCP client can then send the PCP PEER request to

To covertly send messages using BitTorrent trackers, a client could hide information in the peer id field during an announce request.. To receive the message,

The user shall be provided with the functionality to start a survey on a particular piece of topic and request for survey for any subset of users belonging to the same group or

User selects the option of viewing a particular security (selects a portfolio from the left pane, refer user screens in Appendix C). System displays all

If the client is registered to send his messages using the FTP protocol, an email message with his FTP account information will be sent to the registered email address.. This

Use Oracle Beehive Communicator to chat with other Oracle Beehive users directly from your Windows Mobile device, as well as send e-mail, text messages, call a user, view