"Remote Network Controller": Pooja Agrawal
"Remote Network Controller": Pooja Agrawal
"Remote Network Controller": Pooja Agrawal
Year-2011-2012
Department of Computer science CERTIFICATE This is to certify that the project report entitled Remote Network Controller being submitted by Mr. /Mrs Pooja Shrikant Agrawal in partial fulfillment for the award of the Degree of Bachelor of Technology in CS to the North Maharashtra University, Jalgaon is a record of bonafied work carried out by him under my guidance and supervision. The results embodied in this project report have not been submitted to any other University or Institute for the award of any Degree or Diploma.
Principal
(Dr. Prabhakar Bhat)
ACKNOWLEDGEMENT
Mini Project report submitted in partial fulfillment of the requirement for the award of the Degree of Batch in Computer science of North Maharashtra University, Jalgaon By Pooja Agrawal Roll No.02 during the academic year 2011-2012
Department of Computer Science G.H.RAISONI INSTITUTE OF ENGINEERING & MANAGEMENT, JALGAON (M.S.) NORTH MAHARASHTRA UNIVERSITY JALGAON
CHAPTER 1. INTRODUCTION
Communication over Internet or Intranet has become a feature of everyday life in the 21st Century. It is in has evolved into a new medium of communication and developing itself into a register with identifiable elements and relatively stable characteristics. This project is to create network control application with a server and clients to enable the clients to restart, shutdown & Logoff with many other clients. This project is to simulate the multicast controller. In the case of multicasting when a message is sent, only a single message is sent to the server. Which means that the client will send the message only once and based on the location of the clients, the router will either pass the message to another router or if the clients are in the same local network the router will send a copy of the message to each client in that network. So this way we are reducing the number of messages being passed in the whole network. In this project the client will send a message to the server (which acts as a router), and then the server will send this message to each of the users connected to server. In this project there will be only 1 server. So instead of the client sending a copy of the message to each of the users of that group, it will be forwarded to the server, which will then take care of propagating the message to other clients. The project has been developed in java. The client should first authenticate itself as a valid user to the server. Once the server validates the user, server will add it as a member so that this new client can send and receive messages from server. As per server instruction client will be logoff or restart. On mobile will be connected to the PC. On this PC server program will be running with this program client is connected to the server. Admin will be sending one message to connected PC handset. This handset is read the message as logoff , restart or shutdown. As per this message server will be sending the instruction to the client. This is the basic idea of how the message is forwarded.
Client1 Msg1
Mobile ADMIN
Server
Msg1
Client2
Msg1 Client3
The basic interaction between the client and the server would be:
Server
Users List
Connection Managemen t
ADMIN
Message Transmission
The aim of this project will be to create an application that will try to work as a multicast server. Since there is only 1 server being used here, so the actual effect of multicasting will not be directly seen. But the main aim here is to reduce the traffic in
the network by having a server which will actually propagate the messages in the network instead of the client trying to send the message to each of the user on its own.
People and businesses are increasingly relying on networked computer systems to support distributed applications. These distributed applications might interact with computers on the same local area network (LAN), within a corporate intranet, within extranets linking up partners and suppliers, or anywhere on the worldwide Internet. To improve functionality and ease-of-use and to enable costeffective administration of distributed applications, information about the services, resources, users, and other objects accessible from the applications needs to be organized in a clear and consistent manner. Much of this information can be shared among many applications, but, it must also be protected in order to prevent unauthorized modification or the disclosure of private information. As the number of different networks and applications has grown, the number of specialized directories of information has also grown resulting in islands of information that are difficult to share and manage.
Creation of rooms is not possible the individual user. Group Communication is not achieved. The Server cannot Kick Out the user which is unwanted.
3.2.2 Technical feasibility Does the necessary technology exist to do what is been suggested Does the proposed equipment have the technical capacity for using the new
system?
Are there technical guarantees of accuracy, reliability and data security? The project is developed on Pentium IV with 256 MB RAM. The environment required in the development of system is any windows
platform The observer pattern along with factory pattern will update the results
eventually 3.2.3 Financial and Economical Feasibility: The system developed and installed will be good benefit to the organization. The system will be developed and operated in the existing hardware and software infrastructure. So there is no need of additional hardware and software for the system.
4.1.1 Server Module: This module initializes the server and listens for the clients. Multiple clients interact with each other through the server. An administrator is started who acts as a moderator and monitors all the client processes. The following sub modules are also part of the Server Module. 4.1.1.1 User Management: It enables the administrator (server module) to register new clients, delete the existing users if necessary. 4.1.1.2 Connection Management: An administrator has to be provided with the privilege of disconnecting the client/clients if necessary. In certain situations administrator has to disconnect all the clients at once. 4.1.2 Client Module: This will provide an interface for online data sharing between multiple clients. The clients logon to the server and start broadcasting of messages to the other clients logged in. This interface facilitates the clients to broadcast the message
(transmitted to all the clients logged in simultaneously), which can be text or initiate a private transmission channel with a specific client. All the clients involved can edit the data broadcasted online. The client module involves the following sub module. 4.1.2.1 Connection Management: To establish a connection with the server by providing valid user id . 4.1.2.2 Chat Room Management:
The client should be able to enter into the chart room already available or he should be able to create a chat room of his choice. Once a client creates a chat room he becomes the moderator for that chart room. He can invite other clients to enter his chart room; restrict client from enter into his chart room; or disconnect a client from his chart room, etc. 4.1.2.3 Data Transmission Management: Enable broadcasting of data or message in. All the clients sharing a chat room should view data online. The client will also be enabled to send instant personal messages to the specific clients. 4.2 SDLC METHDOLOGIES This document play a vital role in the development of life cycle (SDLC) as it describes the complete requirement of the system. It means for use by developers and will be the basic during testing phase. Any changes made to the requirements in the future will have to go through formal change approval process. SPIRAL MODEL was defined by Barry Boehm in his 1988 article, A spiral Model of Software Development and Enhancement. This model was not the first model to discuss iterative development, but it was the first model to explain why the iteration models. As originally envisioned, the iterations were typically 6 months to 2 years long. Each phase starts with a design goal and ends with a client reviewing the progress thus far. Analysis and engineering efforts are applied at each phase of the project, with an eye toward the end goal of the project. The steps for Spiral Model can be generalized as follows: The new system requirements are defined in as much details as possible. This usually involves interviewing a number of users representing all the external or internal users and other aspects of the existing system.
A preliminary design is created for the new system. A first prototype of the new system is constructed from the preliminary design. This is usually a scaled-down system, and represents an approximation of the characteristics of the final product. A second prototype is evolved by a fourfold procedure: 1. Evaluating the first prototype in terms of its strengths, weakness, and risks. 2. Defining the requirements of the second prototype. 3. Planning an designing the second prototype. 4. Constructing and testing the second prototype. At the customer option, the entire project can be aborted if the risk is deemed too great. Risk factors might involved development cost overruns, operating-cost miscalculation, or any other factor that could, in the customers judgment, result in a less-than-satisfactory final product. The existing prototype is evaluated in the same manner as was the previous prototype, and if necessary, another prototype is developed from it according to the fourfold procedure outlined above. The preceding steps are iterated until the customer is satisfied that the refined prototype represents the final product desired. The final system is constructed, based on the refined prototype. The final system is thoroughly evaluated and tested. Routine maintenance is carried on a continuing basis to prevent large scale failures and to minimize down time. The following diagram shows how a spiral model acts like:
components are developed. The transformation of data from input to output, through processes, may be described logically and independently of the physical components associated with the system. The DFD is also know as a data flow graph or a bubble chart. The Basic Notation used to create a DFDs are as follows: 1. Dataflow: Data move in a specific direction from an origin to a destination.
2. Process: People, procedures, or devices that use or produce (Transform) Data. The physical component is not identified.
3. Source: External sources or destination of data, which may be People, programs, organizations or other entities.
4. Data Store: Here data are stored or referenced by a process in the System.
Client
Send
SendMessage
Server
Level-2 Diagram
Client1
Client2
Server
Send
SendMessage
Client3
Client4
StartClient
Connect To Server
Connected to server
Send a Message
Receive a Message
Admin:
Start Server
Start Client
Send Message
Receive Message
Se nd M e ss a ge
Clie nt 1
Clie nt 2
Client ...n
gives the programmer, full control. Finally, Java is to Internet programming where C was to system programming. 6.1.2 Swings: Swing, which is an extension library to the AWT, includes new and improved components that enhance the look and functionality of GUIs. Swing can be used to build Standalone swing GUI Apps as well as Servlets and Applets. It employs model/view design architecture. Swing is more portable and more flexible than AWT. Swing is built on top of AWT and is entirely written in Java, using AWTs lightweight component support. In particular, unlike AWT, t he architecture of Swing components makes it easy to customize both their appearance and behavior. Components from AWT and Swing can be mixed, allowing you to add Swing support to existing AWT-based programs. For example, swing components such as JSlider, JButton and JCheckbox could be used in the same program with standard AWT labels,
textfields and scrollbars. You could subclass the existing Swing UI, model, or change listener classes without having to reinvent the entire implementation. Swing also has the ability to replace these objects on-the-fly.
100% Java implementation of components Pluggable Look & Feel Lightweight components Uses MVC Architecture Model represents the data View as a visual representation of the data Controller takes input and translates it to changes in data
In Swing, classes that represent GUI components have names beginning with the letter J. Some examples are JButton, JLabel, and JSlider. Altogether there are more than 250 new classes and 75 interfaces in Swing twice as many as in AWT. 6.1.3 Java Swing class hierarchy The class JComponent, descended directly from Container, is the root class for most of Swings user interface components.
Swing contains components that youll use to build a GUI. I am listing you some of the commonly used Swing components. To learn and understand these swing programs, AWT Programming knowledge is not required. 6.1.4 Applications and Applets An application is a program that runs on our Computer under the operating system of that computer. It is more or less like one creating using C or C++. Javas ability to create Applets makes it important. An Applet is an application designed, to be transmitted over the Internet and executed by a Java compatible web browser. An applet is actually a tiny Java program, dynamically downloaded across the network, just like an image. But the difference is, it is an intelligent program, not just a media file. It can react to the user input and dynamically change.
6.2 FEATURES OF JAVA: 6.2.1 Security Every time you that you download a normal program, you are risking a viral infection. Prior to Java, most users did not download executable programs frequently, and those who did scanned them for viruses prior to execution. Most users still worried about the possibility of infecting their systems with a virus. In addition, another type of malicious program exists that must be guarded against. This type of program can gather private information, such as credit card numbers, bank account balances, and passwords. Java answers both of these concerns by providing a firewall between a networked application and your computer. When you use a Java-compatible Web browser, you can safely download Java applets without fear of virus infection or malicious intent. 6.2.2 Portability For programs to be dynamically downloaded to all the various types of platforms connected to the Internet, some means of generating portable executable code is needed .As you will see, the same mechanism that helps ensure security also helps create portability. Indeed, Javas solution to these two problems is both elegant and efficient. 6.2.3 The Byte code The key that allows the Java to solve the security and portability problem is that the output of Java compiler is Byte code. Byte code is a highly optimized set of instructions designed to execute by the Java run-time system, which is called the Java
Virtual Machine (JVM). That is, in its standard form, the JVM is an interpreter for byte code. Translating a Java program into byte code helps makes it much easier to run a program in a wide variety of environments. The reason is, Once the run-time package exists for a given system, any Java program can run on it. Although Java was designed for interpretation, there is technically nothing about Java that prevents on-the-fly compilation of byte code into native code. Sun has just completed its Just In Time (JIT) compiler for byte code. When the JIT compiler is a part of JVM, it compiles byte code into executable code in real time, on a piece-bypiece, demand basis. It is not possible to compile an entire Java program into executable code all at once, because Java performs various run-time checks that can be done only at run time. The JIT compiles code, as it is needed, during execution. 6.2.4 Java Virtual Machine (JVM) Beyond the language, there is the Java virtual machine. The Java virtual machine is an important element of the Java technology. The virtual machine can be embedded within a web browser or an operating system. Once a piece of Java code is loaded onto a machine, it is verified. As part of the loading process, a class loader is invoked and does byte code verification makes sure that the code thats has been generated by the compiler will not corrupt the machine that its loaded on. Byte code verification takes place at the end of the compilation process to make sure that is all accurate and correct. So byte code verification is integral to the compiling and executing of Java code.
Java Virtual
Machin
The above picture shows the development process a typical Java programming uses to produce byte codes and executes them. The first box indicates that the Java source code is located in a. Java file that is processed with a Java compiler called JAVA. The Java compiler produces a file called a. class file, which contains the byte code. The class file is then loaded across the network or loaded locally on your machine into the execution environment is the Java virtual machine, which interprets and executes the byte code. 6.3 Java Architecture Java architecture provides a portable, robust, high performing environment for development. Java provides portability by compiling the byte codes for the Java Virtual Machine, which is then interpreted on each platform by the run-time environment. Java is a dynamic system, able to load code when needed from a machine in the same room or across the planet. 6.3.1 Compilation of Code When you compile the code, the Java compiler creates machine code (called byte code) for a hypothetical machine called Java Virtual Machine (JVM). The JVM is supposed to execute the byte code. The JVM is created for overcoming the issue of portability. The code is written and compiled for one machine and interpreted on all machines. This machine is called Java Virtual Machine.
6.3.2 SIMPLE Java was designed to be easy for the Professional programmer to learn and to use effectively. If you are an experienced C++ programmer, learning Java will be even easier. Because Java inherits the C/C++ syntax and many of the object oriented features of C++. Most of the confusing concepts from C++ are either left out of Java or implemented in a cleaner, more approachable manner. In Java there are a small number of clearly defined ways to accomplish a given task. 6.3.3 Object-Oriented Java was not designed to be source-code compatible with any other language. This allowed the Java team the freedom to design with a blank slate. One outcome of this was a clean usable, pragmatic approach to objects. The object model in Java is simple and easy to extend, while simple types, such as integers, are kept as high-performance non-objects. 6.4 Robust The multi-platform environment of the Web places extraordinary demands on a program, because the program must execute reliably in a variety of systems. The ability to create robust programs was given a high priority in the design of Java. Java is strictly typed language; it checks your code at compile time and run time. Java virtually eliminates the problems of memory management and de-allocation, which is completely automatic. In a well-written Java program, all run time errors can and should be managed by your program.
6.5 Networking Computers running on the Internet communicate to each other using either the Transmission Control Protocol (TCP) or the User Datagram Protocol (UDP), as this diagram illustrates:
When you write Java programs that communicate over the network, you are programming at the application layer. Typically, you don't need to concern yourself with the TCP and UDP layers. Instead, you can use the classes in the java.net package. These classes provide system-independent network communication. However, to decide which Java classes your programs should use, you do need to understand how TCP and UDP differ. 6.5.1 TCP Definition: TCP (Transmission Control Protocol) is a connection-based protocol that provides a reliable flow of data between two computers.
6.5.2 UDP Definition: UDP (User Datagram Protocol) is a protocol that sends independent packets of data, called datagrams, from one computer to another with no guarantees about arrival. UDP is not connection-based like TCP. 6.6 NETWORKING CLASSES IN THE JDK Through the classes in java.net, Java programs can use TCP or UDP to communicate over the Internet. The URL, URL Connection, Socket, and Server Socket classes all use TCP to communicate over the network. The Datagram Packet, Datagram Socket, and Multicast Socket classes are for use with UDP. Sequence of socket calls for connection-oriented protocol: System Calls Socket - create a descriptor for use in network communication. On success, socket system call returns a small integer value similar to a file descriptor Name. Bind - Bind a local IP address and protocol port to a socket When a socket is created it does not have nay notion of endpoint address. An application calls bind to specify the local; endpoint address in a socket. For TCP/IP protocols, the endpoint address uses the socket address in structure. Servers use bind to specify the well-known port at which they will await connections. Connect - connect to remote client After creating a socket, a client calls connect to establish an actual connection to a remote server. An argument to connect allows the client to specify the remote
endpoint, which include the remote machines IP address and protocols port number. Once a connection has been made, a client can transfer data across it. Accept () - accept the next incoming connection Accept creates a new socket for each new connection request and returns the descriptor of the new socket to its caller. The server uses the new socket only for the new connections it uses the original socket to accept additional connection requests once it has accepted connection, the server can transfer data on the new socket. Return Value: This system-call returns up to three values An integer return code that is either an error indication or a new socket description The address of the client process The size of this address Listen - place the socket in passive mode and set the number of incoming TCP connections the system will en-queue. Backlog - specifies how many connections requests can be queued by the system while it wants for the server to execute the accept system call it us usually executed after both the socket and bind system calls, and immediately before the accept system call. Send, send to, recv and recvfrom system calls These system calls are similar to the standard read and write system calls, but additional arguments are requested.
CHAPTER 7. TESTING
7.1 Testing Concepts
Levels of Testing Unit Testing. Module Testing. Integration Testing. System Testing. User Acceptance Testing. Types Of Testing Smoke Testing. Sanitary Testing. Regression Testing. Re-Testing. Static Testing. Dynamic Testing. Alpha-Testing. Beta-Testing. Monkey Testing. Compatibility Testing. Installation Testing. Adhoc Testing.
Test Execution. Result Analysis. Bug-Tracing. Reporting. Microsoft Windows Standards Manual Testing Automation Testing (Tools) Win Runner. Test Director.
7.3 Testing:
The process of executing a system with the intent of finding an error. Testing is defined as the process in which defects are identified, isolated, subjected for rectification and ensured that product is defect free in order to produce the quality product and hence customer satisfaction. Quality is defined as justification of the requirements Defect is nothing but deviation from the requirements Defect is nothing but bug. Testing --- The presence of bugs Testing can demonstrate the presence of bugs, but not their absence Debugging and Testing are not the same thing! Testing is a systematic attempt to break a program or the AUT Debugging is the art or method of uncovering why the script /program did not execute properly.
Black box Testing: is the testing process in which tester can perform testing on an application without having any internal structural knowledge of application.
White box Testing: is the testing process in which tester can perform testing on an application with having internal structural knowledge. Usually The Developers are involved in white box testing.
Gray Box Testing: is the process in which the combination of black box and white box tonics are used.
7.2.3 Result Analysis: 1. Expected value: is nothing but expected behavior of application. 2. Actual value: is nothing but actual behavior of application
7.2.4 Bug Tracing: Collect all the failed cases, prepare documents.
7.5 Test Case Document Contains This is the sample test case document for the Case Investigate details of Client project: 7.5.1 Test scope: Test coverage is provided for the screen Login check form of a Administration module of Forensic Manager application. Areas of the application to be tested 7.5.2 Test Scenario: When the office personals use this screen for the data entry, adding sections, courts, grades and Case Registration information on s basis and quit the form. 7.5.3 Test Procedure: The procedure for testing this screen is planned in such a way that the data entry, status calculation functionality, saving and quitting operations are tested in terms of GUI testing, Positive testing, Negative testing using the corresponding GUI test cases, Positive test cases, Negative test cases respectively
T.C.No
Description
Exp
Act
Result
1.GUI Test Cases: Total no of features that need to be check Look & Feel Look for Default values if at all any (date & Time, if at all any require) Look for spell check 2.Positive Test Cases: The positive flow of the functionality must be considered Valid inputs must be used for testing Must have the positive perception to verify whether the requirements are justified.
BIBILOGRAGHY
REFERENCES (1) Java Complete Reference By Herbert Shield (2) Database Programming with JDBC and Java By George Reese (3) Java and XML By Brett McLaughlin (4) Wikipedia, URL: http://www.wikipedia.org. (5) Answers.com, Online Dictionary, Encyclopedia and much more, URL: http://www.answers.com (6) Google, URL: http://www.google.co.in (7)Project Management URL: http://www.startwright.com/project.htm (8) http://it.toolbLox.com/wiki/index.php/Warehouse_Management