Edited Data
Edited Data
1. ABSTRACT
1
A fundamental issue arising in mobile adhoc networks (MANETs) is the selection of the optimal path between any two nodes. A method that has been advocated to improve routing efficiency is to select the most stable path so as to reduce the latency and the overhead due to route reconstruction. In this work, i study both the availability and the duration probability of a routing path that is subject to link failures caused by node mobility. In particular, i focus on the case where the network nodes move according to the Random Direction model, and i derive both exact and approximate (but simple) expressions of these probabilities. Through my results, i study the problem of selecting an optimal route in terms of path availability. Finally, i propose an approach to improve the efficiency of reactive routing protocols.
The selection and maintenance of a multi-hop path, however, is a fundamental problem in MANETs. Node mobility, signal interference, and power outages make the network topology frequently change; as a consequence, the links along a path may fail and an alternate path must be found. Connectivity and topology characteristics of a MANET are determined by the link statics. So network implementation makes complexity. In static route establish minimum throughput. It causes the occurrence of high traffic latency.
3.INTRODUCTION
Mobile ad hoc networks (MANETs) enable users to maintain connectivity to the fixed network or exchange information when no infrastructure, such as a base station or an access
3
point, is available. This is achieved through multihop communications, which allow a node to reach far away destinations by using intermediate nodes as relays. In this time, multi-hop routing is used for sending data from source to destination. In multihop routing, a packet is forwarded from one node to another, until it reaches the destination. Of course, appropriate routing Protocols are necessary to discover routes between the source and the destination, or even to determine the presence or absence of a path to the destination node. Because of the lack of central elements, distributed protocols and algorithms have to be used. The data is passing in MANETs by using in different routing protocols which are may have the both features:
Proactive route is maintained in tables at each node resulting in quick routing, Reactive route is found when we want to send a packet to its destination. All projects are feasible given unlimited resources and infinite time. But the
FEASIBILITY STUDY
development of software is plagued by the scarcity of resources and difficult delivery rates. It is both necessary and prudent to evaluate the feasibility of a project at the earliest possible time. Three key considerations are involved in the feasibility analysis.
Economic Feasibility:
This procedure is to determine the benefits and savings that are expected from a candidate system and compare them with costs. If benefits outweigh costs, then the decision is made to design and implement the system. Otherwise, further justification or alterations in proposed system will have to be made if it is to have a chance of being approved. This is an ongoing effort that improves in accuracy at each phase of the system life cycle.
Technical Feasibility:
Technical feasibility centers on the existing computer system (hardware, software, etc.,) and to what extent it can support the proposed addition. If the budget is a serious constraint, then the project is judged not feasible. Operational Feasibility: People are inherently resistant to change, and computers have been known to facilitate change. It is understandable that the introduction of a candidate system requires special effort to educate, sell, and train the staff on new ways of conducting business.
also by their capability to capture in a simple manner the aggregate behavior of independent users. The problem of link and route stability has been widely addressed in the literature. Routing protocols accounting for route stability while selecting the source-destination path can be found by R. Dube et.al, just to name a few. In particular, the work proposed by W. Su et al, considers nodes moving along nonrandom patterns and exploits some knowledge of the nodes motion to predict the path duration. Studies on link and path availability and duration are presented by D. Yu et.al.D. Turgut et.al a partially deterministic and a Brownian motion, where nodes start moving from the same location, are considered. Note that our analysis for the RD mobility is instead carried out under general initial conditions. This fact makes the analysis more complex but at the same time permits to relate probability of link duration and/or availability at time t to the initial distance between nodes. In P. Samar et.al, nodes move with random direction and at random velocity, but both direction and velocity are kept constant over time so that the link I. Gruber et.al, and the path by S. Cho et.al, duration can be analyzed using geometric observations. A similar approach cannot be exploited under our more general assumptions. Link and path availability under random mobility models that consist of a sequence of mobility epochs, each of them corresponding to a new value of node speed and direction, are studied by A.B. McDonald et.al. There, the central limit theorem is applied with respect to the summation of the Cartesian components of the node movement over all epochs during a given time interval. However, in A.B. McDonald et.al, the mobility model does not include movement pauses and only the avail-ability metric is evaluated. Most studies analyzing path duration make the assump-tion of independent behavior of the links along the path. This assumption is removed by Y.-C. Tseng, et.al, where the joint probability distribution of the path duration is derived, but only for the case of a discrete random walk model. In our work, we discuss the validity of the assumption on link independence under general conditions, and we also derive some results on optimal path selection that hold for various system scenarios. Of particular relevance to our work are the studies of T. Spyropoulos et.al, where the impact of mobility on message latency is analyzed in the case of multi-hop paths. The authors consider a simple linear topology where nodes move along adjacent segments with reflecting boundaries
6
according to uni-dimensional Brownian motion. Transfer of messages between adjacent nodes can take place only when nodes are in contact, i.e., they are within the radio range of each other. By assuming that the message transmission is instantaneous, they evaluate the expected latency of a message transferred from the first to the last node of a sequence. In T. Spyropoulos et.al, a similar problem is addressed. There, the statistics of the encounter time between nodes are derived under Random Waypoint and Random Direction mobility; these statistics are then used to evaluate the delay performance of mobility-assisted routing schemes. In F. Bai et.al, it is shown via simulation that the probability distribution of the path duration is accurately approximated by an exponential distribution when the number of hops along the path is sufficiently large, no matter which mobility model is considered. The parameter of the exponential distribution is empirically obtained from the map layout, node density, and other detailed parameters of the mobility scenario. This observation on the path duration distribution is confirmed by the analytical studies of R.J. La et.al. The work in Y. Han, et.al, exploits Palms calculus by assuming that links along a path are independent and that steady state is reached; in Y. Han, et.al, the assumption on link independence is relaxed and the parameter of the exponential distribution is determined using the expected duration of the links in the path. We highlight that in Y. Han et.al, the dependency on the initial distance between the nodes forming the path is not taken into account. Results have a significant theoretical value, they hold only for paths including a large number of hops. Finally, the work proposed by M. Garetto et.al, that shows that under the RD model, the time evolution of the node position can be described through a system of partial differential equations, and that under mild conditions, a (weak) solution of these equations over a rectangular area can be found. Here, differently from E. Leonardi et.al, we study the dynamics of nodes moving over an infinite bi-dimensional domain, and we obtain a closed expression for the general (weak) solution of the RD equations in the frequency domain (i.e., the moment-generating function). Then, we analyze the availability and duration of links and paths (with paths of any length and given the initial distance between the nodes). We also show how to use these results to optimally select a routing path.
7
Portable oriented Distributed High performance Interpreted Multithreaded Robust Dynamic Secure With most programming languages, you either compile or interpret a program so that you can run it on your computer. The Java programming Language is unusual in that a program is both compiled and interpreted. With the compiler, first you translate a program into an intermediate language called Java byte codes the platformindependent codes interpreted by the interpreter on the Java platform. The interpreter
parses
and
runs
each
Java
byte
code
instruction
on
the
computer.
Figure-1:Compilation of java program We can think of Java bytecode as the machine code instructions for the Java Virtual Machine (Java VM). Every Java interpreter, whether it's a development tool or a Web browser that can run applets, is an implementation of the Java VM. Java bytecode help make "write once, run anywhere" possible. We can compile your program into bytecode on any platform that has a Java compiler. The bytecode can then be run on any implementation of the Java VM. That means that as long as a computer has a Java VM, the same program written in the Java programming language can run on Windows 2000, a Solaris workstation, or an iMac.
The Java Platform A platform is the hardware or software environment in which a program runs. We've already mentioned some of the most popular platforms like Windows 2000, Linux, Solaris, and MacOS. Most platforms can be described as a combination of the operating system and hardware. The Java platform differs from most other platforms in that it's a software-only platform that runs on top of other hardware-based platforms. The Java platform has two components:
The Java Virtual Machine (Java VM) The Java Application Programming Interface (Java API)
A Virtual Machine
Java is both a compiled and an interpreted language. Java source code is turned into simple binary instructions, much like ordinary microprocessor machine code. However, whereas C or C++ source is refined to native instructions for a particular model of processor, Java source is compiled into a universal formatinstructions for a virtual machine.
Compiled Java byte-code, also called J-code, is executed by a Java runtime interpreter. The runtime system performs all the normal activities of a real processor, but it does so in a safe, virtual environment. It executes the stack-based instruction set and manages a storage heap. It creates and manipulates primitive datatypes, and loads and invokes newly referenced blocks of code. Most importantly, it does all this in accordance with a strictly defined open specification that can be implemented by anyone who wants to produce a Java-compliant virtual machine. All of this means that Java code is implicitly portable. The same Java application bytecode can run on any platform that provides a Java runtime environment, as shown in Figure 1.1. You don't have to produce alternative versions of your application for different platforms, and you don't have to distribute source code to end users.
10
Figure-3: The JAVA Runtime environment The fundamental unit of Java code is the class. As in other object-oriented languages, classes are application components that hold executable code and data. Compiled Java classes are distributed in a universal binary format that contains Java byte-code and other class information. Classes can be maintained discretely and stored in files or archives on a local system or on a network server. Classes are located and loaded dynamically at runtime, as they are needed by an application. The Java API is a large collection of ready-made software components that provide many useful capabilities, such as graphical user interface (GUI) widgets. The Java API is grouped into libraries of related classes and interfaces; these libraries are known as packages. The next section, What Can Java Technology Do?, highlights what functionality some of the packages in the Java API provides. The following figure depicts a program that's running on the Java platform. As the figure shows, the Java API and the virtual machine insulate the program from the hardware. Native code is code that after you compile it, the compiled code runs on a specific hardware platform. As a platform-independent environment, the Java platform can be a bit slower than native code. However, smart compilers, well-tuned interpreters, and just-in-time byte code compilers can bring performance close to that of native code without threatening portability.
11
What Can Java Technology Do? The most common types of programs written in the Java programming language are applets and applications. If you've surfed the Web, you're probably already familiar with applets. An applet is a program that adheres to certain conventions that allow it to run within a Java-enabled browser. However, the Java programming language is not just for writing cute, entertaining applets for the Web. The general-purpose, high-level Java programming language is also a powerful software platform. Using the generous API, you can write many types of programs. An application is a standalone program that runs directly on the Java platform. A special kind of application known as a server serves and supports clients on a network. Examples of servers are Web servers, proxy servers, mail servers, and Print servers. Another specialized program is a servlet. A servlet can almost be thought of as an applet that runs on the server side. Java Servlets are a popular choice for building interactive web applications, replacing the use of CGI scripts. Servlets are similar to applets in that they are runtime extensions of applications. Instead of working in browsers, though, servlets run within Java Web servers, configuring or tailoring the server. How does the API support all these kinds of programs? It does so with packages of software components that provides a wide range of functionality. Every full implementation of the Java platform gives you the following features:
The essentials: Objects, strings, threads, numbers, input and output, data Applets: The set of conventions used by applets. Networking: URLs, TCP (Transmission Control Protocol), UDP (User Data Internationalization: Help for writing programs that can be localized for users
gram Protocol) sockets, and IP (Internet Protocol) addresses. worldwide. Programs can automatically adapt to specific locales and be displayed in the appropriate language.
Security: Both low level and high level, including electronic signatures, public Software components: Known as JavaBeans
TM
and private key management, access control, and certificates. , can plug into existing component architectures.
12
Object serialization: Allows lightweight persistence and communication via Java Database Connectivity (JDBCTM): Provides uniform access to a wide The Java platform also has APIs for 2D and 3D graphics, accessibility, servers,
Remote Method Invocation (RMI). range of relational databases. collaboration, telephony, speech, animation, and more. The following figure depicts what is included in the Java 2 SDK.
Figure-4:Platform Standard Edition 5.0 How Will Java Technology Change My Life? We can't promise you fame, fortune, or even a job if you learn the Java programming language. Still, it is likely to make your programs better and requires less effort than other languages. We believe that Java technology will help you do the following:
object-oriented language, it's easy to learn, especially for programmers already familiar with C or C++.
Write less code: Comparisons of program metrics (class counts, method counts,
and so on) suggest that a program written in the Java programming language can be four times smaller than the same program in C++.
13
Write better code: The Java programming language encourages good coding
practices, and its garbage collection helps you avoid memory leaks. Its object orientation, its JavaBeans component architecture, and its wide-ranging, easily extendible API let you reuse other people's tested code and introduce fewer bugs.
twice as fast versus writing the same program in C++. Why? You write fewer lines of code and it is a simpler programming language than C++.
Avoid platform dependencies with 100% Pure Java: You can keep your
TM
program portable by avoiding the use of libraries written in other languages. The 100% Pure Java
manuals, white papers, brochures, and similar materials online. Write once, run anywhere: Because 100% Pure Java programs are compiled Distribute software more easily: You can upgrade applets easily from a central into machine-independent byte codes, they run consistently on any Java platform. server. Applets take advantage of the feature of allowing new classes to be loaded "on the fly," without recompiling the entire program. The java development team which included Patrick Naught on discovered that the existing language like C and C++ had limitations in terms of both reliability and portability. However, the language java on C and C++ but removed a number of features of C and C++ that were considered as sources of problems and thus made java a really simple, reliable, portable and powerful language. Specifically, this overview will include a bit include a bit of the history of java platform, touch of the java programming language, and the ways in which people are using java applications and applets, now and in the likely future. After going a while down the path of consumer electronics devices, they realized that they had something particularly cool in the java language and focused on it as a language for network computing. Features of JAVA: Platform Independent:
14
Changes and upgrades in operating systems, processors and system resources will not force any change in java programs. This is the reason why Java has become a popular language for programming on Internet. Portable: Java ensures portability in two ways. types is machine independent. Object oriented: Java is a true objected oriented language. Almost everything in java is an object. All program code and data must reside within objects and classes. Java comes with an extensive set of classes arranged in packages that we can use in out programs by inheritance. Distributed: Java is designed as a distributed language for creating applications on networks. It has the ability to share both date and programs. Dynamic: Java is a dynamic language. Java is capable of dynamically linking new class, libraries, methods and objects. Secure: Since java supports applets which are programs that are transferred through internet, there may arise a security threat. But java overcomes this problem by confining the applets to the runtime package or JVM and thus it prevents infections and malicious contents. Robust: Java is said to be robust in two ways 1. Java allocates and de-allocates its dynamic memory on its own. 2. Java provides exception. Multithreaded: Java supports multithreaded programs which allow you to write programs that do many things simultaneously. This is used in interactive network programs. Interpreted: The byte code is interpreted by JVM. Even though interpreted, Java provides high performance. The byte code generated by the Java compiler for translating to native machine code with high performance but the Just In Time (JIT) compiler in java.
15
instructions that can be implemented on any machine. Secondly, the size of the primitive data
JAVA Components: Swing: Swing is a set of classes that provides more powerful and flexible components that are possible with AWT and hence we adapted swing. In addition to normal components such as buttons, check box, labels swing includes tabbed panes, scroll panes, trees and tables. J Frame: Like AWTs frame class, the J Frame class can generate events when things happen to the window, such as the window being closed, activated, iconified or opened. These events can be sent to a window Listener if one is registered with the frame. J File Chooser: It provides a simple mechanism for the user to choose a file. Here it points the users default directory. It includes the following methods: Show Dialog: Pops a custom file chooser dialog with a custom approve button. Set Dialog Type: Sets the type of this dialog. Use open-dialog when we want to bring up a file chooser that the user can use to open file. Use save-dialog for letting the user choose a file for saving. Set Dialog Title: Set the given string as the title of the J File Chooser window. J Scroll Pane: Encapsulates a scrollable window. It is a component that represents a rectangle area in which a component may be viewed. It provides horizontal and vertical scrollbar if necessary.
16
Swing J Frame J File Chooser J Scroll Pane Image Media Tracker String Tokenizer Buffered Image Container
Image: The image class and the java.awt.image package, together provide the support for imaging both for the display and manipulation of web design. Media Tracker: Many early java developers found the image observer interface is far too difficult to understand and manage when there were multiple images to be loaded. So the developer community was asked to provide a simpler solution that would allow programmers to load all of their images synchronously. In response to this, Sun Microsystems added a class to AWT called media tracker. A media tracker is an object that will check the status of an arbitrary number of images in parallel. The add Image method of it is used to track the loading status of the image. String Tokenizer: The processing of text often consists of parsing a formatted input string. Parsing is the division of the text in to set of discrete parts or tokens, which in a certain sequence can convey can convey a semantic meaning. The StringTokenizer provides first step in this parsing process, often called the lexer or scanner. StringTokenizer implements the Enumeration interface. Therefore given an input sting, we can enumerate the individual tokens contained in it using String Tokenizer. Buffered Image: In previous versions of Java, it was very difficult to manipulate images on a pixel-bypixel basis. We have to either create an mage filter to modify the pixels as they came through the filter, or we have to make a pixel grabber to grab an image and then create a Memory Image Source to turn the array of pixels in to an image. The buffered Image class provides a quick, convenient shortcut by providing an image whose pixels can be manipulate directly.
17
4.REQUIREMENTS
Specification Principles: Software Requirements Specification plays an important role in creating quality software solutions. Specification is basically a representation process. Requirements are represented in a manner that ultimately leads to successful software implementation.
Hardware Requirements:
# PROCESSOR :
18
Pentium III
# CLOCK SPEED # HARD DISK # RAM # CACHE MEMORY # MONITOR # KEYBOARD # MOUSE
: : : : : : :
5.DESIGN
5.1SYSTEM ARCHITECTURE
Figure-5:System Architecture
5.2MODULE DESCRIPTION
1. Networking module. Client-server computing or networking is a distributed application architecture that partitions tasks or workloads between service providers (servers) and service requesters, called clients. Often clients and servers operate over a computer network on separate hardware. A server machine is a high-performance host that is running one or more server programs which
19
share its resources with clients. A client also shares any of its resources; Clients therefore initiate communication sessions with servers which await (listen to) incoming requests. 2. Random Direction mobility model. The Random Direction model, i.e., each node alternates periods of movement (move phase) to periods during which it pauses (pause phase); at the beginning of each move phase, a node independently selects its new direction and speed of movement. Speed and direction are kept constant for the whole duration of the node move phase; the durations of move and pause phases are, in general, distributed according to independent random variables
3. Link availability module: We can write an exact expression for the probability of link availability at time t, by using the spatial PDF of nodes moving according to the RD model. Two nodes A and B are the spatial distributions of A at time t in the move and pause phases, respectively, the spatial distributions of B at time t in the move and pause phases, respectively. The probability of link availability between the two nodes. First to numerically evaluate the spatial distribution of nodes A and B at time t through a tri-dimensional inverse transform (two spatial dimensions and one temporal dimension), then to numerically compute the integral in over a four-dimensional domain. 4. Multi Hop module: Consider N+1 nodes moving according to an RD motion, then, consider the path of n (bidirectional) links obtained traversing the N +1 node in sequence.4 since nodes movements are assumed to be independent. 5. Optimal path selection module. The parameters of the underlying mobility model of the nodes are given (e.g., obtained through measurements) and that all nodes have a fixed, common radio range R. To introduce the problem of path selection, suppose node A wants to communicate with node B, possibly using intermediate nodes as relays. To maximize the stability of the route in response to node mobility, one can think of two different strategies: 1) a few long hops and 2) many short hops. On the one hand, considering that the entire path fails if just a single link fails and that nodes move independently of each other, it seems better to minimize the number of hops. On the other hand, short links are much more stable than long links
20
Network Updater: In MANETs, all of the nodes are having mobility feature in random directions. In this module, whenever either the new node to join with the family of existing nodes or leaving from the network, the values of respective nodes has to be see upto date manner. These nodes will be update based on an available probability field over the network. Neighbor Node Discovery Whenever the new node joins with the network should update the neighbor node information automatically. This entire thing will be operates in the Link Layer and is responsible for discovery of other nodes on the link, determining the link layer addresses of other nodes, finding available routers, and maintaining reachability information about the paths to other active neighbor nodes Path availability finder Generally in ad hoc networks derives the statistical results of link and path availability properties in ad hoc network. In this project we will find all available paths among source and destination by using this module. This is happening always in randomly. Optimal route finder Whenever the destination receives the request from the source, the optimal route finder can tries to the minimum path among them. In this, the source node receives the route reply message; it obtains an estimate of the overall path availability, which can be used to select the best available route. Data sending Once if the system finds the optimum path from source to destination of available paths, we start the data communication among them. Here to send the data from source to destination we should require the reply signal from the destination as which for the request generated by source.
5.3UML DIAGRAMS
Unified Modeling Language Diagrams The unified modeling language allows the software engineer to express an analysis model using the modeling notation that is governed by a set of syntactic semantic and pragmatic rules. A UML system is represented using five different views that describe the system from distinctly different perspective. Each view is defined by a set of diagram, which is as follows. User Model View This view represents the system from the users perspective.
21
The analysis representation describes a usage scenario from the end-users perspective. Structural model view In this model the data and functionality are arrived from inside the system. This model view models the static structures
Behavioral Model View It represents the dynamic of behavioral as parts of the system, depicting the interactions of collection between various structural elements described in the user model and structural model view. Implementation Model View In this the structural and behavioral as parts of the system are represented as they are to be built. Environmental Model View In this the structural and behavioral aspects of the environment in which the system is to be implemented are represented. UML is specifically constructed through two different domains they are
UML Analysis modeling, this focuses on the user model and structural model views of the system. UML design modeling, which focuses on the behavioral modeling, implementation modeling and environmental model views.Diagrams overview
In UML has 14 types of diagrams divided into two categories. Seven diagram types represent structural information, and the other seven represent general types of behavior, including four that represent different aspects of interactions.
22
Figure-6:Types of Diagrams
UML is a notation that resulted from the unification of Object Modeling Technique and Object Oriented Software Technology .UML has been designed for broad range of application.
5.3.1CLASS DIAGRAM
Identification of analysis classes: A class is a set of objects that share a common structure and common behavior (the same attributes, operations, relationships and semantics). A class is an abstraction of real-world items. There are 4 approaches for identifying classes: 1. Noun phrase approach: 2. Common class pattern approach. 3. Use case Driven Sequence or Collaboration approach. 4. Classes , Responsibilities and collaborators Approach 1. Noun Phrase Approach: The guidelines for identifying the classes: a. Look for nouns and noun phrases in the use cases. b. Some classes are implicit or taken from general knowledge.
23
c. All classes must make sense in the application domain; Avoid computer implementation classes defer them to the design stage. d. Carefully choose and define the class names. After identifying the classes we have to eliminate the following types of classes: a. Redundant classes. b. Adjective classes.. 2. Common class pattern approach: The following are the patterns for finding the candidate classes: a. Concept class. b. Events class. c. Organization class d. Peoples class e. Places class f. Tangible things and devices class. 3. Use case driven approach: We have to draw the sequence diagram or collaboration diagram. If there is need for some classes to represent some functionality then add new classes which perform those functionalities. 4. CRC approach: The process consists of the following steps: a. Identify classes responsibilities ( and identify the classes ) b. Assign the responsibilities c. Identify the collaborators. Super-sub class relationships: Super-sub class hierarchy is a relationship between classes where one class is the parent class of another class (derived class).This is based on inheritance. Guidelines for identifying the super-sub relationship, a generalization are 1. Top-down: Look for noun phrases composed of various adjectives in a class name. Avoid excessive refinement. Specialize only when the sub classes have significant behavior. 2. Bottom-up: Look for classes with similar attributes or methods. Group them by moving the common attributes and methods to an abstract class. You may have to alter the definitions a bit. 3. Reusability: Move the attributes and methods as high as possible in the hierarchy.
24
4. Multiple inheritances: Avoid excessive use of multiple inheritances. One way of getting benefits of multiple inheritances is to inherit from the most appropriate class and add an object of another class as an attribute. 5. Aggregation or a-part-of relationship: It represents the situation where a class consists of several component classes. A class that is composed of other classes doesnt behave like its parts. It behaves very difficultly. The major properties of this relationship are transitivity and anti symmetry. There are three types of aggregation relationships. They are: Assembly: It is constructed from its parts and an assembly-part situation physically exists. Container: A physical whole encompasses but is not constructed from physical parts. Collection member: A conceptual whole encompasses parts that may be physical or conceptual. The container and collection are represented by hollow diamonds but composition is represented by solid diamond.
Receive +Socket +ServerSocket +ObjectInputStream +port +flag +len +Receive() +run() +receive() +checkStatus() +sendCTS() Action +neigh +dis +m in +m ax +m ydis +getSource() +getPort() +sendRTS() +sendData() +setNeighbour()
Figure-7:Class Diagram
25
5.3.2USECASE DIAGRAM
A use case in software engineering and systems engineering is a description of a systems behavior as it responds to a request that originates from outside of that system. In other words, a use case describes "who" can do "what" with the system in question. The use case technique is used to capture a system's behavioral requirements by detailing scenario-driven threads through the functional requirements.Use cases describe the system from the
user's point of view.
Use cases describe the interaction between one or more actors (an actor that is the initiator of the interaction may be referred to as the 'primary actor') and the system itself, represented as a sequence of simple steps. Actors are something or someone which exists outside the system ('black box') under study, and that take part in a sequence of activities in a dialogue with the system to achieve some goal. Actors may be end users, other systems, or hardware devices. Each use case is a complete series of events, described from the point of view of the actor. According to Bittner and Spence, "Use cases, stated simply, allow description of sequences of events that, taken together, lead to a system doing something useful." Each use case describes how the actor will interact with the system to achieve a specific goal. One or more scenarios may be generated from a use case, corresponding to the detail of each possible way of achieving that goal. Use cases typically avoid technical jargon, preferring instead the language of the end user or domain expert. Use cases are often co-authored by systems analysts and end users. The UML use case diagram can be used to graphically represent an overview of the use cases for a given system and a use-case analysis can be used to develop the diagram. Use cases are not normalized by any consortium, unlike the UML use case diagram by OMG. Within systems engineering, use cases are used at a higher level than within software engineering, often representing missions or stakeholder goals. The detailed requirements may then be captured in SysML requirement diagrams or similar mechanisms. Use case focus "Each use case focuses on describing how to achieve a goal or task. For most software projects this means that multiple, perhaps dozens, of use cases are needed to define the scope of the new system. The degree of formality of a particular software project and the stage of the project will influence the level of detail required in each use case."
26
Use cases should not be confused with the features of the system under consideration. A use case may be related to one or more features, and a feature may be related to one or more use cases. A use case defines the interactions between external actors and the system under consideration to accomplish a goal. An actor specifies a role played by a person or thing when interacting with the system. The same person using the system may be represented as different actors because they are playing different roles. For example, "Joe" could be playing the role of a Customer when using an Automated Teller Machine to withdraw cash, or playing the role of a Bank Teller when using the system to restock the cash drawer. Use cases treat the system as a black box, and the interactions with the system, including system responses, are perceived as from outside the system. This is a deliberate policy, because it forces the author to focus on what the system must do, not how it is to be done, and avoids the trap of making assumptions about how the functionality will be accomplished. Use cases may be described at the abstract level (business use case, sometimes called essential use case), or at the system level (system use case). The differences between these is the scope.
A business use case is described in technology-free terminology which treats the business process as a black box and describes the business process that is used by its business actors (people or systems external to the business) to achieve their goals (e.g., manual payment processing, expense report approval, manage corporate real estate). The business use case will describe a process that provides value to the business actor, and it describes what the process does. Business Process Mapping is another method for this level of business description.
A system use case is normally described at the system functionality level (for example, create voucher) and specifies the function or the service that the system provides for the user. A system use case will describe what the actor achieves interacting with the system. For this reason it is recommended that a system use case specification begin with a verb (e.g., create voucher, select payments, exclude payment, cancel voucher). Generally, the actor could be a human user or another system interacting with the system being defined.
Describe what the system shall do for the actor to achieve a particular goal. Include no implementation-specific language. Be at the appropriate level of detail. Not include detail regarding user interfaces and screens. This is done in user-interface design.
Elements of a Use Case Diagram A use case diagram is quite simple in nature and depicts two types of elements: one representing the business roles and the other representing the business processes. Let us take a closer look at use at what elements constitute a use case diagram.
Actors: An actor portrays any entity (or entities) that perform certain roles in a given system. The different roles the actor represents are the actual business roles of users in a given system. An actor in a use case diagram interacts with a use case. For example, for modeling a banking application, a customer entity represents an actor in the application. Similarly, the person who provides service at the counter is also an actor. But it is up to you to consider what actors make an impact on the functionality that you want to model. If an entity does not affect a certain piece of functionality that you are modeling, it makes no sense to represent it as an actor.
Figure-8:Actor
Use case: A use case in a use case diagram is a visual representation of a distinct business functionality in a system. The key term here is "distinct business functionality." To choose a business process as a likely candidate for modeling as a use case, you need to ensure that the business process is discrete in nature. As the first step in identifying use cases, you should list the discrete business functions in your problem statement. Each of these business functions can be classified as a potential use case. Remember that identifying use cases is a discovery rather than a creation. To draw use cases using
ovals. Label with ovals with verbs that represent the system's functions. 28
Figure-9:Use Case
System boundary: A system boundary defines the scope of what a system will be. A system cannot have infinite functionality. So, it follows that use cases also need to have definitive limits defined. A system boundary of a use case diagram defines the limits of the system. The system boundary is shown as a rectangle spanning all the use cases in the system. To draw your system's boundaries using a rectangle that contains use cases. Place actors outside the system's boundaries.
Figure-10:Representing system boundaries Relationships in Use Cases Use cases share different kinds of relationships. A relationship between two use cases is basically a dependency between the two use cases. Defining a relationship between two use cases is the decision of the modeler of the use case diagram. This reuse of an existing use case using different types of relationships reduces the overall effort required in defining use cases in a system. A similar reuse established using relationships, will be apparent in the other UML diagrams as well.
diagram, this relationship between the use cases is named as an include relationship. Literally speaking, in an include relationship; a use case includes the functionality described in the use case as a part of its business process flow. An include relationship is depicted with a directed arrow having a dotted shaft. The tip of the arrowhead points to the parent use case and the child use case is connected at the base of the arrow. The stereotype "<<include>>" identifies the relationship as an include relationship.
Figure-12:Which shows include relationship An example of an include relationship For example, in Figure show in above, you can see that the functionality defined by the "Validate patient records" use case is contained within the "Make appointment" use case. Hence, whenever the "Make appointment" use case executes, the business steps defined in the "Validate patient records" use case are also executed.
Extend: In an extend relationship between two use cases, the child use case adds to the existing functionality and characteristics of the parent use case. An extend relationship is depicted with a directed arrow having a dotted shaft, similar to the include relationship. The tip of the arrowhead points to the parent use case and the child use case is connected at the base of the arrow. The stereotype "<<extend>>" identifies the relationship as an extend relationship, as shown in below Figure.
In the above shows an example of an extend relationship between the "Perform medical tests" (parent) and "Perform Pathological Tests" (child) use cases. The "Perform Pathological Tests" use case enhances the functionality of the "Perform medical tests" use case. Essentially, the "Perform Pathological Tests" use case is a specialized version of the generic "Perform medical tests" use case.
Generalizations: A generalization relationship is also a parent-child relationship between use cases. The child use case in the generalization relationship has the underlying business process meaning, but is an enhancement of the parent use case. In a use case diagram, generalization is shown as a directed arrow with a triangle arrowhead (see in below Figure). The child use case is connected at the base of the arrow. The tip of the arrow is connected to the parent use case.
Figure-14:Generalization An example of a generalization relationship On the face of it, both generalizations and extends appear to be more or less similar. But there is a subtle difference between a generalization relationship and an extend relationship. When you establish a generalization relationship between use cases, this implies that the parent use case can be replaced by the child use case without breaking the business flow. On the other hand, an extend relationship between use cases implies that the child use case enhances the functionality of the parent use case into a specialized functionality. The parent use case in an extend relationship cannot be replaced by the child use case. Let us see if we understand things better with an example. From the diagram of a generalization relationship (refer to the above figure), you can see that "Store patient records (paper file)" (parent) use case is depicted as a generalized version of the "Store patient records (computerized file)" (child) use case. Defining a generalization relationship between the two implies that you can replace any occurrence of the "Store patient records (paper file)" use case in the business flow of your system with the "Store patient records (computerized file)" use case
31
without impacting any business flow. This would mean that in future you might choose to store patient records in a computerized file instead of as paper documents without impacting other business actions. Now, if we had defined this as an extend relationship between the two use cases, this would imply that the "Store patient records (computerized file)" use case is a specialized version of the "Store patient records (paper file)" use case. Hence, you would not be able to seamlessly replace the occurrence of the "Store patient records (paper file)" use case with the "Store patient records (computerized file)" use case.
Create Node
User
Enter Distance
Network Updation
RREQ
5.3.3SEQUENCE DIAGRAM
A sequence diagram is a graphical view of a scenario that shows object interaction in a time-based sequence what happens first, what happens next. Sequence diagrams establish the roles of objects and help provide essential information to determine class responsibilities and interfaces.
32
There are two main differences between sequence and collaboration diagrams: sequence diagrams show time-based object interaction while collaboration diagrams show how objects associate with each other. A sequence diagram has two dimensions: typically, vertical placement represents time and horizontal placement represents different objects. Object: An object has state, behavior, and identity. The structure and behavior of similar objects are defined in their common class. Each object in a diagram indicates some instance of a class. An object that is not named is referred to as a class instance.The object icon is similar to a class icon except that the name is underlined: An object's concurrency is defined by the concurrency of its class. Message: A message is the communication carried between two objects that trigger an event. A message carries information from the source focus of control to the destination focus of control.The synchronization of a message can be modified through the message specification. Synchronization means a message where the sending object pauses to wait for results. Link: A link should exist between two objects, including class utilities, only if there is a relationship between their corresponding classes. The existence of a relationship between two classes symbolizes a path of communication between instances of the classes: one object may send messages to another.
USER 1 : Create()
Node
Probability
Distance
Network
Neighbour
Source
RREQ
Available Paths
Optim Path al
Destination
Data
2 : check()
3 : Enter()
4 : Update()
5 : find nodes()
6 : Select()
7 : Select()
8 : route request from soruce to destination() 9 : checking Probabilitites() 10 : display() 11 : optim path() al
5.3.4COLLABARAION DIAGRAM
33
Collaboration diagrams and sequence diagrams are alternate representations of an interaction. A collaboration diagram is an interaction diagram that shows the order of messages that implement an operation or a transaction. A sequence diagram shows object interaction in a time-based sequence. Collaboration diagrams show objects, their links, and their messages. They can also contain simple class instances and class utility instances. Each collaboration diagram provides a view of the interactions or structural relationships that occur between objects and object-like entities in the current model. These diagrams are used to indicate the semantics of the primary and secondary interactions. They also show the semantics of mechanisms in the logical design of the system Message icons: A message icon represents the communication between objects indicating that an action will follow. The message icon is a horizontal, solid arrow connecting two lifelines together. A message icon can appear in 3 ways: message icon only, message icon with sequence number, and message icon with sequence number and message label. There are two types of numbering schemes. 1. Flat numbered sequence: In this messages are numbered as 1, 2, 3.. 2. Decimal numbered sequence: In this the messages are given numbers as 1.1, 1.2, 1.3It makes clear which operation is calling which other operation. Differences between sequence and Collaboration diagrams are: Sequence diagram is easy to read. Collaboration diagram can be used to indicate how objects are statically connected. There is no numbering in sequence diagram. Sequence diagram shows the links between objects in a time based sequence. Collaboration diagram shows how the objects associate with each other
diagrams and state charts is activity diagrams are activity centric, while state charts are state centric. An activity diagram is typically used for modeling the sequence of activities in a process, whereas a state chart is better suited to model the discrete stages of an objects lifetime. An activity represents the performance of task or duty in a workflow. It may also represent the execution of a statement in a procedure. You can share activities between state machines. However, transitions cannot be shared. An action is described as a "task" that takes place while inside a state or activity. Actions on activities can occur at one of four times:
On entry: The "task" must be performed when the object enters the state or activity. On exit: The "task" must be performed when the object exits the state or activity. Do: The "task" must be performed while in the state or activity and must continue until
An end state represents a final or terminal state on an activity diagram or state chart diagram. A start state (also called an "initial state") explicitly shows the beginning of a workflow on an activity diagram. Swim lanes can represent organizational units or roles within a business model. They are very similar to an object. They are used to determine which unit is responsible for carrying out the specific activity. They show ownership or responsibility. Transitions cross swim lanes Synchronizations enable you to see a simultaneous workflow in an activity diagram Synchronizations visually define forks and joins representing parallel workflow. A fork construct is used to model a single flow of control that divides into two or more
separate, but simultaneous flows. A corresponding join should ideally accompany every fork that appears on an activity diagram. A join consists of two of more flows of control that unite into a single flow of control. All model elements (such as activities and states) that appear between a fork and join must complete before the flow of controls can unite into one.
An object flow on an activity diagram represents the relationship between an activity and the object that creates it (as an output) or uses it (as an input).
35
SOURCE
[Node]
D ESTINATION
Available Paths
Optim Path al
D ata
36
Update Network
Available Paths
Optim Path al
Data
The different high-level reusable parts of a system are represented in a Component diagram. A component is one such constituent part of a system. In addition to representing the high-level parts, the Component diagram also captures the inter-relationships between these parts. So, how are component diagrams different from the previous UML diagrams that we have seen? The primary difference is that Component diagrams represent the implementation perspective of a system. Hence, components in a Component diagram reflect grouping of the different design elements of a system, for example, classes of the system. Let us briefly understand what criteria to apply to model a component. First and foremost, a component should be substitutable as is. Secondly, a component must provide an interface to enable other components to interact and use the services provided by the component. So, why would not a design element like an interface suffice? An interface provides only the service but not the implementation. Implementation is normally provided by a class that implements the interface. In complex systems, the physical implementation of a defined service is provided by a group of classes rather than a single class. A component is an easy way to represent the grouping together of such implementation classes. You can model different types of components based on their use and applicability in a system. Components that you can model in a system can be simple executable components or library components that represent system and application libraries used in a system. You also can have file components that represent the source code files of an application or document files that represent, for example, the user interface files such as HTML or JSP files. Finally, you can use components to represent even the database tables of a system as well! Now that we understand the concepts of a component in a Component diagram, let us see what notations to use to draw a Component diagram. Elements of a Component Diagram A Component diagram consists of the following elements:
Element and its description Component: The objects interacting with each other in the system. Depicted by a rectangle with the name of the object in it, preceded by a colon and underlined.
38
Symbol
Class/Interface/Object: Similar to the notations used in class and object diagrams Relation/Association: Similar to the relation/association used in class diagrams
A node is a physical resource that executes code components. Learn how to resize grouped objects like nodes.
Figure-19:Component Association Association refers to a physical connection between nodes, such as Ethernet. Learn how to connect two nodes.
Figure-20:Association Components and Nodes Place components inside the node that deploys them.
State chart diagrams describe the behavior of an individual object as a number of states and transitions between these states. A state represents a particular set of values for an object. The sequence diagram focuses on the messages exchanged between objects, the state chart diagrams focuses on the transition between states. Statechart Diagram A statechart diagram shows the behavior of classes in response to external stimuli. This diagram models the dynamic flow of control from state to state within a system. Basic Statechart Diagram Symbols and Notations States States represent situations during the life of an object. You can easily illustrate a state in SmartDraw by using a rectangle with rounded corners.
Figure-21:State Transition A solid arrow represents the path between different states of an object. Label the transition with the event that triggered it and the action that results from it. Learn how to draw lines and arrows in SmartDraw.
Figure-22:Transition Initial State A filled circle followed by an arrow represents the object's initial state. Learn how to rotate objects.
An arrow pointing to a filled circle nested inside another circle represents the object's final state.
Figure-24:Final State Synchronization and Splitting of Control A short heavy bar with two transitions entering it represents a synchronization of control. A short heavy bar with two transitions leaving it represents a splitting of control that creates multiple states.
CODING
package com.control; import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.net.ServerSocket; import java.net.Socket; import java.net.UnknownHostException; import java.util.Vector; import com.design.Node; public class Receive extends Thread { private Socket soc; private ServerSocket serSoc; private ObjectInputStream ois; int port; Node node; Action action;
41
boolean flag; int len; public Receive(Node node, int port, Action action) { this.node = node; this.port = port; this.action = action; start(); } public void run() { try { receive(); } catch (Exception e) { } } public void receive() { try { serSoc = new ServerSocket(port); while (true) { soc = serSoc.accept(); ois = new ObjectInputStream(soc.getInputStream()); String str = (String) ois.readObject(); checkStatus(str); } } catch (Exception e) { e.printStackTrace(); } } private void checkStatus(String str) { try { if (str.equals("RTS")) { if (node.chkCTS.isSelected()) { Vector<String> path = (Vector<String>) ois.readObject(); String dest = (String) ois.readObject(); if (node.source.equals(dest)) { path.add(node.source);
42
sendCTS(path); } else { path.add(node.source); node.action.sendRTS(path, dest); } } } else if (str.equals("CTS")) { Vector<String> path = (Vector<String>) ois.readObject(); String fPath = ""; for (int i = 0; i < path.size(); i++) { if (i < path.size() - 1) fPath += path.get(i) + "->"; else fPath += path.get(i); } node.dftQue.addRow(new Object[] { fPath }); if (!flag) { flag = true; node.lblShortestPath.setText(fPath); len=fPath.length(); } else { if(len>fPath.length()) node.lblShortestPath.setText(fPath); } }else if (str.equals("Data")) { String text = (String) ois.readObject(); node.jtaRecData.setText(text); } } catch (Exception e) { e.printStackTrace(); } } private void sendCTS(Vector<String> path) { // TODO Auto-generated method stub try { int nPort = node.action.getPort(path.get(0));
43
Socket socket = new Socket("localhost", nPort); ObjectOutputStream oos = new ObjectOutputStream(socket .getOutputStream()); oos.writeObject("CTS"); oos.writeObject(path); } catch (UnknownHostException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } } }
TESTING
Software Testing is a critical element of software quality assurance and represents the
ultimate review of specification, design and coding, Testing presents an interesting anomaly for the software engineer. Testing Objectives include: 1. Testing is a process of executing a program with the intent of finding an error 2. A good test case is one that has a probability of finding an as yet undiscovered error 3. A successful test is one that uncovers an undiscovered error Testing Principles: All tests should be traceable to end user requirements Tests should be planned long before testing begins Testing should begin on a small scale and progress towards testing in large Exhaustive testing is not possible To be most effective testing should be conducted by a independent third party
TESTING STRATEGIES A Strategy for software testing integrates software test cases into a series of well planned steps that result in the successful construction of software. Software testing is a broader topic for what is referred to as Verification and Validation. Verification refers to the set of activities
44
that ensure that the software correctly implements a specific function. Validation refers he set of activities that ensure that the software that has been built is traceable to customers requirements Unit Testing: Unit testing focuses verification effort on the smallest unit of software design that is the module. Using procedural design description as a guide, important control paths are tested to uncover errors within the boundaries of the module. The unit test is normally white box testing oriented and the step can be conducted in parallel for multiple modules. Integration Testing: Integration testing is a systematic technique for constructing the program structure, while conducting test to uncover errors associated with the interface. The objective is to take unit tested methods and build a program structure that has been dictated by design. Top-down Integration: Top down integrations is an incremental approach for construction of program structure. Modules are integrated by moving downward through the control hierarchy, beginning with the main control program. Modules subordinate to the main program are incorporated in the structure either in the breath-first or depth-first manner. Bottom-up Integration: This method as the name suggests, begins construction and testing with atomic modules i.e., modules at the lowest level. Because the modules are integrated in the bottom up manner the processing required for the modules subordinate to a given level is always available and the need for stubs is eliminated. Validation Testing: At the end of integration testing software is completely assembled as a package. Validation testing is the next stage, which can be defined as successful when the software functions in the manner reasonably expected by the customer. Reasonable expectations are those defined in the software requirements specifications. sections form a basis for validation testing approach. Performance Testing: This method is designed to test runtime performance of software within the context of an integrated system.
IMPLEMENTATION 45
Implementation includes all those activities that take place to convert from the old system to the new. The new system may be totally new; replacing an existing manual or automated system, or it may be a major modification to an existing system. Proper implementation is essential to provide reliable system to meet the organizational requirements. Successful implementation may not guarantee improvement in the organizational using the new system, as well as, improper installation will prevent any improvement. The implementation phase involves the following tasks: Careful Planning
SCREEN SHOTS
Report-1
46
Report-2
47
Report-3
48
Report-4
49
Report-5
50
Report-6
51
Report-7
52
Report-8
53
Report-9
CONCLUSION
54
We studied the duration and availability probabilities of routing paths in MANETsa fundamental issue to provide reliable routes and short route disruption times. We focused on the Random Direction mobility model and derived both exact and approximate (but simple) expressions for the probability of path duration and availability. We used these results to determine the optimal path in terms of route stability; in particular, we showed some properties of the optimal path and we provided an approximate yet accurate expression for the optimal number of hops. Finally, based on our findings, we proposed an approach to find and select routes, which accounts for the expected data transfer time over the path and allows reducing the overhead of reactive routing protocols.
10 BIBLIOGRAPHY:
TEXT BOOKS:
55
Edition
Tata McGraw
Hills,2001.
Sommerville, Sofware engineering, 7th Edition, Pearson Education.
Grady Booch, ames Rumbaugh, IvarJacobson: Unified Modelling Language User Guide, Pearson education.
Magazines:
Data Quest
References:
R. Dube, C.D. Rais, K.-Y. Wang, and S.K. Tripathi, Signal Stability Based Adaptive Routing (SSA) for Ad-Hoc Mobile Networks, IEEE Personal Comm., vol. 4, no. 1, pp. 36-45, Feb. 1997. S. Agarwal, A. Ahuja, J.P. Singh, and R. Shorey, Route-Lifetime Assessment Based Routing (RABR) Protocol for Mobile Ad-Hoc Networks, Proc. IEEE Intl Conf. Comm. (ICC 00), pp. 1697-1701, June 2000. W. Su, S.-J. Lee, and M. Gerla, Mobility Prediction and Routing in Ad Hoc Wireless Networks, Intl J. Network Management, vol. 11, no. 1, pp. 3-30, Jan./Feb. 2001. C. Bettstetter, G. Resta, and P. Santi, The Node Distribution of the Random Waypoint Mobility Model for Wireless Ad Hoc Networks, IEEE Trans. Mobile Computing, vol. 2, no. 3, pp. 257-269, July-Sept. 2003.
56