Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 131

DECENTRALIZED CHECKPOINTING IN MOBILE GRID COMPUTING ABSTRACT

This paper deals with decentralized, QoS-aware, middleware for check-pointing arrangement in Mobile Grid (MoG) computing systems. Check-pointing is more crucial in MoG systems than in their conventional wired counterparts due to host mobility, dynamicity, less reliable wireless links, frequent disconnections and variations in mobile systems. We have determined the globally optimal checkpoint arrangement to be NP-complete and so consider Reliability Driven (ReD) middleware, employing decentralized QoS-aware heuristics, to construct superior check-pointing arrangements efficiently. With ReD, an MH (mobile host) simply sends its check-pointed data to one selected neighboring MH, and also serves as a stable point of storage for check-pointed data received from a single approved neighboring MH. ReD works to maximize the probability of check-pointed data recovery during job execution, increasing the likelihood that a distributed application, executed on the MoG, completes without sustaining an unrecoverable failure. It allows collaborative services to be offered practically and autonomously by the MoG. Simulations and actual test-bed implementation show ReDs favorable recovery probabilities with respect to Random Check-pointing Arrangement (RCA) middleware, a QoS-blind comparison protocol producing random arbitrary check-pointing arrangements.

List of Tables: Table.no Table Name 4.5.1.1 4.5.1.2 File id Node Details Page no 18 18

List of Figures: Fig.no 4.4.1 4.7.1 4.7.2 4.7.3 4.7.4 4.7.5 8.1 8.2 8.3 Figure Name Data Flow Diagram Use Case Diagram Activity Diagram Sequence Diagram Collaboration Diagram Class Diagram Illustrate how it works Networks Layer Connection-based Communication 8.4 Datagram-based Communication 44 Page no 17 22 23 24 25 26 34 41 44

CHAPTER-I 1.INTRODUCTION Grid computing systems have seen their widespread adoption lately in not only academia but also in industry, as evidenced by commercial offerings from Sun ,HP and IBM, among others. While most existing Grids refer to clusters of computing and storage resources
2

which are wire-interconnected for offering utility services collaboratively, Mobile Grids (MoGs) are receiving growing attention and expected to become a critical part of a future computational Grid involving mobile hosts to facilitate user access to the Grid and to also offer computing resources. A MoG can involve a number of mobile hosts (MHs), i.e., laptop computers, cell phones, PDAs, or wearable computing gear, having wireless interconnections among one another or to access points. Indeed, a recent push by HP to equip business notebooks with integrated global broadband wireless connectivity , has made it possible to form a truly mobile Grid (MoG) that consist of MHs providing computing utility services collaboratively, with or without connections to a wired Grid. The distributed applications likely to run on these MoGs are not the traditional longrunning heavy computing jobs commonly found in their wired counterparts, but instead, are lightweight, distributed mobile agents (e.g. location aware and specifically designed, intelligent, reflective collaborative agents acting at the request of a client on the conventional Grid or within the MoG itself) whose functions will enhance both the values of the MoG and the entire global Grid . Because sensors (e.g., GPS, compasses, accelerometers, etc.) are commonly included in many mobile devices, lightweight applications will be capable of providing local, collaborative, and interpretive processing of disparate sensor data from a number of MHs, in order to intelligently surmise macro events for MoG or global Grid clients. 1.1 About the Project: Due to mobility and intermittent wireless link loss, all such scenarios call for robust check-pointing and recovery to support execution, minimizing execution rewind and recovery rollback delay penalties. Depending upon the applications or jobs tolerance for such delay (i.e., a QoS metric), its performance can be poor or it can be rendered totally inoperative and useless. Our Reliability Driven middleware, ReD, allows an MoG scheduler to make informed decisions, selectively submitting job portions to hosts having superior checkpointing arrangements in order to ensure successful completion by 1) providing highly reliable check-pointing, increasing the probability of successful recovery, minimizing rollback delay, and 2) providing performance prediction to the scheduler, enabling the clients specified maximum delay tolerance to be better negotiated and matched with MoG resource capabilities. Suitable for scientific applications, MoGs are particularly useful in remote areas
3

where access to the wired Grid is infeasible, and autonomous, collaborative computing is needed. MoG hosts have no guaranteed access to fixed, wired, Grid access points. Checkpointing is thus crucial for practical and feasible job completion, for without it, the MoGs potential is severely limited. Check-pointing saves intermediate data and machine states periodically to reliable storage during the course of job execution. Various check-pointing mechanisms have been pursued for distributed systems (whose computing hosts are wireconnected). LITERATURE SERVEY: Reliable Distributed Systems: The low communication bandwidth, slow processor and limited memory of hand-held devices make it undesirable for them to store their own checkpoints or send process state information over a wireless network. It describes an approach to failure recovery for threetier client and server application environments where the client applications execute on wireless handheld devices. The key idea is to have the middle-tier proxy transparently monitor the client's interaction with the back-end server and continuously maintain a copy of the client's state based on messages exchanged between the client and the server. The proxy also sustains the client's connection to the back-end server when a client unexpectedly disconnects. The client does not participate in check-pointing nor message logging, thereby saving power, processor cycles and bandwidth. The proxy is scalable and enhances backend server performance. Experimental results are provided for recovery time and runtime overhead.

Optimal checkpoint interval : The adaptive timers for initiating checkpoints must have low overhead. Numerous mathematical approaches have been proposed to determine the optimal checkpoint interval for minimizing total execution time of an application in the presence of failures. These solutions are often not applicable due to the lack of accurate data on the probability distribution of failures. Most current checkpoint libraries require application users to define a fixed time interval for check-pointing. The checkpoint interval usually implies the approximate maximum recovery time for single process applications. However, actual
4

recovery time can be much smaller when message logging is used. Due to this faster recovery, check-pointing may be more frequent than needed and thus unnecessary execution overhead is introduced. In this paper, an adaptive check-pointing protocol is developed to accurately enforce the user-defined recovery time and to reduce excessive checkpoints. An adaptive protocol has been implemented and evaluated using a receiver-based message logging algorithm on wired and wireless mobile networks. The results show that the protocol precisely maintains the user-defined maximum recovery times for several traces with varying message exchange rates. The mechanism incurs lour overhead, avoids unnecessary checkpointing, and reduces failure free execution time. Free Distributed Check-pointing: Distributed check-pointing is an important concept in providing fault tolerance in distributed systems. In todays applications, e.g., grid and massively parallel applications, the imposed overhead of taking a distributed checkpoint using the known approaches can often outweigh its benefits due to coordination and other overhead from the processes. It presents an innovative approach for distributed check-pointing. In this approach, the checkpoints are obtained using offline analysis based on the application level. During execution, no coordination is required. After presenting our approach, we prove its safety and present a performance analysis of it using stochastic models. Check-pointing is the act of saving an applications state to stable storage during its execution, while restart is the act of restarting the application from a check-pointed state. If checkpoints are taken, then when an application fails, it may be possible to restart it from its most recent checkpoint. This limits the amount of computation lost because of a failure to the computation performed between the last checkpoint and the failure.

1.2 Plan of the Report: The various chapter of the project report are designed to provide details regarding the various phases of the project. The plan of the report is as follows: Chapter 2(Problem Definition and Proposal) discuss the problem, the feasibility study done and the recommended solution. This chapter also includes the specification of the

existing system and its drawbacks. The details of the features about the proposed system are included. Chapter 3(System Requirements Specifications) highlights the essential requirements for developing the software product. This comprises of the description about the purpose, the end user, an overview of the product features and summarizes the environments for development and operation. Chapter 4(System Design) presents the preliminary and detailed designs of the system. The system architecture puts forth a high-level view of the entire system. The detailed design specifies the various modules that are presents and an in depth description about each. Chapter 5(Implementation) deals with implementing the style issues and a description of the various stages of the development of the project. Chapter 6(Testing) deals with a description of the various tests carried out on the system. Chapter 7(Conclusion and Future Enhancements) enlists the closing remarks. Suggestions enhanced in the near future are listed. Chapter 8(Appendix) has the details about the software used for developing the project and the code written on the project and some sample screenshots. Bibliography has the list of books and website referred by us for developing this project.

CHAPTER-II 2. PROBLEM DEFINITION AND PROPOSAL 2.1 Introduction: Problem definition and analysis phase is the backbone for the software to be developed. The process of system analysis involves gathering of facts and figures required for the development of the project. This collection of facts and figures involves the collection of raw data, which includes the basic fields along with type of data. The system study is conducted taking the existing system into mind and evaluating the risk and ramification involved in the development of the project. 2.2 Problem Definition: The problem faced by the existing system is maximum time consumption, efficiency and authentication. Since every detail is taken care manually it might bring mental strain to us. There are also chances for occurrence of errors, which might bring havoc to the department. Based upon the insufficient functionalities in the existing system, the requirement for the proposed system has been framed. This project has been aimed at meeting the requirements of the client, for providing them with easier client monitoring process. 2.3 Existing System: Existing Grids refer to clusters of computing and storage resources which are wireinterconnected for offering utility services collaboratively, Mobile Grids (MoGs) are receiving growing attention and expected to become a critical part of a future computational Grid involving mobile hosts to facilitate user access to the Grid and to also offer computing resources. Due to mobility and intermittent wireless link loss, all such scenarios call for robust check-pointing and recovery to support execution, minimizing execution rewind and recovery rollback delay penalties. Depending upon the applications or jobs tolerance for such delay (i.e., a QoS metric), its performance can be poor or it can be rendered totally inoperative and useless. MoG hosts have no guaranteed access to fixed, wired, Grid access points. Checkpointing is thus crucial for practical and feasible job completion, for without it, the MoGs
7

potential is severely limited. Check-pointing arrangements are fail to deal with link disconnections and degrees of system topological dynamicity. 2.4 Proposed System: Providing highly reliable check-pointing, increasing the probability of successful recovery, minimizing rollback delay, providing performance prediction to the scheduler, enabling the clients specified maximum delay tolerance to be better negotiated and matched with MoG resource capabilities. Stored checkpoint information can then be used to resume job execution at a substitute host chosen to run the recovered application in place of the failed host. Check-pointing in wired Grid systems has been investigated earlier with various methodologies proposed where hosts are connected by low latency, high-speed, wired links having low link and host failure rates. ReD was tailored for a relatively unreliable wireless mobile environment, its design achieves its checkpoint arrangement functions in a lightweight, distributed manner, while maintaining both low memory and transmission energy footprints. 2.5 Feasibility Analysis: The feasibility of the project is analyzed in this phase and business proposal is put forth with a very general plan for the project and some cost estimates. During system analysis the feasibility study of the proposed system is to be carried out. This is to ensure that the proposed system is not a burden to the company. For feasibility analysis, some understanding of the major requirements for the system is essential. Four key considerations involved in the feasibility analysis are Economical Feasibility Operational Feasibility Technical Feasibility Social Feasibility

Operational Feasibility:

The project is operationally feasible as it is user friendly. Appropriate messages and intimations will be given to the end users as and when situations arise. The need for such an application for maintaining the database is more essential for the education department. Economical Feasibility: This study is carried out to check the economic impact that the system will have on the organization. The amount of fund that the company can pour into the research and development of the system is limited. The expenditures must be justified. Thus the developed system as well within the budget and this was achieved because most of the technologies used are freely available. Only the customized products had to be purchased. Technical Feasibility: This study is carried out to check the technical feasibility, that is, the technical requirements of the system. Any system developed must not have a high demand on the available technical resources. This will lead to high demands on the available technical resources. This will lead to high demands being placed on the client. The developed system must have a modest requirement, as only minimal or null changes are required for implementing this system. Social Feasibility: The aspect of study is to check the level of acceptance of the system by the user. This includes the process of training the user to use the system efficiently. The user must not feel threatened by the system, instead must accept it as a necessity. The level of acceptance by the users solely depends on the methods that are employed to educate the user about the system and to make him familiar with it. His level of confidence must be raised so that he is also able to make some constructive criticism, which is welcomed, as he is the final user of system. Recommended Implementation: The proposed system has been considered as feasible and recommended for implementation. After careful study and analysis of the system, the following facts are found. The system can be categorized into subsystems as follows. Authentication
9

System Administration

Authentication: The process of seeking authorized access to the application. System Administration: The Administrator manages the overall data of the application and some of the authorities can be delegated to the entry-operators. Problem analysis: We develop an efficient lossless image compression scheme called super-spatial structure prediction. This super-spatial prediction is motivated by motion prediction in video coding, attempting to find an optimal prediction of structure components within previously encoded image regions. We find that this super-spatial prediction is very efficient for image regions with significant structure components.

10

CHAPTER-III 3. SYSTEM REQUIREMENT 3.1 Introduction: The requirements specification is a technical specification of requirements for the software products. It is the first step in the requirements analysis process it lists the requirements of a particular software system including functional, performance and security requirements. The requirements also provide usage scenarios from a user, an operational and an administrative perspective. The purpose of software requirements specification is to provide a detailed overview of the software project, its parameters and goals. This describes the project target audience and its user interface, hardware and software requirements. It defines how the client, team and audience see the project and its functionality. 3.2 Functional Requirements: These are related to the expectations from the intended software. They describe what the software has to do. They area also called product features. Sometimes , functional requirements may also specify what the software should not do. Facility to get Configuration from any system in a Network. Facility to know the software available in any system Facility to view the Log (Application, Security, System). Facility to transfer file from one system to another in a Network. Facility to know CPU performance. 3.3 Hardware Requirements: System Hard Disk Monitor RAM 3.4 Software Requirements: Front End Back End : JDK 1.5 and Above : Mysql
11

: Pentium IV 2.4 GHz : 80 GB : 15 VGA colour : 1 GB

Tools

: Net Beans

Operating System : Windows XP 3.5 Other Nonfunctional Requirements: Performance Requirements: Consumer transmits a checkpoint request, first to the list top host. e.g., MHl. In essence, a checkpoint request asks the Provider, MHls permission to send checkpointed data to it. If prospective provider, MHl has no consumer of record, it readily grants permission and sends a positive acknowledgment back to MHk, establishing a MHk MHl relationship. On the other hand, if a relationship, say, MH MHl already exists, MHl checks to see if the requesting consumers pairing reliability gain is greater than that for its existing paired consumer. I.e. true statement, it breaks its relationship with MHj by sending it a break message, and then grants permission to MHk by sending it an acknowledgment. If, on the other hand, the statement proves false, MHk is sent a negative acknowledgment, and MHl maintains the relationship, MHj MHl, unless otherwise severed due to mobility, or weak signal. Safety Requirements: The software may be safety-critical. If so, there are issues associated with its integrity level. The software may not be safety-critical although it forms part of a safety-critical system. For example, software may simply log transactions. If a system must be of a high integrity level and if the software is shown to be of that integrity level, then the hardware must be at least of the same integrity level. There is little point in producing 'perfect' code in some language if hardware and system software (in widest sense) are not reliable. If a computer system is to run software of a high integrity level then that system should not at the same time accommodate software of a lower integrity level. Systems with different requirements for safety levels must be separated. Otherwise, the highest level of integrity required must be applied to all systems in the same environment. Security Requirements: Do not block the some available ports through the windows firewall. Software Quality Attributes:
1. Functionality : 12

What the software is suppose to do? Functionality are the required function available including interoperability and security.
2. Reliability:

Reliability specify the factors required to establish the required reliability of the software system at time of delivery, maturity, fault tolerance and recoverability.
3. Usability:

The extent of effort required to learn, operate and understand the functions of the software system.
4. Efficiency:

Efficiency is the amount of computing resources and code required by software to perform a function.
5. Maintainability:

Maintainability is the effort required to locate and fix an error during maintenance phase.

CHAPTER-IV 4. SYSTEM DESIGN


13

4.1 Introduction: System design is the process of planning the software product. The design is the process of applying various techniques and principles for the purpose of defining a process or a system in sufficient detail. The design acts as a link between the actual problem specification and the actual implementation. After the thorough analysis of the existing system, the design of the system is carried out. The goal of the system is to create a new system that meets a set of objectives and these objectives are the driving force behind the design process. The design phase begins by identifying reports and other outputs that the system will produce. The system design also describes the data to be input, calculated or stored. Individual data items and calculation procedures are written in detail. The high-level design document will help to understand the system more clearly and on the basis of this document detailed design of the system can be done. It will give a high level view of the functionalities. The goal of Decentralized Check-pointing in mobile grid computing is to integrate the overall functionalizes of an organization. This system that meets a set of objectives and these objectives are the driving force behind the design process. 4.2 Basic Design Approach: The goal of the system is to find the best possible approach that would satisfy the requirements. It is important to design systems that are easy to implement, understand and maintain. A modular design reduces complexity, facilitates change and results in easier implementation. The modules are small enough that each module is implemented within a short period of time. The principles of high cohesion and low coupling are followed. Cohesion and coupling are the criteria to measure functional independence. Independent modules are easier to maintain because secondary effects caused by design modification are limited, error propagation is reduced and reusable modules are possible. Functional independence is a key to good design and design is the key to good software quality.

14

4.3 Design Concepts: The fundamental design concepts like Modularity, Coupling and Cohesion were taken care of during the design in order to provide an efficient migration. 4.3.1 Modularity: The concept of modularity in computer software has been espoused for almost 5 decades. Software architecture embodies modularity; i.e. software is divided into separately named and addressable, often called modules, which are integrated to satisfy problem requirements. Modularity is the single attribute of software that allows a program to be intellectually manageable. The fundamental goal of the design was to reduce the number and complexity of interconnections between the functionalities. In this Decentralized Checkpointing in mobile grid computing there are four modules and they are Hardware and Software tracking, Maintaining Log(Application, system, Security), File Transfer. It is easy to understand and the user can proceed without any complexity. The criteria of modular decomposability, comparability, understandability, continuity and protection are considered for and effective modular design. 4.3.2 Coupling: Coupling is a measure of the relative interdependence among modules. Coupling is the relationship between the modules of the system. Coupling is a measure of interconnection among modules in a software structure. Coupling depends on the interface complexity between modules, the point at which entry or reference is made to a module, and what data pass across the interface. All the sub-modules are coupled with their corresponding main modules. Where there was a tradeoff between redundancy and the degree of coupling, reducing coupling was a given priority. Since some data is exchanged between modules, low coupling called Data Coupling exists. Care is taken to prevent high degree of coupling. In this Decentralized Check-pointing in mobile grid computing, the modules are coupled together to the main modules. Some data is shared between the modules where the exchange may takes place to improve the efficiency.

15

4.3.3 Cohesion: Cohesion is the measure of the relative functional strength of an individual module. It is a natural extension of the information hiding concept. A cohesive module performs a single task within a software procedure, requiring little interaction with procedures being performed in other parts of a program. It should be as high as possible for the system to function efficiently. Care is taken for the modules to be as cohesive as possible. As the modules perform tasks that are related logically in each module, logical cohesion exists and since processing elements in a module are related and executed in a specific order, procedural cohesion exists. In this Decentralized Check-pointing in mobile grid computing, each module in the application works independently without the interference of other modules. Each module has its own function and requirements. Thus the application provides high cohesion. 4.4 User Interface Design: The user interface design deals with the identification of the user and how the user interacts with the new computer system. The Decentralized Check-pointing in mobile grid Sender computing is designed with a highly user-friendly interface. Proper input validation is provided with a precise and unambiguous message to correct the input for the user. The design manages each window and the scrolling between the windows. Help is provided to assist all input actions. Data with check point

4.4.1 Data Flow Diagrams: Neighbor is a A data flow diagram (DFD) node graphical representation of the flow of data through an information system, and is a key component of designing a successful database application. The dataflow diagram allows clients and end users to be able to visualize how the system will operate, what will be achieved and how it will be If accomplished. Data flows diagrams are an essential part of the Structured Systems intrud Analysis and Design Method (SSADM) which Impact follows when under-taking er creation of all database applications.

Data with check point


16

Receiver

Fig.no : 4.4.1Data Flow Diagram 4.5 Database Design: Database design defines the method of data organization. The database was designed with the following features. 1. Redundancy reduction 2. Data integrity 3. Data Availability Constraints The organization of data in a database aims to achieve data integration, data integrity and data independence. Database is an integrated collection of data and provides a centralized access to the data. Databases are normally implemented by using a package called Relational Data Base Management System (RDBMS). The selection of appropriate techniques is necessary to design a good database.
17

The primary key is defined for every entity that has unique identification property. Foreign keys are also defined wherever applicable to ensure data integrity and data consistency. The Decentralized Check-pointing in mobile grid computing holds tables which provide some kind of information required for each module. 4.5.1 Table Design: Table Name: File id Field FileID Type int(10) unsigned FileName varchar(45) NO NULL NO Key PRIMARY Default NULL Extra auto_incr ement

Table Name: Node Details Field Sender Node1 Node2 Type Varchar(45) Varchar(45) Varchar(45) NULL No No No No No Key Default Extra

Receiver Varchar(45) message Varchar(45)

4.6 MODULES:

Check-pointing. Checkpoint arrangement protocol Consumer and provider algorithm ReDs stability control mechanism Simple clustering algorithm
18

MODULE EXPLANATION: Check-pointing: Check-pointing saves intermediate data and machine states periodically to reliable storage during the course of job execution. Various check-pointing mechanisms have been pursued for distributed systems (whose computing hosts are wire-connected). However, they are not suitable for the MoG because their check-pointing arrangements (1) are relatively immaterial as check-pointed data from hosts can be stored at a designated server or servers, since connections to a server are deemed reliable, of high bandwidth, and of low latency, and (2) fail to deal with link disconnections and degrees of system topological dynamicity. In contrast, a MoG highly desires its check-pointed data to be kept all at neighboring MHs rather than remote ones who require multiple, relatively unreliable, hops to transmit checkpoints and to reach check-pointed data when it is needed. Earlier wireless checkpointing methods stored check-pointed information at fixed, stationary hosts, on the wired Grid (i.e., base stations, (BSs)) via access points . Checkpoint arrangement protocol : The set of all such directed relationships, on a MoG instance, is called a checkpointing arrangement. It makes use of the underpinnings in both cases, resulting in the basis model. As long as all hosts running the distributed application have high connectivity (i.e. low likelihood of separation from the MoG), robust safe storage or reliable transmission to safe storage is not really needed. Only poorly connected hosts (e.g., hosts on the fringes of the MoG) need robust safe storage and reliable transmission to that safe storage. Furthermore, since host failures happen most frequently to poorly connected hosts, it makes sense to reserve the most robust checkpoint storage (providers) for these hosts, while leaving the least robust storage for the best-connected hosts. This way puts valuable and scarce robust checkpointing resources to work where they are most needed in reducing unrecoverable failures effectively. Consumer and provider algorithm: Each MH in a connected MoG concurrently runs both consumer and provider algorithm functions, and is thus capable of being both a provider and a consumer of checkpointing services for some other MHs. Obviously, there are numerous ways to assign checkpointing consumers and providers among all constituent MHs within a MoG, referred to as
19

check-pointing arrangements. An efficient arrangement thus aims to identify superior assignments of providers and consumers of check-pointing services, among all MHs within the MoG in order to ensure collaborative job execution can complete reliably with smaller probability of experiencing unrecoverable failures. We define stability, in the context of a check-pointing arrangement, as one where no consumer or provider prefers another provider or consumer respectively to its current partner in the relationship, and all consumers and providers have found providers and consumers respectively. Such an arrangement is called stable. ReD allows a given consumer or provider to break its existing check-pointing relationship (when a provider breaks a check-pointing relationship, a break message is transmitted to the consumer) only when the arrangement reliability improvement is significant, thus promoting stability. ReDs stability control mechanism : Using ReDs stability control mechanism, hosts could theoretically snoop broadcasts of general wireless traffic to monitor the level of break message activity, gather data about neighborhood density and mobility through exchange with neighbors about connectivity, and thus modulate in order to effectively and responsively control stability versus arrangement reliability. ReDs algorithm takes into account desired behavioral controlling heuristics in the following ways. First, we require the MoG to be capable of autonomous operation without an access point or BS and further to reduce the use of relatively unreliable wireless links. ReD ensures this by storing check-pointed data only at neighboring MHs, within the MoG, and not requiring BS access or checkpoint transmission over multiple hops. Secondly, in a MoG, dynamicity ensures that a check-pointing arrangement must be converged rapidly and efficiently, even though it may only be close to optimal. ReDs heuristic method ensures that check-pointing arrangement decisions are made locally and individually at the host level, promoting rapid convergence, while a threshold mechanism is included in order to provide stability control. Simple clustering algorithm : ReD is supported by a clustering algorithm, which partitions the global MoG into clusters, allowing ReD to quickly and concurrently find superior arrangements within each cluster instead of having to labor toward a global MoG solution. While many clustering algorithms have been proposed for general ad-hoc networks ,a simple clustering algorithm is devised and adopted both in our simulator and in our working test-bed as a functional support layer for ReD, B) ReD makes decisions about whether to request, accept, or break check20

pointing relationships, locally (at the MH level) and in a fully distributed manner, instead of attempting a high-level centralized or global consensus, C) ReD keeps checkpoint transmissions local, i.e. neighbor to neighbor, not requiring multiple hops and significant additional transmission overhead to achieve check-pointing relationships. 4.7 UML Diagrams: The Unified Modeling Language (UML) is a standard language for specifying, visualizing, constructing, and documenting the artifacts of software systems, as well as for business modeling and other non-software systems. The UML represents a collection of best engineering practices that have proven successful in the modeling of large and complex systems. The UML is a very important part of developing objects oriented software and the software development process. The UML uses mostly graphical notations to express the design of software projects. Using the UML helps project teams communicate, explore potential designs, and validate the architectural design of the software. Goals of UML: The primary goals in the design of the UML were: Provide users with a ready-to-use, expressive visual modeling language so they can develop and exchange meaningful models. Provide extensibility and specialization mechanisms to extend the core concepts. Be independent of particular programming languages and development processes. Provide a formal basis for understanding the modeling language. 4.7. 1. Use case Diagram: A use case is a set of scenarios that describing an interaction between a user and a system. A use case diagram displays the relationship among actors and use cases. The two main components of use case diagram are use cases and actors.

21

Fig 4.7.1 : Use case diagram

4.7.2. Activity Diagram: Activity diagrams describe the workflow behavior of a system. Activity diagrams are similar to state diagrams because activities are the state of doing something. The diagrams describe the state of activities by showing the sequence of activities performed. Activity diagrams can show activities that are conditional and parallel.

22

Fig 4.7.2 :Activity Diagram

4.7.3.Sequence Diagram: Sequence Diagrams are used to design, document and validate the architecture, interfaces and logic of the system by describing the sequence of actions that need to be performed to complete a task.

23

Fig 4.7.3 : Sequence Diagram

4.7.4.Collaboration diagram: Collaboration diagrams are also relatively easy to draw. They show the relationship between objects and the order of messages passed between them. The objects are listed as icons and arrows indicate the messages being passed between them. The numbers next to the messages are called sequence numbers. As the name suggests, they show the sequence of
24

the messages as they are passed between the objects. There are many acceptable sequence numbering schemes in UML.

Fig 4.7.4 : Collaboration Diagram

4.7.5.Class Diagram: Class diagrams are widely used to describe the types of objects in a system and their relationships. Class diagrams model class structure and contents using design elements such as classes, packages and objects. Class diagrams describe three different perspectives when designing a system, conceptual, specification, and implementation. become evident as the diagram is created and help solidify the design.
25

These perspectives

Fig 4.7.5 : Class Daigram CHAPTER-V 5.IMPLEMENTATION 5.1 Introduction: Implementation is stage of project when theoretical design is turned into a working system. It involves careful planning, investigation of current system and its constraints on implementation, design of methods to achieve the changeover, training of staff in the
26

changeover procedures and evaluation of changeover methods. The programs, which are developed earlier, are linked properly and put into operation with test data. The phase concludes with the maintenance of the resources necessary, both hardware and software. 5.2 Implementation details: There are several methods for handling the implementation and the consequent conversion from the old to the new computerized system. Another commonly method is a direct cut over from the existing manual system to the computerized system. The change may be with in a week or with in a day. There are no parallel activities. However, there is no remedy in case of a problem. This strategy requires careful Planning a working version of the system can also be implemented in one part of the organization and the personnel will be piloting the system and changes can be made as and when required. But this method is less preferable due to the loss of entirety of the system. The implementation plan includes a description of all the activities that must occur to implement the new system and to put it into operation. It identifies the personnel responsible for the activities and prepares a time chart for implementing the system. The implementation plan consists of the following steps. The implementation plan should anticipate possible problems and must be able to deal with them. The usual problems may be missing documents; mixed data formats between current and files, errors in data translation, missing data etc.

CHAPTER-VI

6. CODING AND TESTING 6.1 CODING: Once the design aspect of the system is finalizes the system enters into the coding and testing phase. The coding phase brings the actual system into action by converting the design
27

of the system into the code in a given programming language. Therefore, a good coding style has to be taken whenever changes are required it easily screwed into the system. 6.2 CODING STANDARDS: Coding standards are guidelines to programming that focuses on the physical structure and appearance of the program. They make the code easier to read, understand and maintain. This phase of the system actually implements the blueprint developed during the design phase. The coding specification should be in such a way that any programmer must be able to understand the code and can bring about changes whenever felt necessary. Some of the standard needed to achieve the above-mentioned objectives are as follows Program should be simple, clear and easy to understand Naming conventions Value conventions Script and comment procedure Message box format Exception and error handling Naming conventions: Naming conventions of classes, data member, member functions, procedures etc., should be self-descriptive. One should even get the meaning and scope of the variable by its name. The conventions are adopted for easy understanding of the intended message by the user. So it is customary to follow the conventions. These conventions are as follows:

28

Class names: Class names are problem domain equivalence and begin with capital letter andhave mixed cases. Member Function and Data Member name: Member function and data member name begins with alowercase letter with each subsequent letters of the new words in uppercase and the rest of letters in lowercase. 6.2.2 Value Conventions Value conventions ensure values for variable at any point of time. Thisinvolves the following: Proper default values for the variables. Proper validation of values in the field. Proper documentation of flag values. 6.2.3 Message Box Format When something has to be prompted to the user, he must be able tounderstand it properly. To achieve this, a specific format has been adopted indisplaying messages to the user. They are as follows: X User has performed illegal operation. Information to the user. 6.3 TEST PROCEDURE : SYSTEM TESTING:

29

Testing is performed to identify errors. It is used for quality assurance. Testing is an integral part of the entire development and maintenance process. The goal of the testing during phase is to verify that the specification has been accurately and completely incorporated into the design ,as well as to ensure the correctness of the design itself. For example the design must not have any logic faults in the design is detected before coding commences, otherwise the cost of fixing the faults will be considerably higher as reflected. Detection of design faults can be achieved by means of inspection as well as walk through. Testing is one of the important steps in the software development phase. Testing checks for the errors, as a whole of the project testing involves the following test cases: Static analysis is used to investigate the structural properties of the Source code Dynamic testing is used to investigate the behavior of the source code by executing the program on the test data 6.4 TEST DATA AND OUTPUT: 6.4.1 Unit Testing: Unit testing is conducted to verify the functional performance of each modular component of the software. Unit testing focuses on the smallest unit of the software design (i.e.), the module. The white-box testing technique were heavily employed for unit testing. 6.4.2 Functional Tests: Functional test cases involved exercising the code with nominalin put values for which the expected results are known, as well as boundary values and special values, such as logically related inputs, files of identical 6.4.3 Integration Testing: Integration testing is a systematic approach for constructing the program structure while conducting tests to uncover errors associated with interfacing. The program structure is constructed and tested in small segments, where errors are easily corrected then the interfaces are likely to be tested completely.

30

In Decentralized Check-pointing in mobile grid computing all the modules were tested individually first with unit testing with all the cases. Then they were integrated with the next higher-level module. So the integration testing was focused on those modules, which was tightly coupled. 6.4.4 Validation Testing: Validation testing is the requirements established as part of the software requirements analysis are validated against the software that has been constructed. Validation testing provides final assurance that the software meets all functional, behavioral and performance requirements. Validation testing is done in order to avoid the unauthorized users and to protect the data from non-authenticated users. If any username or password that is found to be mismatch while login, then an error message will be displayed and the login form will reappear to allow the user for trying again. 6.5 Test Plan: A test plan is a systematic approach to testing a system such as a machine or software. It can be a personal observation or the output of a precision instrument. The plan typically contains a detailed understanding of what the eventual workflow will be. Identify tasks necessary to prepare for and perform testing Identify all task interdependencies Identify any special skills required

31

CHAPTER-VII 7.CONCLUSION AND FUTURE ENHANCEMENTS 7.1 Conclusion: In a large MoG may render a MH participating in one job execution, unreachable from the remaining MHs occasionally, calling for efficient check-pointing in support of long job execution. As earlier proposed check-pointing approaches cannot be applied directly to MoGs and are not QoS-aware, we have dealt with QoS-aware check-pointing and recovery specifically for MoGs, with focusing solely on check-pointing arrangement. 7.2 Future Enhancements: There is always a room for improvement in any Software package, however good and efficient it may be. The important thing is that, the system should be flexible enough, for further modifications. Considering this important factor, the system is designed in such a way that the provisions are given for further enhancements, without affecting the system presently developed. 1. The process of seeking authentication could be made more perfect, by means developing some steps that take the control over the authentication process. 2. The Database can be changed to any environment easily. 3. Internet Extension: This project can also extended to Internet i.e. we can get the information about systems, configuration information even from out of network 4. Security with more authentication and authorization features, with the assistance of revising.

32

CHAPTER-VIII 8. APPENDIX A ABOUT THE SOFTWARE: JAVA: It is a Platform Independent. Java is an object-oriented programming language developed initially by James Gosling and colleagues at Sun Microsystems. The language, initially called Oak (named after the oak trees outside Gosling's office), was intended to replace C++, although the feature set better resembles that of Objective C. WORKING OF JAVA: For those who are new to object-oriented programming, the concept of a class will be new to you. Simplistically, a class is the definition for a segment of code that can contain both data (called attributes) and functions(called methods).When the interpreter executes a class, it looks for a particular method by the name of main, which will sound familiar to C programmers. The main method is passed as a parameter an array of strings (similar to the argv[] of C),and is declared as a static method. To output text from the program, we execute the println method of System.out, which is javas output stream. UNIX users will appreciate the theory behind such a stream, as it is actually standard output. For those who are instead used to the Wintel platform, it will write the string passed to it to the users program. Java consists of two things: Programming language Platform THE JAVA PROGRAMMING LANGUAGE: Java is a high-level programming language that is all of the following: Simple Object-oriented Distributed
33

Interpreted Robust Secure Architecture-neutral Portable High-performance Multithreaded Dynamic The code and can bring about changes whenever felt necessary. Some of the standard needed to achieve the above-mentioned objectives are as follows: Java is unusual in that each Java program is both co implied and interpreted. With a compiler, you translate a Java program into an intermediate language called Java byte codes the platform independent codes interpreted by the Java interpreter. With an interpreter, each Java byte code instruction is parsed and run on the computer. Compilation happens just once; interpretation occurs each time the program is executed.

Fig:8.1 illustrates how it works : We can think of Java byte codes as the machine code instructions for the Java Virtual Machine (JVM). Every Java interpreter, whether its a Java development tool or a Web browser that can run Java applets, is an implementation of JVM. That JVM can also be implemented in hardware. Java byte codes help make write once, run anywhere possible. We can compile your Java program into byte codes on any platform that h as a Java compiler. The byte codes can then be run on any implementation of the JVM. For example, that same Java program can e run on Windows NT, Solaris and Maci.
34

THE JAVA PLATFORM: A platform is the hardware or software environment in which a program runs. The Java platform differs from most other platforms in that its a software-only platform that runs on top of other, hardware-based platforms. Most other platforms are described as a combination of hardware and operating system. The Java platform has two components : The Java Virtual Machine (JVM) The Java Application Programming Interface (Java API) Weve already been introduced to the JVM. Its the base for the Java platform and is ported onto various hardware-based platforms. 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 (packages) of related components. The following figure depicts a Java program, such as an application or applet, thats running on the Java platform. As the figure shows, the Java API and Virtual Machine insulates the Java program from hardware dependencies As a platform-independent environment, Java can be a bit slower than native code. However, smart compliers, weel-tuned interpreters, and just-in-time byte compliers can bring Javas performance close to that of native code without threatening proability. Java, the language, is a high-level object-oriented programming language, influenced in various ways by C, C++, and Smalltalk, with ideas borrowed from other languages as well. Its syntax was designed to be familiar to those familiar with C-descended "curly brace" languages, but with arguably stronger OO principles than those found in C++, static typing of objects, and a fairly rigid system of exceptions that require every method in the call stack to either handle exceptions or declare their ability to throw them. Garbage collection is assumed, sparing the developer from having to free memory used by obsolete objects. Java Technology:

35

The Java platform is the ideal platform for network computing. Running across all platforms -- from servers to cell phones to smart cards -- Java technology unifies business infrastructure to create a seamless, secure, networked platform for your business. The Java platform benefits from a massive community of developers and supporters that actively work on delivering Java technology-based products and services as well as evolving the platform through an open, community-based, standards organization known as the Java Community Process program. You can find Java technology in cell phones, on laptop computers, on the Web, and even trackside at Formula One Grand Prix races. The fact is today, you can find Java technology just about everywhere! Business Benefits:
A richer user experience - Whether you're using a Java technology-enabled mobile

phone to play a game or to access your company's network, the Java platform provides the foundation for true mobility. The unique blend of mobility and security in Java technology makes it the ideal development and deployment vehicle for mobile and wireless solutions.
The ideal execution environment for Web services - The Java and XML languages

are the two most extensible and widely accepted computing languages on the planet, providing maximum reach to everyone, everywhere, every time, to every device and platform.
Enabling business from end to end - Java offers a single, unifying programming

model that can connect all elements of a business infrastructure. Swing: Swing is a widget toolkit for Java. It is part of Sun Microsystems' Java Foundation Classes (JFC) an API for providing a graphical user interface (GUI) for Java programs. Swing was developed to provide a more sophisticated set of GUI components than the earlier Abstract Window Toolkit. Swing provides a native look and feel that emulates the look and feel of several platforms, and also supports a pluggable look and feel that allows applications to have a look and feel unrelated to the underlying platform. Advantages:
36

Swing is a platform-independent, Model-View-Controller GUI framework for Java. It follows a single-threaded programming model, and possesses the following traits: Platform independence: Swing is platform independent both in terms of its expression (Java) and its implementation (non-native universal rendering of widgets). Extensibility: Swing is a highly partitioned architecture, which allows for the "plugging" of various custom implementations of specified framework interfaces: Users can provide their own custom implementation(s) of these components to override the default implementations. In general, Swing users can extend the framework by extending existing (framework) classes and/or providing alternative implementations of core components. Component-oriented: Swing is a component-based framework. The distinction between objects and components is a fairly subtle point: concisely, a component is a well-behaved object with a known/specified characteristic pattern of behavior. Swing objects asynchronously fire events, have "bound" properties, and respond to a well-known set of commands (specific to the component.) Specifically, Swing components are Java Beans components, compliant with the Java Beans Component Architecture specifications. Customizable: Given the programmatic rendering model of the Swing framework, fine control over the details of rendering of a component is possible in Swing. As a general pattern, the visual representation of a Swing component is a composition of a standard set of elements, such as a "border", "inset", decorations, etc. Typically, users will programmatically customize a standard Swing component (such as a JTable) by assigning specific Borders, Colors, Backgrounds, opacities, etc., as the properties of that component. The core component will then use these property (settings) to determine the appropriate renderers to use in painting its various aspects. However, it is also completely possible to create unique GUI controls with highly customized visual representation.

37

Configurable: Swing's heavy reliance on runtime mechanisms and indirect composition patterns allows it to respond at runtime to fundamental changes in its settings. For example, a Swingbased application can change its look and feel at runtime. Further, users can provide their own look and feel implementation, which allows for uniform changes in the look and feel of existing Swing applications without any programmatic change to the application code. Lightweight UI: Swing's configurability is a result of a choice not to use the native host OS's GUI controls for displaying itself. Swing "paints" its controls programmatically through the use of Java 2D APIs, rather than calling into a native user interface toolkit. Thus, a Swing component does not have a corresponding native OS GUI component, and is free to render itself in any way that is possible with the underlying graphics APIs. However, at its core every Swing component relies on an AWT container, since (Swing's) JComponent extends (AWT's) Container. This allows Swing to plug into the host OS's GUI management framework, including the crucial device/screen mappings and user interactions, such as key presses or mouse movements. Swing simply "transposes" its own (OS agnostic) semantics over the underlying (OS specific) components. So, for example, every Swing component paints its rendition on the graphic device in response to a call to component.paint (), which is defined in (AWT) Container. But unlike AWT components, which delegated the painting to their OS-native "heavyweight" widget, Swing components are responsible for their own rendering. Loosely-Coupled/MVC: The Swing library makes heavy use of the Model/View/Controller software design pattern, which conceptually decouples the data being viewed from the user interface controls through which it is viewed. Because of this, most Swing components have associated models (which are specified in terms of Java interfaces), and the programmer can use various default implementations or provide their own. The framework provides default implementations of model interfaces for all of its concrete components.

38

Typically, Swing component model objects are responsible for providing a concise interface defining events fired, and accessible properties for the (conceptual) data model for use by the associated JComponent. Given that the overall MVC pattern is a loosely-coupled collaborative object relationship pattern, the model provides the programmatic means for attaching event listeners to the data model object. Typically, these events are model centric (ex: a "row inserted" event in a table model) and are mapped by the JComponent specialization into a meaningful event for the GUI component. Look and feel: Swing allows one to specialize the look and feel of widgets, by modifying the default (via runtime parameters), deriving from an existing one, by creating one from scratch, or, beginning with J2SE 5.0, by using the skinnable synth Look and Feel which is configured with an XML property file. The look and feel can be changed at runtime, and early demonstrations of Swing frequently provided a way to do this. Relationship to AWT: Since early versions of Java, a portion of the Abstract Window Toolkit (AWT) has provided platform-independent APIs for user interface components. In AWT, each component is rendered and controlled by a native peer component specific to the underlying windowing system. By contrast, Swing components are often described as lightweight because they do not require allocation of native resources in the operating system's windowing toolkit. The AWT components are referred to as heavyweight components. Much of the Swing API is generally a complementary extension of the AWT rather than a direct replacement. In fact, every Swing lightweight interface ultimately exists within an AWT heavyweight component because all of the top-level components in Swing (JApplet, JDialog, JFrame, and JWindow) extend an AWT top-level container. However, the use of both lightweight and heavyweight components within the same window is generally discouraged due to Z-order incompatibilities. The core rendering functionality used by Swing to draw its lightweight components is provided by Java 2D, another part of JFC.

Relationship to SWT:
39

The Standard Widget Toolkit (SWT) is a competing toolkit originally developed by IBM and now maintained by the Eclipse Foundation. SWT's implementation has more in common with the heavyweight components of AWT. This confers benefits such as more accurate fidelity with the underlying native windowing toolkit, at the cost of an increased exposure to the native platform in the programming model. The advent of SWT has given rise to a great deal of division among Java desktop developers, with many strongly favoring either SWT or Swing. Sun's development on Swing continues to focus on platform look and feel (PLAF) fidelity with each platform's windowing toolkit in the approaching Java SE 7 release (as of December 2006). IO package: The java.io package is concerned with input and output. Any non trivial program will require I/O. Anything from reading a plain comma delimeted text file, a XML data file or something more exotic such as a network stream. The good news is that the Programmer Certification Exam only expects you to understand the basics of I/O, you do not have to know about Networking or the more exotic aspects of I/O. Java I/O is based on the concept of streams. The computer term streams was first popularized with the Unix operating system and you may like to consider it as being an analogy with a stream of water. You have a stream of bits coming in at one end, you apply certain filter to process the stream. Out the other end of the pipe you send a modified version of the stream which your program can process.. The java.io package contains a relatively large number of classes. Most of the package consists of byte streams--subclasses of InputStream or OutputStream and character streams--subclasses of Reader or Writer. Each of these stream types has a specific purpose, and, despite its size, java.io is a straightforward package to understand and to use. Collections Framework: This tutorial takes you on an extended tour of the Collections Framework, first introduced With the Java 2 platform, Standard Edition, version 1.2. The Collections Framework provides a well-designed set of interfaces and classes for storing and manipulating groups of data as a single unit, a collection. The framework provides a convenient API to many of the abstract data types familiar from computer science data
40

structure curriculum: maps, sets, lists, trees,

arrays, hash tables, and other collections.

Because of their object-oriented design, the Java classes in the Collections Framework encapsulate both the data structures and the algorithms associated with these abstractions. The framework provides a standard programming interface to many of the most common abstractions, without burdening the programmer with too many procedures and interfaces. The operations supported by the collections framework nevertheless permit the programmer to easily define higher-level data abstractions, such as stacks, queues, and thread-safe collections. Networking Concepts: 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:

Fig:8.2 Network Layers 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 systemindependent network communication. However, to decide which Java classes your programs should use, you do need to understand how TCP and UDP differ. TCP: When two applications want to communicate to each other reliably, they establish a connection and send data back and forth over that connection. This is analogous to making a telephone call. If you want to speak to Aunt Beatrice in Kentucky, a connection is established when you dial her phone number and she answers. You send data back and forth over the
41

connection by speaking to one another over the phone lines. Like the phone company, TCP guarantees that data sent from one end of the connection actually gets to the other end and in the same order it was sent. Otherwise, an error is reported. TCP provides a point-to-point channel for applications that require reliable communications. The Hypertext Transfer Protocol (HTTP), File Transfer Protocol (FTP), and Telnet are all examples of applications that require a reliable communication channel. The order in which the data is sent and received over the network is critical to the success of these applications. When HTTP is used to read from a URL, the data must be received in the order in which it was sent. Otherwise, you end up with a jumbled HTML file, a corrupt zip file, or some other invalid information. TCP (Transmission Control Protocol) is a connection-based protocol that provides a reliable flow of data between two computers. UDP: The UDP protocol provides for communication that is not guaranteed between two applications on the network. UDP is not connection-based like TCP. Rather, it sends independent packets of data, called datagrams, from one application to another. Sending datagrams is much like sending a letter through the postal service: The order of delivery is not important and is not guaranteed, and each message is independent of any other. 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. For many applications, the guarantee of reliability is critical to the success of the transfer of information from one end of the connection to the other. However, other forms of communication don't require such strict standards. In fact, they may be slowed down by the extra overhead or the reliable connection may invalidate the service altogether. Consider, for example, a clock server that sends the current time to its client when requested to do so. If the client misses a packet, it doesn't really make sense to resend it because the time will be incorrect when the client receives it on the second try. If the client makes two requests and receives packets from the server out of order, it doesn't really matter because the client can figure out that the packets are out of order and make another request.
42

The reliability of TCP is unnecessary in this instance because it causes performance degradation and may hinder the usefulness of the service. Another example of a service that doesn't need the guarantee of a reliable channel is the ping command. The purpose of the ping command is to test the communication between two programs over the network. In fact, ping needs to know about dropped or out-of-order packets to determine how good or bad the connection is. A reliable channel would invalidate this service altogether. The UDP protocol provides for communication that is not guaranteed between two applications on the network. UDP is not connection-based like TCP. Rather, it sends independent packets of data from one application to another. Sending datagrams is much like sending a letter through the mail service: The order of delivery is not important and is not guaranteed, and each message is independent of any others. Understanding Ports: Generally speaking, a computer has a single physical connection to the network. All data destined for a particular computer arrives through that connection. However, the data may be intended for different applications running on the computer. So how does the computer know to which application to forward the data? Through the use of ports. Data transmitted over the Internet is accompanied by addressing information that identifies the computer and the port for which it is destined. The computer is identified by its 32-bit IP address, which IP uses to deliver data to the right computer on the network. Ports are identified by a 16-bit number, which TCP and UDP use to deliver the data to the right application. In connection-based communication such as TCP, a server application binds a socket to a specific port number. This has the effect of registering the server with the system to receive all data destined for that port. A client can then rendezvous with the server at the server's port, as illustrated here:

Fig : 8.3 Connection-based communication


43

The TCP and UDP protocols use ports to map incoming data to a particular process running on a computer. In datagram-based communication such as UDP, the datagram packet contains the port number of its destination and UDP routes the packet to the appropriate application, as illustrated in this figure:

Fig : 8.4 Datagram-based communication Port numbers range from 0 to 65,535 because ports are represented by 16-bit numbers. The port numbers ranging from 0 - 1023 are restricted; they are reserved for use by well-known services such as HTTP and FTP and other system services. These ports are called well-known ports. Your applications should not attempt to bind to them. 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, Reconnection, 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.

Overall Description: Productive: We Proposed System the MH check-pointing arrangement mechanism, seeking superior check-pointing arrangements to maximize the probability of distributed application
44

completion without sustaining an unrecoverable failure Using ReD Methodology. It deals with MoG check-pointing among neighboring MHs without any access point or BS. Checkpointing forces hosts involved in job execution to periodically save intermediate states, registers, process control blocks, messages, i.e. stability. Product Features: ReD is supported by a clustering algorithm, which partitions the global MoG into clusters, allowing ReD to quickly and concurrently find superior arrangements within each cluster instead of having to labor toward a global MoG solution. ReD makes decisions about whether to request, accept, or break check-pointing relationships, locally (at the MH level) and in a fully distributed manner, instead of attempting a high-level centralized or global consensus. ReD keeps checkpoint transmissions local, i.e., neighbor to neighbor, not requiring multiple hops and significant additional transmission overhead to achieve checkpointing relationships. ReD allows a given consumer or provider to break its existing checkpointing relationship (when a provider breaks a check-pointing relationship, a break message is transmitted to the consumer) only when the arrangement reliability improvement is significant, thus promoting stability. User Classes and Characteristics:

Node Multicast, Hello Receiver - send and receive all nodes information. Data send send information from source to destination via intermediate nodes. Receive local, Receiver send and receive request as well as response

information for nodes. Design and Implementation Constraints: Constraints in Analysis:

Constraints as Informal Text Constraints as Operational Restrictions Constraints Integrated in Existing Model Concepts Constraints as a Separate Concept Constraints Implied by the Model Structure
45

Constraints in Design:

Determination of the Involved Classes Determination of the Involved Objects Determination of the Involved Actions Determination of the Require Clauses Global actions and Constraint Realization

Constraints in Implementation: A hierarchical structuring of relations may result in more classes and a more complicated structure to implement. Therefore it is advisable to transform the hierarchical relation structure to a simpler structure such as a classical flat one. It is rather straightforward to transform the developed hierarchical model into a bipartite, flat model, consisting of classes on the one hand and flat relations on the other. Flat relations are preferred at the design level for reasons of simplicity and implementation ease. There is noid entity or functionality associated with a flat relation. A flat relation corresponds with the relation concept of entity-relationship modeling and many object oriented methods. System Features: ReDs algorithm takes into account desired behavioral controlling heuristics in the following ways. First, we require the MoG to be capable of autonomous operation Without an access point or BS and further to reduce the use of relatively unreliable wireless links. ReD ensures this by storing check-pointed data only at neighboring MHs, within the MoG, and not requiring BS access or checkpoint transmission over multiple hops. Second, in a MoG, dynamicity ensures that a check-pointing arrangement must be converged rapidly and efficiently, even though it may only be close to optimal. While it is true that poor check-pointing arrangements play a role in reducing the Ri, we seek to maximize, so too do unconverged arrangements(i.e., arrangements where a significant percentage of consumers are still seeking to establish check-pointing relationships with providers) External Interface Requirements: User Interfaces:

All the contents in the project are implemented using Graphical User Interface (GUI)

in Java through Java,J2me concepts with Serve let and Jsp concepts.
46

Jsp.

Every conceptual part of the projects is reflected using the Java,J2mewith Servlet and

System gets the input and delivers through the GUI based.

Hardware Interfaces: Ethernet: Ethernet on the AS/400 supports TCP/IP, Advanced Peer-to-Peer Networking (APPN) and advanced program-to-program communications(APPC) ISDN: We can connect your AS/400 to an Integrated Services Digital Network (ISDN) for faster, more accurate data transmission. An ISDN is a public or private digital communications network that can support data, fax, image, and other services over the same physical interface. Also, you can use other protocols on ISDN, such as IDLC and X.25. Software Interfaces: This software is interacted with the TCP/IP protocol, Socket and listening on unused ports. Server Socket and listening on unused ports and JDK 1.6 Communication Interfaces: The communication interfaces specify the various interfaces to communications such as local network protocols, etc. TCP/IP protocol. LAN settings.

APPENDIX B SOURCE CODE: Node coding: package com.Manets.Nodes; import java.awt.Color;


47

import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.net.ServerSocket; import java.net.Socket; import java.util.StringTokenizer; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JTextField; import com.Manets.util.ErrorManage; import com.Manets.util.PathEvaluation; public class Nodes { private JFrame frame; JPanel p; private JTextField forwardTxt, destTxt, msgTxt; private JLabel forwardLbl, destLbl, msgLbl; private Thread router11, router12; public Nodes() { frame = new JFrame("Node 1"); p=new JPanel(null); p.setBackground(Color.WHITE); forwardLbl = new JLabel("Forwarding To"); forwardLbl.setBounds(5, 5, 150, 25);
48

p.add(forwardLbl); forwardTxt = new JTextField(); forwardTxt.setBounds(150, 5, 200, 25); forwardTxt.setEditable(false); p.add(forwardTxt); destLbl = new JLabel("Destination"); destLbl.setBounds(5, 35, 150, 25); p.add(destLbl); destTxt = new JTextField(); destTxt.setBounds(150, 35, 200, 25); destTxt.setEditable(false); p.add(destTxt); msgLbl = new JLabel("Message"); msgLbl.setBounds(5, 65, 150, 25); p.add(msgLbl); msgTxt = new JTextField(); msgTxt.setBounds(150, 65, 200, 25); msgTxt.setEditable(false); p.add(msgTxt); frame.add(p); frame.setSize(360, 130); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setVisible(true);
49

msgRouting11(); router11.start(); msgRouting12(); router12.start(); recFileSer(); recFileCli(); } public void msgRouting11() { router11 = new Thread(new Runnable() { public void run() { try { do { String src, rtr1S, rtr2S,rtr3S, msgS, destS; ServerSocket rcvSkt1 = new ServerSocket(1122); Socket skt1 = rcvSkt1.accept(); ObjectInputStream rcvObj1 = new ObjectInputStream(skt1.getInputStream()); msgS = (String) rcvObj1.readObject(); StringTokenizer strItr = new StringTokenizer(msgS, "|",true); src = strItr.nextToken(); destS = strItr.nextToken(); destTxt.setText(destS); strItr.nextToken(); msgS = strItr.nextToken();
50

msgTxt.setText(msgS); PathEvaluation pe=new PathEvaluation(); } while (true); } catch (Exception e) { new ErrorManage("Node 1 : Interepted"); e.printStackTrace(); } } }); } public void forwardMsg1(String source, String router1, String router2,String destination, String message) { try { Socket sendSkt1 = new Socket(router2, 1133); ObjectOutputStream sendObj1 = new ObjectOutputStream(); String packMsg = source + "|" + router1 + "|" + router2 +"|"+ destination + sendObj1.writeObject(packMsg); } catch (Exception e) { new ErrorManage("Router 1 : Interepted"); e.printStackTrace(); } } "|"+message;

51

public void forwardMsg12(String source, String router1, String router3,String destination, String message) { try { Socket sendSkt1 = new Socket(router3, 2233); ObjectOutputStream sendObj1 = new ObjectOutputStream(); String packMsg = source + "|" + router1 + "|"+router3 +"|"+ destination + "|" + message; sendObj1.writeObject(packMsg); } catch (Exception e) { new ErrorManage("Router 1 : Interepted"); e.printStackTrace(); } } public void msgRouting12() { router12 = new Thread(new Runnable() { public void run() { try { do { String src, rtr1S, rtr2S,rtr3S,msgS, destS; ServerSocket rcvSkt2 = new ServerSocket(2211); Socket skt2 = rcvSkt2.accept(); ObjectInputStream rcvObj2 = new ObjectInputStream(skt2.getInputStream()); msgS = (String) rcvObj2.readObject();
52

StringTokenizer strItr = new StringTokenizer(msgS,"|",true); strItr.nextToken(); msgS = strItr.nextToken(); msgTxt.setText(msgS); PathEvaluation pe=new PathEvaluation(); int path=pe.pathselect(); skt2.close(); rcvSkt2.close(); } while (true); } catch (Exception e) { new ErrorManage("Router 1 : Interepted"); e.printStackTrace(); } } } } public void forwardMsg2(String source, String router1, String router2, String destination, String message) { try { Socket sendSkt2 = new Socket(router2, 3311); ObjectOutputStreamsendObj2=newObjectOutputStream(sendSkt2.getOutputStream()); sendObj2.flush(); String packMsg = source + "|" + router1 + "|" + router2 + "|" + destination + "|" + message;
53

endObj2.writeObject(packMsg); sendObj2.close(); sendSkt2.close(); } catch (Exception e) { new ErrorManage("Node 1 : Interepted"); e.printStackTrace(); } } public void recFileSer(){ Thread rt1 = new Thread(new Runnable() { public void run() { try { do { StringTokenizer ftDat = new StringTokenizer(data,"|",true); destTxt.setText(ftDat.nextToken()); ftDat.nextToken(); String fNme = ftDat.nextToken(); msgTxt.setText("File Transfer : "+fNme); sktFil.close(); rcvFil.close(); } while (true); } catch (Exception e) { new ErrorManage("Node 1 w: Interepted");
54

} } } rt1.start(); } public void recFileCli(){ Thread rt2 = new Thread(new Runnable() { public void run() { try { do { destTxt.setText(ftDat.nextToken()); ftDat.nextToken(); forwardTxt.setText(ftDat.nextToken()); ftDat.nextToken(); String fNme = ftDat.nextToken(); msgTxt.setText("File Transfer : "+fNme); } while (true); } catch (Exception e) { new ErrorManage("Node 1: Interepted"); } } }); rt2.start();
55

} } package com.Manets.Nodes; public class StartNodes { public static void main(String args[]) { new Nodes(); } } Node 1 coding: package com.Manets.Nodes1; import java.awt.Color; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.net.ServerSocket; import java.net.Socket; import java.util.StringTokenizer; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JTextField; import com.Manets.util.ErrorManage; import com.Manets.util.PathEvaluation;
56

public class Nodes1 { private JFrame frame; JPanel p; private JTextField forwardTxt, destTxt, msgTxt; private JLabel forwardLbl, destLbl, msgLbl; private Thread router11, router12; public Nodes1() { frame = new JFrame("Node 2"); p=new JPanel(null); p.setBackground(Color.WHITE); forwardLbl = new JLabel("Forwarding To"); forwardLbl.setBounds(5, 5, 150, 25); p.add(forwardLbl); forwardTxt = new JTextField(); forwardTxt.setBounds(150, 5, 200, 25); forwardTxt.setEditable(false); p.add(forwardTxt); destLbl = new JLabel("Destination"); destLbl.setBounds(5, 35, 150, 25); p.add(destLbl); destTxt = new JTextField(); destTxt.setBounds(150, 35, 200, 25); destTxt.setEditable(false);
57

p.add(destTxt); msgLbl = new JLabel("Message"); msgLbl.setBounds(5, 65, 150, 25); p.add(msgLbl); msgTxt = new JTextField(); msgTxt.setBounds(150, 65, 200, 25); msgTxt.setEditable(false); p.add(msgTxt); frame.add(p); frame.setSize(360, 130); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setVisible(true); msgRouting11(); router11.start(); msgRouting12(); router12.start(); recFileSer(); recFileCli(); } public void msgRouting11() { router11 = new Thread(new Runnable() { public void run() { try {
58

do { String src, rtr1S, rtr2S,rtr3S, msgS, destS; ServerSocket rcvSkt1 = new ServerSocket(1122); Socket skt1 = rcvSkt1.accept(); ObjectInputStream rcvObj1 = new ObjectInputStream(skt1.getInputStream()); msgS = (String) rcvObj1.readObject(); StringTokenizer strItr = new StringTokenizer(msgS, "|",true); src = strItr.nextToken(); destS = strItr.nextToken(); destTxt.setText(destS); strItr.nextToken(); msgS = strItr.nextToken(); msgTxt.setText(msgS); PathEvaluation pe=new PathEvaluation(); } while (true); } catch (Exception e) { new ErrorManage("Node 1 : Interepted"); e.printStackTrace(); } } }); }

59

public void forwardMsg1(String source, String router1, String router2,String destination, String message) { try { Socket sendSkt1 = new Socket(router2, 1133); ObjectOutputStream sendObj1 = new ObjectOutputStream(); String packMsg = source + "|" + router1 + "|" + router2 +"|"+ destination + "|" + message; sendObj1.writeObject(packMsg); } catch (Exception e) { new ErrorManage("Router 1 : Interepted"); e.printStackTrace(); } } public void forwardMsg12(String source, String router1, String router3,String destination, String message) { try { Socket sendSkt1 = new Socket(router3, 2233); ObjectOutputStream sendObj1 = new ObjectOutputStream(); String packMsg = source + "|" + router1 + "|"+router3 +"|"+ destination + "|" + message; sendObj1.writeObject(packMsg); } catch (Exception e) { new ErrorManage("Router 1 : Interepted"); e.printStackTrace(); }
60

} public void msgRouting12() { router12 = new Thread(new Runnable() { public void run() { try { do { String src, rtr1S, rtr2S,rtr3S,msgS, destS; ServerSocket rcvSkt2 = new ServerSocket(2211); Socket skt2 = rcvSkt2.accept(); ObjectInputStream rcvObj2 = new ObjectInputStream(); msgS = (String) rcvObj2.readObject(); StringTokenizer strItr = new StringTokenizer(msgS,"|",true); strItr.nextToken(); msgS = strItr.nextToken(); msgTxt.setText(msgS); PathEvaluation pe=new PathEvaluation(); int path=pe.pathselect(); skt2.close(); rcvSkt2.close(); } while (true); } catch (Exception e) { new ErrorManage("Router 1 : Interepted"); e.printStackTrace();
61

} } }); } public void forwardMsg2(String source, String router1, String router2, String destination, String message) { try { Socket sendSkt2 = new Socket(router2, 3311); ObjectOutputStream sendObj2 = new ObjectOutputStream); sendObj2.flush(); String packMsg = source + "|" + router1 + "|" + router2 + "|" + destination + "|" + message; sendObj2.writeObject(packMsg); sendObj2.close(); sendSkt2.close(); } catch (Exception e) { new ErrorManage("Node 1 : Interepted"); e.printStackTrace(); } } public void recFileSer(){ Thread rt1 = new Thread(new Runnable() { public void run() { try {
62

do { StringTokenizer ftDat = new StringTokenizer(data,"|",true); destTxt.setText(ftDat.nextToken()); ftDat.nextToken(); String fNme = ftDat.nextToken(); msgTxt.setText("File Transfer : "+fNme); } while (true); } catch (Exception e) { new ErrorManage("Node 1 w: Interepted"); } } }); rt1.start(); } public void recFileCli(){ Thread rt2 = new Thread(new Runnable() { public void run() { try { do { destTxt.setText(ftDat.nextToken()); ftDat.nextToken(); forwardTxt.setText(ftDat.nextToken()); ftDat.nextToken();
63

String fNme = ftDat.nextToken(); msgTxt.setText("File Transfer : "+fNme); } while (true); } catch (Exception e) { new ErrorManage("Node 1: Interepted"); } } }); rt2.start(); } } package com.Manets.Nodes1; public class StartNodes1 { public static void main(String args[]) { new Nodes1(); } } Node 2 coding: package com.Manets.Nodes2; import java.awt.Color; import java.io.ObjectInputStream;
64

import java.io.ObjectOutputStream; import java.net.ServerSocket; import java.net.Socket; import java.util.StringTokenizer; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JTextField; import com.Manets.util.ErrorManage; import com.Manets.util.PathEvaluation; public class Nodes2 { private JFrame frame; JPanel p; private JTextField forwardTxt, destTxt, msgTxt; private JLabel forwardLbl, destLbl, msgLbl; private Thread router11, router12; public Nodes2() { frame = new JFrame("Node 2"); p=new JPanel(null); p.setBackground(Color.WHITE); forwardLbl = new JLabel("Forwarding To"); forwardLbl.setBounds(5, 5, 150, 25); p.add(forwardLbl);
65

forwardTxt = new JTextField(); forwardTxt.setBounds(150, 5, 200, 25); forwardTxt.setEditable(false); p.add(forwardTxt);

destLbl = new JLabel("Destination"); destLbl.setBounds(5, 35, 150, 25); p.add(destLbl); destTxt = new JTextField(); destTxt.setBounds(150, 35, 200, 25); destTxt.setEditable(false); p.add(destTxt); msgLbl = new JLabel("Message"); msgLbl.setBounds(5, 65, 150, 25); p.add(msgLbl); msgTxt = new JTextField(); msgTxt.setBounds(150, 65, 200, 25); msgTxt.setEditable(false); p.add(msgTxt); frame.add(p); frame.setSize(360, 130); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setVisible(true);
66

msgRouting11(); router11.start(); msgRouting12(); router12.start(); recFileSer(); recFileCli(); } public void msgRouting11() { router11 = new Thread(new Runnable() { public void run() { try { do { String src, rtr1S, rtr2S,rtr3S, msgS, destS; ServerSocket rcvSkt1 = new ServerSocket(1122); Socket skt1 = rcvSkt1.accept(); ObjectInputStream rcvObj1 = new ObjectInputStream(skt1 .getInputStream()); msgS = (String) rcvObj1.readObject(); StringTokenizer strItr = new StringTokenizer(msgS, "|", true); src = strItr.nextToken();
67

destS = strItr.nextToken(); destTxt.setText(destS); strItr.nextToken(); msgS = strItr.nextToken(); msgTxt.setText(msgS); PathEvaluation pe=new PathEvaluation(); } while (true); } catch (Exception e) { new ErrorManage("Node 1 : Interepted"); e.printStackTrace(); } } }); } public void forwardMsg1(String source, String router1, String router2,String destination, String message) { try { Socket sendSkt1 = new Socket(router2, 1133); ObjectOutputStream sendObj1 = new ObjectOutputStream(); String packMsg = source + "|" + router1 + "|" + router2 +"|"+ destination + "|" + message; sendObj1.writeObject(packMsg); } catch (Exception e) { new ErrorManage("Router 1 : Interepted");
68

e.printStackTrace(); } } public void forwardMsg12(String source, String router1, String router3,String destination, String message) { try { Socket sendSkt1 = new Socket(router3, 2233); ObjectOutputStream sendObj1 = new ObjectOutputStream(); String packMsg = source + "|" + router1 + "|"+router3 +"|"+ destination + "|" + message; sendObj1.writeObject(packMsg); } catch (Exception e) { new ErrorManage("Router 1 : Interepted"); e.printStackTrace(); } } public void msgRouting12() { router12 = new Thread(new Runnable() { public void run() { try { do { String src, rtr1S, rtr2S,rtr3S,msgS, destS; ServerSocket rcvSkt2 = new ServerSocket(2211); Socket skt2 = rcvSkt2.accept();
69

ObjectInputStream rcvObj2 = new ObjectInputStream(); msgS = (String) rcvObj2.readObject(); StringTokenizer strItr = new StringTokenizer(msgS,"|",true); strItr.nextToken(); msgS = strItr.nextToken(); msgTxt.setText(msgS); PathEvaluation pe=new PathEvaluation(); int path=pe.pathselect(); skt2.close(); rcvSkt2.close(); } while (true); } catch (Exception e) { new ErrorManage("Router 1 : Interepted"); e.printStackTrace(); } } }); } public void forwardMsg2(String source, String router1, String router2, String destination, String message) { try { Socket sendSkt2 = new Socket(router2, 3311); ObjectOutputStream sendObj2 = new ObjectOutputStream);
70

sendObj2.flush(); String packMsg = source + "|" + router1 + "|" + router2 + "|" + destination + "|" + message; sendObj2.writeObject(packMsg); sendObj2.close(); sendSkt2.close(); } catch (Exception e) { new ErrorManage("Node 1 : Interepted"); e.printStackTrace(); } } public void recFileSer(){ Thread rt1 = new Thread(new Runnable() { public void run() { try { do { StringTokenizer ftDat = new StringTokenizer(data,"|",true); destTxt.setText(ftDat.nextToken()); ftDat.nextToken(); String fNme = ftDat.nextToken(); msgTxt.setText("File Transfer : "+fNme); } while (true); } catch (Exception e) { new ErrorManage("Node 1 w: Interepted");
71

} } }); rt1.start(); } public void recFileCli(){ Thread rt2 = new Thread(new Runnable() { public void run() { try { do { destTxt.setText(ftDat.nextToken()); ftDat.nextToken(); forwardTxt.setText(ftDat.nextToken()); ftDat.nextToken(); String fNme = ftDat.nextToken(); msgTxt.setText("File Transfer : "+fNme); } while (true); } catch (Exception e) { new ErrorManage("Node 1: Interepted"); } } }); rt2.start();
72

} } package com.Manets.Nodes2; public class StartNode2 { public static void main(String args[]) { new Nodes2(); } } Receiver coding: package com.Manets.Receiver; import java.awt.Color; import java.awt.Font; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.net.InetAddress; import java.net.ServerSocket;
73

import java.net.Socket; import java.net.UnknownHostException; import java.util.ArrayList; import java.util.Iterator; import java.util.Random; import java.util.StringTokenizer; import javax.swing.ImageIcon; import javax.swing.JButton; import javax.swing.JComboBox; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JList; import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JTextArea; import javax.swing.JTextField; import com.Manets.util.AvailableNodes; import com.Manets.util.ErrorManage; import com.Manets.util.MessageDisplay; import com.Manets.util.PathEvaluation; public class Receiver{ public static JFrame serverFrame;
74

public static JPanel serverPanel; public static JLabel message, selectRtrL1, recieved, choose, sender,Title,imgLabel; public static JList destList; public static JTextArea msgReciever, msgSender,sendMsg; public static JTextField fileLoc, byteDisp; public static JButton sendButton, openButton, transFile; public static JScrollPane scrollRecv, scrollList, scrollSend,scrollRecv1; public static Thread rcvThread, sndThread,rcvThread1; public static ArrayList<String> netView; public static String netViewArr[], dest, msg, rtr1, rtr2,rtr3, packMsg; public Receiver(String node1, String node2,String node3 ) { rtr1 = node1; rtr2 = node2; rtr3 = node3; AvailableNodes nodes = new AvailableNodes(); netView = nodes.addAvailNode(); netViewArr = (String[]) netView.toArray(new String[netView.size()]); serverFrame = new JFrame("Receiver"); serverPanel=new JPanel(null); serverPanel.setBackground(Color.WHITE); selectRtrL1 = new JLabel("Select Receiver Nodes"); selectRtrL1.setForeground(new java.awt.Color(204, 0, 102));
75

selectRtrL1.setBounds(30, 80, 200, 25); serverPanel.add(selectRtrL1); Title=new JLabel("Decentralized QOS CheckPoint"); Title.setFont(new java.awt.Font("Comic Sans MS", 1, 36)); Title.setForeground(new java.awt.Color(0, 0, 255)); Title.setBounds(210,5, 600,40); serverPanel.add(Title); destList = new JList(netViewArr); scrollList = new JScrollPane(destList); scrollList.setBounds(30, 115, 250, 85); serverPanel.add(scrollList); message = new JLabel("Message"); message.setForeground(new java.awt.Color(204, 0, 102)); message.setBounds(350, 80, 150, 25); serverPanel.add(message); sendMsg = new JTextArea(); scrollRecv1 = new JScrollPane(sendMsg); sendMsg.setEditable(true); scrollRecv1.setBounds(350, 115, 350, 100); serverPanel.add(scrollRecv1); sendButton = new JButton("SEND"); sendButton.setForeground(new java.awt.Color(204, 0, 102)); sendButton.setBounds(350, 230, 90, 25);
76

sendButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { dest = (String) destList.getSelectedValue(); if (dest != null) { msg = sendMsg.getText(); msgSender(); sndThread.start(); sendMsg.setText(""); sendMsg.requestFocus(true); } else { new ErrorManage("Please Select Your Reciver"); } } }); serverPanel.add(sendButton); recieved = new JLabel("Reciever Details"); recieved.setForeground(new java.awt.Color(204, 0, 102)); recieved.setBounds(30, 230, 150, 25); serverPanel.add(recieved); msgReciever = new JTextArea(); scrollRecv = new JScrollPane(msgReciever); msgReciever.setEditable(false); scrollRecv.setBounds(30, 270, 280, 50);
77

serverPanel.add(scrollRecv); sender = new JLabel("Sender"); sender.setForeground(new java.awt.Color(204, 0, 102)); sender.setBounds(30, 340, 150, 25); serverPanel.add(sender); msgSender = new JTextArea(); scrollSend = new JScrollPane(msgSender); msgSender.setEditable(false); scrollSend.setBounds(30, 380, 280, 50); serverPanel.add(scrollSend); choose = new JLabel("Choose File"); choose.setForeground(new java.awt.Color(204, 0, 102)); choose.setBounds(350, 270, 80, 25); serverPanel.add(choose); fileLoc = new JTextField(); fileLoc.setBounds(350, 310, 200, 25); serverPanel.add(fileLoc); openButton = new JButton("Open"); openButton.setForeground(new java.awt.Color(204, 0, 102)); openButton.setBounds(560, 310, 80, 25); serverPanel.add(openButton); openButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) {
78

com.Manets.util.FileChoose sel = new com.Manets.util.FileChoose(); fileLoc.setText(sel.fileSelectionTool()); } }); transFile = new JButton("Send File"); transFile.setForeground(new java.awt.Color(204, 0, 102)); transFile.setBounds(350, 380, 100, 25); transFile.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { if(!fileLoc.getText().equals("")){ sendFile(); } else{ new ErrorManage("Please select a file to transfer"); } } }); serverPanel.add(transFile); byteDisp = new JTextField(); byteDisp.setEditable(false); byteDisp.setVisible(false); byteDisp.setBounds(300, 640, 280, 25); serverPanel.add(byteDisp);
79

imgLabel = new JLabel(new ImageIcon("./Comp/images/back1.jpg")); imgLabel.setBounds(0, 0, 800, 500); serverPanel.add(imgLabel); serverFrame.add(serverPanel); serverFrame.setSize(800, 500); serverFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); serverFrame.setVisible(true); sendMsg.requestFocus(true); msgReciever(); rcvThread.start(); msgReciever1(); rcvThread1.start(); recieveFile(); } public void msgReciever() { rcvThread = new Thread(new Runnable() { public void run() { try { do { String src, rtr11, rtr12,rtr13, msg, dest1; String s1=null,s2=null,s3=null,s4=null; ServerSocket rcvSkt = new ServerSocket( 3333); Socket skt = rcvSkt.accept();
80

ObjectInputStream rcvObj = new ObjectInputStream(skt .getInputStream()); String rcvMsg = (String) rcvObj.readObject(); StringTokenizer strItr = new StringTokenizer(rcvMsg, "|", true); src = strItr.nextToken(); dest1 = strItr.nextToken(); strItr.nextToken(); msg = strItr.nextToken(); msgReciever.append(src+ ">>" + msg + "\n"); PathEvaluation pe=new PathEvaluation(); ArrayList<String> array=new ArrayList<String>(); array=pe.pathdisplay(); Iterator<String> it=array.iterator(); while(it.hasNext()) { s1=it.next(); s2=it.next(); s3=it.next(); s4=it.next(); } new MessageDisplay(src,rtr1,rtr2,dest,msg,s1,s2); skt.close();
81

rcvSkt.close(); } while (true); } catch (Exception e) { new ErrorManage("Please Try again later Your Intermediate Nodes are Incorrect"); System.exit(0); } } }); } public void msgReciever1() { rcvThread1 = new Thread(new Runnable() { public void run() { try { do { String src, rtr11, rtr12,rtr13, msg, dest1; String s1=null,s2=null,s3=null,s4=null; ServerSocket rcvSkt = new ServerSocket( 6666); Socket skt = rcvSkt.accept(); ObjectInputStream rcvObj = new ObjectInputStream(skt .getInputStream()); String rcvMsg = (String) rcvObj.readObject(); StringTokenizer strItr = new StringTokenizer(rcvMsg, "|", true);
82

dest1 = strItr.nextToken(); strItr.nextToken(); msg = strItr.nextToken(); msgReciever.append(src+ ">>" + msg + "\n"); PathEvaluation pe=new PathEvaluation(); ArrayList<String> array=new ArrayList<String>(); array=pe.pathdisplay(); Iterator<String> it=array.iterator(); while(it.hasNext()) { s1=it.next(); s2=it.next(); s3=it.next(); s4=it.next(); } new MessageDisplay(src,rtr1,rtr3,dest,msg,s3,s4); skt.close(); rcvSkt.close(); } while (true); } catch (Exception e) { new ErrorManage("Please Try again later"); System.exit(0); }
83

} }); } public void msgSender() { sndThread = new Thread(new Runnable() { public void run() { try { String sndr = InetAddress.getLocalHost().getHostName(); Socket sendSkt = new Socket(rtr1, 1122); ObjectOutputStream sendObj = new ObjectOutputStream(sendSkt.getOutputStream()); sendObj.flush(); packMsg = sndr + "|"+ rtr1 + "|" + rtr2 + "|"+rtr3+"|"+ dest + "|" + msg; JOptionPane.showMessageDialog(null,"U Have a Message"); msgSender.append("YOU >> " + msg + "\n"); } catch (Exception e) { new ErrorManage("Please Try again later"); System.exit(0); } } }); } public void sendFile() { Thread sndFT = new Thread(new Runnable() {
84

public void run() { try { byteDisp.setVisible(true); String sndFileNme = fileLoc.getText(); StringTokenizer st = new StringTokenizer(sndFileNme, "\\",true); Socket conClient = new Socket((String) destList.getSelectedValue(), 9876); ObjectOutputStream sf = new ObjectOutputStream(conClient.getOutputStream()); sf.writeObject(sndFileNme); String fileName = fileLoc.getText(); File file = new File(fileName); FileInputStream fileIn1 = new FileInputStream(file); int len1; byteDisp.setText("Sending Completed..."); byteDisp.setVisible(false); conClient.close(); } catch (UnknownHostException e) { new ErrorManage("You have selected invalid System"); } catch (IOException e) { e.printStackTrace(); } } }); sndFT.start();
85

} public void recieveFile() { Thread filRcvTrd = new Thread(new Runnable() { public void run() { try { do { byteDisp.setVisible(true); ServerSocket recieve = new ServerSocket(6789); Socket rcvSck = recieve.accept(); String fileNme = (String) rcvFile.readObject(); fileNme = ".\\Comp\\Recieved Files\\" + fileNme; System.out.println(fileNme); File file = new File(fileNme); FileOutputStream fileOut = new FileOutputStream(file); int buf; } while (true); } catch (IOException e) { e.printStackTrace(); } catch (ClassNotFoundException e) { e.printStackTrace(); } } });
86

} } package com.Manets.Receiver; import java.awt.BorderLayout; import java.awt.Color; import java.awt.Font; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.util.ArrayList; import javax.swing.ImageIcon; import javax.swing.JButton; import javax.swing.JComboBox; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JProgressBar; import javax.swing.JWindow; import com.Manets.util.AvailableNodes; public class ReceverInit { private JWindow window; private JPanel splashPan, routerPan; private JLabel imgLabel, braLabel, selectRtrL1, selectRtrL2,selectRtrL3; private JProgressBar prg;
87

private JComboBox selectRtr1, selectRtr2,selectRtr3; private JButton continueButton; private Thread splash; private ArrayList<String> netView; private String netViewArr[]; private int prgMin = 0, prgMax = 100; private boolean router1Flg = false, router2Flg = false,router3Flg = false; public ReceverInit() { AvailableNodes nodes = new AvailableNodes(); netView = nodes.addAvailNode(); netViewArr = (String[]) netView.toArray(new String[netView.size()]); window = new JWindow(); splashPanel(); window.add(splashPan); window.setLocation(300, 200); window.setSize(400, 300); window.setVisible(true); } public void splashPanel() { splashPan = new JPanel(); splashPan.setBackground(Color.white); splashPan.setLayout(new BorderLayout()); imgLabel = new JLabel(new ImageIcon("./Comp/images/data.jpg"));
88

//splashPan.add(imgLabel, BorderLayout.EAST); braLabel = new JLabel("Decentralized Qos CheckPoints"); Font font = new Font("Garamond", Font.BOLD, 28); braLabel.setFont(font); splashPan.add(braLabel, BorderLayout.CENTER); prg = new JProgressBar(); splashPan.add(prg, BorderLayout.SOUTH); splash = new Thread(new Runnable() { public void run() { for (int prgSt = prgMin; prgSt <= prgMax; prgSt++) { prg.setValue(prgSt); try { Thread.sleep(100); } catch (InterruptedException e) { e.printStackTrace(); } } splashPan.setVisible(false); selectRouter(); window.add(routerPan); window.setVisible(true); } });
89

splash.start(); } public void selectRouter() { routerPan = new JPanel(); routerPan.setLayout(null); routerPan.setBackground(Color.decode("#05294c")); selectRtrL1 = new JLabel("Select Node1"); selectRtrL1.setBounds(5, 35, 200, 25); selectRtrL1.setForeground(Color.WHITE); routerPan.add(selectRtrL1); selectRtr1 = new JComboBox(netViewArr); selectRtr1.setBounds(100, 35, 280, 25); routerPan.add(selectRtr1); selectRtr1.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { try { //Socket testPort = new Socket(selectRtr1.getSelectedItem().toString(), 1122); router1Flg = true; //testPort.close(); if (router1Flg == true && router2Flg == true && router3Flg == true ) { continueButton.setVisible(true); } } catch (Exception e1) {
90

new com.Manets.util.ErrorManage("You Have Selected a Invalid Node1"); } } }); selectRtrL2 = new JLabel("Select Node2"); selectRtrL2.setForeground(Color.WHITE); selectRtrL2.setBounds(5, 65, 200, 25); routerPan.add(selectRtrL2); selectRtr2 = new JComboBox(netViewArr); selectRtr2.setBounds(100, 65, 280, 25); routerPan.add(selectRtr2); selectRtr2.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { try { if (router1Flg == true && router2Flg == true && router3Flg == true) { continueButton.setVisible(true); } } catch (Exception e1) { new com.Manets.util.ErrorManage("You Have Selected a Invalid Node2"); } } }); selectRtrL3 = new JLabel("Select Node3");
91

selectRtrL3.setForeground(Color.WHITE); selectRtrL3.setBounds(5, 95, 200, 25); routerPan.add(selectRtrL3); selectRtr3 = new JComboBox(netViewArr); selectRtr3.setBounds(100, 95, 280, 25); routerPan.add(selectRtr3); selectRtr3.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { try { if (router1Flg == true && router2Flg == true && router3Flg == true) { continueButton.setVisible(true); } } catch (Exception e1) { new com.Manets.util.ErrorManage("You Have Selected a Invalid Node3"); } } }); continueButton = new JButton("Continue"); routerPan.add(continueButton); } } package com.Manets.Receiver; public class StartReciever {
92

public static void main(String[] args) { new RecieverInit(); } }

Server coding: package com.Manets.Server; import java.awt.Color; import java.awt.Font; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.net.InetAddress; import java.net.ServerSocket; import java.net.Socket; import java.net.UnknownHostException; import java.util.ArrayList; import java.util.Iterator;
93

import java.util.Random; import java.util.StringTokenizer; import javax.swing.ImageIcon; import javax.swing.JButton; import javax.swing.JComboBox; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JList; import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JTextArea; import javax.swing.JTextField; import com.Manets.util.AvailableNodes; import com.Manets.util.ErrorManage; import com.Manets.util.MessageDisplay; import com.Manets.util.PathEvaluation; public class Server { public static JFrame serverFrame; public static JPanel serverPanel; public static JLabel message, selectRtrL1, recieved, choose, sender,Title,imgLabel; public static JList destList; public static JTextArea msgReciever, msgSender,sendMsg;
94

public static JTextField fileLoc, byteDisp; public static JButton sendButton, openButton, transFile; public static JScrollPane scrollRecv, scrollList, scrollSend,scrollRecv1; public static Thread rcvThread, sndThread,rcvThread1; public static ArrayList<String> netView; public static String netViewArr[], dest, msg, rtr1, rtr2,rtr3, packMsg; public Server(String node1, String node2,String node3 ) { rtr1 = node1; rtr2 = node2; rtr3 = node3; AvailableNodes nodes = new AvailableNodes(); netView = nodes.addAvailNode(); netViewArr = (String[]) netView.toArray(new String[netView.size()]); serverFrame = new JFrame("Sender"); serverPanel=new JPanel(null); serverPanel.setBackground(Color.WHITE); //serverFrame.setLayout(null); selectRtrL1 = new JLabel("Select Receiver Nodes"); selectRtrL1.setForeground(new java.awt.Color(204, 0, 102)); selectRtrL1.setBounds(30, 80, 200, 25); serverPanel.add(selectRtrL1); Title=new JLabel("Decentralized QOS CheckPoint");
95

Title.setFont(new java.awt.Font("Comic Sans MS", 1, 36)); Title.setForeground(new java.awt.Color(0, 0, 255)); Title.setBounds(210,5, 600,40); serverPanel.add(Title); destList = new JList(netViewArr); scrollList = new JScrollPane(destList); scrollList.setBounds(30, 115, 250, 85); serverPanel.add(scrollList); message = new JLabel("Message"); message.setForeground(new java.awt.Color(204, 0, 102)); message.setBounds(350, 80, 150, 25); serverPanel.add(message); sendMsg = new JTextArea(); scrollRecv1 = new JScrollPane(sendMsg); sendMsg.setEditable(true); scrollRecv1.setBounds(350, 115, 350, 100); serverPanel.add(scrollRecv1); sendButton = new JButton("SEND"); sendButton.setForeground(new java.awt.Color(204, 0, 102)); sendButton.setBounds(350, 230, 90, 25); sendButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { dest = (String) destList.getSelectedValue();
96

if (dest != null) { msg = sendMsg.getText(); msgSender(); sndThread.start(); sendMsg.setText(""); sendMsg.requestFocus(true); } else { new ErrorManage("Please Select Your Reciver"); } } }); serverPanel.add(sendButton); recieved = new JLabel("Reciever Details"); recieved.setForeground(new java.awt.Color(204, 0, 102)); recieved.setBounds(30, 230, 150, 25); serverPanel.add(recieved); msgReciever = new JTextArea(); scrollRecv = new JScrollPane(msgReciever); msgReciever.setEditable(false); scrollRecv.setBounds(30, 270, 280, 50); serverPanel.add(scrollRecv); sender = new JLabel("Sender"); sender.setForeground(new java.awt.Color(204, 0, 102));
97

sender.setBounds(30, 340, 150, 25); serverPanel.add(sender); msgSender = new JTextArea(); scrollSend = new JScrollPane(msgSender); msgSender.setEditable(false); scrollSend.setBounds(30, 380, 280, 50); serverPanel.add(scrollSend); choose = new JLabel("Choose File"); choose.setForeground(new java.awt.Color(204, 0, 102)); choose.setBounds(350, 270, 80, 25); serverPanel.add(choose); fileLoc = new JTextField(); fileLoc.setBounds(350, 310, 200, 25); serverPanel.add(fileLoc); openButton = new JButton("Open"); openButton.setForeground(new java.awt.Color(204, 0, 102)); openButton.setBounds(560, 310, 80, 25); serverPanel.add(openButton); openButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { com.Manets.util.FileChoose sel = new com.Manets.util.FileChoose(); fileLoc.setText(sel.fileSelectionTool()); }
98

}); transFile = new JButton("Send File"); transFile.setForeground(new java.awt.Color(204, 0, 102)); transFile.setBounds(350, 380, 100, 25); transFile.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { if(!fileLoc.getText().equals("")){ sendFile(); } else{ new ErrorManage("Please select a file to transfer"); } } }); serverPanel.add(transFile); byteDisp = new JTextField(); byteDisp.setEditable(false); byteDisp.setVisible(false); byteDisp.setBounds(300, 640, 280, 25); serverPanel.add(byteDisp); imgLabel = new JLabel(new ImageIcon("./Comp/images/back1.jpg")); imgLabel.setBounds(0, 0, 800, 500); serverPanel.add(imgLabel);
99

serverFrame.add(serverPanel); serverFrame.setSize(800, 500); serverFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); serverFrame.setVisible(true); sendMsg.requestFocus(true); msgReciever(); rcvThread.start(); msgReciever1(); rcvThread1.start(); recieveFile(); } public void msgReciever() { rcvThread = new Thread(new Runnable() { public void run() { try { do { String src, rtr11, rtr12,rtr13, msg, dest1; String s1=null,s2=null,s3=null,s4=null; ServerSocket rcvSkt = new ServerSocket( 3333); Socket skt = rcvSkt.accept(); ObjectInputStream rcvObj = new ObjectInputStream(skt .getInputStream()); String rcvMsg = (String) rcvObj.readObject();
100

StringTokenizer strItr = new StringTokenizer(rcvMsg, "|",true); src = strItr.nextToken(); dest1 = strItr.nextToken(); strItr.nextToken(); msg = strItr.nextToken(); msgReciever.append(src+ ">>" + msg + "\n"); PathEvaluation pe=new PathEvaluation(); ArrayList<String> array=new ArrayList<String>(); array=pe.pathdisplay(); Iterator<String> it=array.iterator(); while(it.hasNext()) { s1=it.next(); s2=it.next(); s3=it.next(); s4=it.next(); } new MessageDisplay(src,rtr1,rtr2,dest,msg,s1,s2); skt.close(); rcvSkt.close(); } while (true); } catch (Exception e) { new ErrorManage("Please Try again later Your Intermediate Nodes are Incorrect");
101

System.exit(0); } } }); } public void msgReciever1() { rcvThread1 = new Thread(new Runnable() { public void run() { try { do { String src, rtr11, rtr12,rtr13, msg, dest1; String s1=null,s2=null,s3=null,s4=null; ServerSocket rcvSkt = new ServerSocket( 6666); Socket skt = rcvSkt.accept(); ObjectInputStream rcvObj = new ObjectInputStream(skt .getInputStream()); String rcvMsg = (String) rcvObj.readObject(); StringTokenizer strItr = new StringTokenizer(rcvMsg, "|",true); dest1 = strItr.nextToken(); strItr.nextToken(); msg = strItr.nextToken(); msgReciever.append(src+ ">>" + msg + "\n"); PathEvaluation pe=new PathEvaluation();
102

ArrayList<String> array=new ArrayList<String>(); array=pe.pathdisplay(); Iterator<String> it=array.iterator(); while(it.hasNext()) { s1=it.next(); s2=it.next(); s3=it.next(); s4=it.next(); } new MessageDisplay(src,rtr1,rtr3,dest,msg,s3,s4); skt.close(); rcvSkt.close(); } while (true); } catch (Exception e) { new ErrorManage("Please Try again later"); System.exit(0); } } }); } public void msgSender() { sndThread = new Thread(new Runnable() {
103

public void run() { try { String sndr = InetAddress.getLocalHost().getHostName(); Socket sendSkt = new Socket(rtr1, 1122); ObjectOutputStream sendObj = new ObjectOutputStream(sendSkt.getOutputStream()); sendObj.flush(); packMsg = sndr + "|"+ rtr1 + "|" + rtr2 + "|"+rtr3+"|"+ dest + "|" + msg; JOptionPane.showMessageDialog(null,"U Have a Message"); msgSender.append("YOU >> " + msg + "\n"); } catch (Exception e) { new ErrorManage("Please Try again later"); System.exit(0); } } }); } public void sendFile() { Thread sndFT = new Thread(new Runnable() { public void run() { try { byteDisp.setVisible(true); String sndFileNme = fileLoc.getText(); StringTokenizer st = new StringTokenizer(sndFileNme, "\\",true);
104

Socket conClient = new Socket((String) destList.getSelectedValue(), 9876); ObjectOutputStream sf = new ObjectOutputStream(conClient.getOutputStream()); sf.writeObject(sndFileNme); String fileName = fileLoc.getText(); File file = new File(fileName); FileInputStream fileIn1 = new FileInputStream(file); int len1; byteDisp.setText("Sending Completed..."); byteDisp.setVisible(false); conClient.close(); } catch (UnknownHostException e) { new ErrorManage("You have selected invalid System"); } catch (IOException e) { e.printStackTrace(); } } }); sndFT.start(); } public void recieveFile() { Thread filRcvTrd = new Thread(new Runnable() { public void run() { try {
105

do { byteDisp.setVisible(true); ServerSocket recieve = new ServerSocket(6789); Socket rcvSck = recieve.accept(); String fileNme = (String) rcvFile.readObject(); fileNme = ".\\Comp\\Recieved Files\\" + fileNme; System.out.println(fileNme); File file = new File(fileNme); FileOutputStream fileOut = new FileOutputStream(file); int buf; } while (true); } catch (IOException e) { e.printStackTrace(); } catch (ClassNotFoundException e) { e.printStackTrace(); } } }); } } package com.Manets.Server; import java.awt.BorderLayout; import java.awt.Color;
106

import java.awt.Font; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.util.ArrayList; import javax.swing.ImageIcon; import javax.swing.JButton; import javax.swing.JComboBox; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JProgressBar; import javax.swing.JWindow; import com.Manets.util.AvailableNodes; public class ServerInit { private JWindow window; private JPanel splashPan, routerPan; private JLabel imgLabel, braLabel, selectRtrL1, selectRtrL2,selectRtrL3; private JProgressBar prg; private JComboBox selectRtr1, selectRtr2,selectRtr3; private JButton continueButton; private Thread splash; private ArrayList<String> netView; private String netViewArr[];
107

private int prgMin = 0, prgMax = 100; private boolean router1Flg = false, router2Flg = false,router3Flg = false; public ServerInit() { AvailableNodes nodes = new AvailableNodes(); netView = nodes.addAvailNode(); netViewArr = (String[]) netView.toArray(new String[netView.size()]); window = new JWindow(); splashPanel(); window.add(splashPan); window.setLocation(300, 200); window.setSize(400, 300); window.setVisible(true); } public void splashPanel() { splashPan = new JPanel(); splashPan.setBackground(Color.white); splashPan.setLayout(new BorderLayout()); imgLabel = new JLabel(new ImageIcon("./Comp/images/data.jpg")); //splashPan.add(imgLabel, BorderLayout.EAST); braLabel = new JLabel("Decentralized Qos CheckPoints"); Font font = new Font("Garamond", Font.BOLD, 28); braLabel.setFont(font); splashPan.add(braLabel, BorderLayout.CENTER);
108

prg = new JProgressBar(); splashPan.add(prg, BorderLayout.SOUTH); splash = new Thread(new Runnable() { public void run() { for (int prgSt = prgMin; prgSt <= prgMax; prgSt++) { prg.setValue(prgSt); try { Thread.sleep(100); } catch (InterruptedException e) { e.printStackTrace(); } } splashPan.setVisible(false); selectRouter(); window.add(routerPan); window.setVisible(true); } }); splash.start(); } public void selectRouter() { routerPan = new JPanel(); routerPan.setLayout(null);
109

routerPan.setBackground(Color.decode("#05294c")); selectRtrL1 = new JLabel("Select Node1"); selectRtrL1.setBounds(5, 35, 200, 25); selectRtrL1.setForeground(Color.WHITE); routerPan.add(selectRtrL1); selectRtr1 = new JComboBox(netViewArr); selectRtr1.setBounds(100, 35, 280, 25); routerPan.add(selectRtr1); selectRtr1.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { try { //Socket testPort = new Socket(selectRtr1.getSelectedItem().toString(), 1122); router1Flg = true; //testPort.close(); if (router1Flg == true && router2Flg == true && router3Flg == true ) { continueButton.setVisible(true); } } catch (Exception e1) { new com.Manets.util.ErrorManage("You Have Selected a Invalid Node1"); } } }); selectRtrL2 = new JLabel("Select Node2");
110

selectRtrL2.setForeground(Color.WHITE); selectRtrL2.setBounds(5, 65, 200, 25); routerPan.add(selectRtrL2); selectRtr2 = new JComboBox(netViewArr); selectRtr2.setBounds(100, 65, 280, 25); routerPan.add(selectRtr2); selectRtr2.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { try { if (router1Flg == true && router2Flg == true && router3Flg == true) { continueButton.setVisible(true); } } catch (Exception e1) { new com.Manets.util.ErrorManage("You Have Selected a Invalid Node2"); } } }); selectRtrL3 = new JLabel("Select Node3"); selectRtrL3.setForeground(Color.WHITE); selectRtrL3.setBounds(5, 95, 200, 25); routerPan.add(selectRtrL3); selectRtr3 = new JComboBox(netViewArr); selectRtr3.setBounds(100, 95, 280, 25);
111

routerPan.add(selectRtr3); selectRtr3.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { try { if (router1Flg == true && router2Flg == true && router3Flg == true) { continueButton.setVisible(true); } } catch (Exception e1) { new com.Manets.util.ErrorManage("You Have Selected a Invalid Node3"); } } }); continueButton = new JButton("Continue"); routerPan.add(continueButton); } } package com.Manets.Server; public class ServerStart { public static void main(String args[]) { new ServerInit(); } }
112

APPENDIX C SCREEN SHOTS :

1. Node Form:

113

2. Sender Form:

114

'

3. Selecting a file :

115

4. Sending a file:

116

5. File received form:

117

6. Node1 Form:

118

7. Node2 Form(Interepted):

119

120

8. Node3 Form:

9. Receiver Form:

121

10. Received file:

122

123

11. Sending a message:

12. Node1 Form:

124

13. Node2 Form:

125

14. Node3 Form(Interepted):

126

15. Data Inserted:

127

16. Message received:

128

17. Viewing Node Details:

129

BIBLIOGRAPHY: Base Paper Details: IEEE Transactions on Mobile Computing, vol.9, no.8, August 2010. Paul J.Darby III, student member, IEEE, and Nian-Feng Tzeng, Fellow, IEEE. Page.no:1173 to 1186 References:

130

1. J. Long, W. Fuchs, and J. Abraham, Compiler-Assisted Static Checkpoint Insertion,

Proc. of the 22nd Symposium on Fault-Tolerant Computing (FTCS), July 1992, pp. 58-65. 2. SUN Microsystems, Sun Grid compute Utility, 2006 3. Hewlett-Packard Development Company, L.P., Grid-Computing Extending the Boundaries of Distributed IT, Jan. 2007.
4.

S. Wesner et al., Mobile Collaborative Business Grids A Short Overview of the Akogrimo Project, White Paper, Akogrimo Consortium, 2006.

5. Computerworld, HP Promises Global Wireless for Notebook PCs, April 5, 2006.

Website :
1. http://www.sun.com/service/sungrid.

2. http://h71028.www7.hp.com/ERC/downloads/4AA03675ENW.pdf? jumpid=reg_R1002_USEN.http://www-1.ibm.com/grid/about_grid/what_is.shtml. 3. URLhttp://www.computerworld.com/mobiletopics/mobile/story/0,10801,110218,00.ht ml?source=NLT_AM&nid=110218.

131

You might also like