Cloud Computing Profit Maximization
Cloud Computing Profit Maximization
Guaranteed
Quality of Service in Cloud Computing
ABSTRACT
Page No
1.1 Purpose
1.2 Scope
1.3 Motivation
3. System Analysis
4.1.1 Drawbacks
4.3.1 Advantages
5.1 Introduction
5.2 Purpose
5. System Design
6.3 DFDs
6. Implementation
7. System Testing
8.1 Conclusion
10. References
Appendix:
1. Sample code
2. screenshots
1 Introduction
1.1 Purpose
As an effective and efficient way to consolidate computing resources and computing services,
cloudcomputing has become more and more popular .Cloud computing centralizes
management of resources and services, and delivers hosted services over the Internet. The
hardware, software, databases, information, and all resources are concentrated and provided
to consumers on-demand.
1.2 Scope
In this paper, we only consider the profit maximization problem in a homogeneous cloud
environment, because the analysis of a heterogenous environment is much more complicated
than that of a homogenous environment. However, we will extend our study to a
heterogenous environment in the future
1.3 Motivation
To configure a cloud service platform, a service providerusually adopts a single renting
scheme. Thats to say, the servers in the service system are all long-term rented. Because of
the limited number of servers, some of the incoming service requests cannot be processed
immediately. So they are first inserted into a queue until they can handled by any available
server. However, the waiting time of the service requests cannot be too long. In order to
satisfy quality-of-service requirements, the waiting time of each incoming service request
should be limited within a certain range, which is determined by a service-level agreement
(SLA). If the quality of service is guaranteed, the service is fully charged, otherwise, the
service provider serves the request for free as a penalty of low quality. To obtain higher
revenue, a service provider should rent more servers from the infrastructure providers or scale
up the server execution speed to ensure that more service requests are processed
with high service quality.
2. Fundamental Concepts on (Domain)
2.1 Introduction
Cloud computing is the use of computing resources (hardware and software) that are
delivered as a service over a network (typically the Internet). The name comes from the
common use of a cloud-shaped symbol as an abstraction for the complex infrastructure it
contains in system diagrams. Cloud computing entrusts remote services with a user's data,
software and computation. Cloud computing consists of hardware and software resources
made available on the Internet as managed third-party services. These services typically
provide access to advanced software applications and high-end networks of server computers.
The cloud computing uses networks of large groups of servers typically running low-cost
consumer PC technology with specialized connections to spread data-processing chores
across them. This shared IT infrastructure contains large pools of systems that are linked
together. Often, virtualization techniques are used to maximize the power of cloud
computing.
Broad network access: Capabilities are available over the network and accessed
through standard mechanisms that promote use by heterogeneous thin or thick client
platforms (e.g., mobile phones, laptops, and PDAs).
Resource pooling: The providers computing resources are pooled to serve multiple
consumers using a multi-tenant model, with different physical and virtual resources
dynamically assigned and reassigned according to consumer demand. There is a sense
of location-independence in that the customer generally has no control or knowledge
over the exact location of the provided resources but may be able to specify location
at a higher level of abstraction (e.g., country, state, or data center). Examples of
resources include storage, processing, memory, network bandwidth, and virtual
machines.
Measured service: Cloud systems automatically control and optimize resource use by
leveraging a metering capability at some level of abstraction appropriate to the type of
service (e.g., storage, processing, bandwidth, and active user accounts). Resource
usage can be managed, controlled, and reported providing transparency for both the
provider and consumer of the utilized service.
3. Globalize your workforce on the cheap. People worldwide can access the cloud,
provided they have an Internet connection.
4. Streamline processes. Get more work done in less time with less people.
5. Reduce capital costs. Theres no need to spend big money on hardware, software or
licensing fees.
6. Improve accessibility. You have access anytime, anywhere, making your life so much
easier!
7. Monitor projects more effectively. Stay within budget and ahead of completion
cycle times.
8. Less personnel training is needed. It takes fewer people to do more work on a cloud,
with a minimal learning curve on hardware and software issues.
9. Minimize licensing new software. Stretch and grow without the need to buy
expensive software licenses or programs.
10. Improve flexibility. You can change direction without serious people or financial
issues at stake.
Advantages:
In software engineering the SDLC concept underpins many kinds of software development
methodologies. These methodologies form the framework for planning and controlling the
creation of an information system the software development process.
A software cycle deals with various parts and phases from planning to testing
and deploying software. All these activities are carried out in different ways, as per the needs.
Each way is known as a Software Development Lifecycle Model (SDLC). A software life
cycle model is either a descriptive or prescriptive characterization of how software is or
should be developed. A descriptive model describes the history of how a particular software
system was developed. Descriptive models may be used as the basis for understanding and
improving software development processes or for building empirically grounded prescriptive
models.
SDLC models * The Linear model (Waterfall) - Separate and distinct phases of
specification and development. - All activities in linear fashion. - Next phase starts only when
first one is complete. * Evolutionary development - Specification and development are
interleaved (Spiral, incremental, prototype based, Rapid Application development). -
Incremental Model (Waterfall in iteration), - RAD(Rapid Application Development) - Focus
is on developing quality product in less time, - Spiral Model - We start from smaller module
and keeps on building it like a spiral. It is also called Component based development. *
Formal systems development - A mathematical system model is formally transformed to an
implementation. * Agile Methods. - Inducing flexibility into development. * Reuse-based
development - The system is assembled from existing components.
The General Model
Software life cycle models describe phases of the software cycle and the order in which those
phases are executed. There are tons of models, and many companies adopt their own, but all
have very similar patterns. Each phase produces deliverables required by the next phase in
the life cycle. Requirements are translated into design. Code is produced during
implementation that is driven by the design. Testing verifies the deliverable of the
implementation phase against requirements.
SDLC Methodology:
Spiral Model
The spiral model is similar to the incremental model, with more emphases placed on
risk analysis. The spiral model has four phases: Planning, Risk Analysis, Engineering and
Evaluation. A\ software project repeatedly passes through these phases in iterations (called
Spirals in this model). The baseline spiral, starting in the planning phase, requirements is
gathered and risk is assessed. Each subsequent spirals builds on the baseline spiral.
Requirements are gathered during the planning phase. In the risk analysis phase, a process is
undertaken to identify risk and alternate solutions. A prototype is produced at the end of the
risk analysis phase. Software is produced in the engineering phase, along with testing at
the end of the phase. The evaluation phase allows the customer to evaluate the output of the
project to date before the project continues to the next spiral. In the spiral model, the angular
component represents progress, and the radius of the spiral represents cost. Spiral Life Cycle
Model.
This document play a vital role in the development of life cycle (SDLC) as it describes
the complete requirement of the system. It means for use by developers and will be the basic
during testing phase. Any changes made to the requirements in the future will have to go
through formal change approval process.
SPIRAL MODEL was defined by Barry Boehm in his 1988 article, A spiral Model of
Software Development and Enhancement. This model was not the first model to discuss
iterative development, but it was the first model to explain why the iteration models.
As originally envisioned, the iterations were typically 6 months to 2 years long. Each
phase starts with a design goal and ends with a client reviewing the progress thus far.
Analysis and engineering efforts are applied at each phase of the project, with an eye toward
the end goal of the project.
The new system requirements are defined in as much details as possible. This
usually involves interviewing a number of users representing all the external or
internal users and other aspects of the existing system.
A first prototype of the new system is constructed from the preliminary design.
This is usually a scaled-down system, and represents an approximation of the
characteristics of the final product.
1. Evaluating the first prototype in terms of its strengths, weakness, and risks.
At the customer option, the entire project can be aborted if the risk is deemed too
great. Risk factors might involved development cost overruns, operating-cost
miscalculation, or any other factor that could, in the customers judgment, result
in a less-than-satisfactory final product.
The existing prototype is evaluated in the same manner as was the previous
prototype, and if necessary, another prototype is developed from it according to
the fourfold procedure outlined above.
The preceding steps are iterated until the customer is satisfied that the refined
prototype represents the final product desired.
3.1 ExistingSystem
In Many existing research they only consider the power consumption cost. As a major
difference between their models and ours, the resource rental cost is considered in this paper
as well, since it is a major part which affects the profit of service providers. The traditional
single resource renting scheme cannot guarantee the quality of all requests but wastes a great
amount of resources due to the uncertainty of system workload. To overcome the weakness,
we propose a double renting scheme as follows, which not only can guarantee the quality of
service completely but also can reduce the resource waste greatly.
3.1.1 Disadvantages
3.2.2 Advantages
1. Cloud computing,
2. queuing model.
3. Business Service Module
4. Cloud customer Module.
5. Infrastructure Service Provider Module.
Cloud Computing
Cloud computing describes a type of outsourcing of computer services, similar to the way in
which the supply of electricity is outsourced. Users can simply use it. They do not need to
worry where the electricity is from, how it is made, or transported. Every month, they pay for
what they consumed. The idea behind cloud computing is similar: The user can simply use
storage, computing power, or specially crafted development environments, without having to
worry how these work internally. Cloud computing is usually Internet-based computing. The
cloud is a metaphor for the Internet based on how the internet is described in computer
network diagrams; which means it is an abstraction hiding the complex infrastructure of the
internet. It is a style of computing in which IT-related capabilities are provided as a service,
allowing users to access technology-enabled services from the Internet ("in the
cloud")without knowledge of, or control over the technologies behind these servers.
Queuing model:
we consider the cloud service platform as a multiserver system with a service request queue.
The clouds provide resources for jobs in the form of virtual machine (VM). In addition, the
users submit their jobs to the cloud in which a job queuing system such as SGE, PBS, or
Condor is used. All jobs are scheduled by the job scheduler and assigned to different VMs in
a centralized way. Hence, we can consider it as a service request queue. For example, Condor
is a specialized workload management system for computeintensive jobs and it provides a job
queueing mechanism, scheduling policy, priority scheme, resource monitoring, and resource
management. Users submit their jobs to Condor, and Condor places them into a queue,
chooses when and where to run them based upon a policy. An M/M/m+D queueing model is
build for our multiserver system with varying system size. And then, an optimal configuration
problem of profit maximization is formulated in which many factors are taken into
considerations, such as the market demand, the workload of requests, the server-level
agreement, the rental cost of servers, the cost of energy consumption, and so forth. The
optimal solutions are solved for two different situations, which are the ideal optimal solutions
and the actual optimal solutions.
Service providers pay infrastructure providers for renting their physical resources, and charge
customers for processing their service requests, which generates cost and revenue,
respectively. The profit is generated from the gap between the revenue and the cost.In this
module the service providers considered as cloud brokers because they can play an important
role in between cloud customers and infrastructure providers ,and he can establish an indirect
connection between cloud customer and infrastructure providers.
In the three-tier structure, an infrastructure provider the basic hardware and software
facilities. A service provider rents resources from infrastructure providers and prepares, a set
of services in the form of virtual machine (VM). Infrastructure providers provide two kinds
of resource renting schemes, e.g., long-term renting and short-term renting. In general, the
rental price of long-term renting is much cheaper than that of short-term renting.
Cloud Customers
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.
Three key considerations involved in the feasibility analysis are
ECONOMICAL FEASIBILITY
TECHNICAL FEASIBILITY
SOCIAL FEASIBILITY
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 the system.
4 System Requirements Specification
4.1 Introduction
A Software Requirements Specification (SRS) a requirements specification
for a software system is a complete description of the behavior of a system to be developed.
It includes a set of use cases that describe all the interactions the users will have with the
software. In addition to use cases, the SRS also contains non-functional requirements. Non-
functional requirements are requirements which impose constraints on the design or
implementation (such as performance engineering requirements, quality standards, or design
constraints).
System requirements specification: A structured collection of information that embodies the
requirements of a system. A business analyst, sometimes titled system analyst, is responsible
for analyzing the business needs of their clients and stakeholders to help identify business
problems and propose solutions. Within the systems development life cycle domain,
typically performs a liaison function between the business side of an enterprise and the
information technology department or external service providers. Projects are subject to three
sorts of requirements:
Business requirements describe in business terms what must be delivered or
accomplished to provide value.
Product requirements describe properties of a system or product (which could be
one of
several ways to accomplish a set of business requirements.)
Process requirements describe activities performed by the developing organization.
For instance, process requirements could specify specific methodologies that must be
followed, and constraints that the organization must obey.
Product and process requirements are closely linked. Process requirements often specify the
activities that will be performed to satisfy a product requirement. For example, a maximum
development cost requirement (a process requirement) may be imposed to help achieve a
maximum sales price requirement (a product requirement); a requirement that the product be
maintainable (a Product requirement) often is addressed by imposing requirements to follow
particular development styles
4.2 PURPOSE
1) Customer Registration
2)
Usability
The system is designed with completely automated process hence there is no or less user
intervention.
Reliability
The system is more reliable because of the qualities that are inherited from the chosen
platform java. The code built by using java is more reliable.
Performance
This system is developing in the high level languages and using the advanced front-end and
back-end technologies it will give response to the end user on client system with in very less
time.
Supportability
The system is designed to be the cross platform supportable. The system is supported on a
wide range of hardware and any software platform, which is having JVM, built into the
system.
Implementation
The system is implemented in web environment using struts framework. The apache tomcat
is used as the web server and windows xp professional is used as the platform.
Interface the user interface is based on Struts provides HTML Tag
Software Requirements:
Language : JDK (1.7.0)
Frontend : JSP, HTML
Backend : Oracle10g
Operating System : windows 7
Server : ApacheTomcat 7
Hardware Requirements:
Processor : Pentium IV
Hard Disk : 80GB
RAM : 2GB
5 System Design
The purpose of the design phase is to plan a solution of the problem specified by the
requirement document. This phase is the first step in moving from the problem domain to the
solution domain. In other words, starting with what is needed, design takes us toward how to
satisfy the needs. The design of a system is perhaps the most critical factor affection the
quality of the software; it has a major impact on the later phase, particularly testing,
maintenance. The output of this phase is the design document. This document is similar to a
blueprint for the solution and is used later during implementation
The DFD is also called as bubble chart. It is a simple graphical formalism that can be used to
represent a system in terms of the input data to the system, various processing carried out on
these data, and the output data is generated by the system.
(Cloud user)
cloud user login
YES NO
Check
View Request
Status
View Policies
choose policy
(Broker):
BrokerLogin
Yes No
Check
View Infrastructure
services
View graphModulations
check server
EndProcess
vapacities
Yes No
Check
Unauthorized User
Provide Resources
Component Diagram:
Cloud User:
Enter Username And Password
Userlogin
User
choose policies
and send to broker
View Status View policy
Terms
User:
Enter UserName And Password
Broker login
Broker
logout
View user Maintain Users
Provide resources
requests
(cloud user)
User
Login
(Broker):
Broker
Login
view user View server Accept user Send userpolicies View graph
requests capacities requests to server modulations
(Infrastructure service provider:)
Server
Login
ACTIVITY DIAGRAM:
(Cloud user)
Userlogin
upload filesinto
cloud
View status
select policy
View policy and send requsts
terms
End Process
(Broker)
Broker login
View user
requests Accept user View user policy
requests terms
End Process
Server login
provide Logout
resources
Accept user
requests View broker
requests
End Process
Sequence Diagram:
(Cloud user):
message
(Broker):
DatabaseTables
6 Implementation
6.1 Introduction
Implementation is the stage where the theoretical design is turned in to working
system. The most crucial stage is achieving a new successful system and in giving confidence
on the new system for the users that it will work efficiently and effectively.
The system can be implemented only after through testing is done and if it found to
work according to the specification. It involves careful planning, investigation of the current
system and its constraints on implementation, design of methods to achieve the change over
and an evaluation of change over methods a part from planning. Two major tasks of preparing
the implementation are education and training of the users and testing of the system.
The more complex the system being implemented, the more involved will be the
systems analysis and design effort required just for implementation. The implementation
phase comprises of several activities. The required hardware and software acquisition is
carried out. The System may require some hardware and software acquisition is carried out.
The system may require some software to be developed. For this, programs are written and
tested. The user then changes over to his new fully tested system and the old system is
discontinued.
Implementation is the process of having systems personnel check out and put new
equipment in to use, train users, install the new application, and construct any files of data
needed to it.
Depending on the size of the organization that will be involved in using the
application and the risk associated with its use, system developers may choose to test the
operation in only one area of the firm, say in one department or with only one or two persons.
Sometimes they will run the old and new systems together to compare the results. In still
other situations, developers will stop using the old system one-day and begin using the new
one the next. As we will see, each implementation strategy has its merits, depending on the
business situation in which it is considered.
6.2 TechnologyDescription
Java Technology
Java technology is both a programming language and a platform.
Simple
Architecture neutral
Object oriented
Portable
Distributed
High performance
Interpreted
Multithreaded
Robust
Dynamic
Secure
With most programming languages, you either compile or interpret a program so that you can
run it on your computer. The Java programming language is unusual in that a program is both
compiled and interpreted. With the compiler, first you translate a program into an
intermediate language called Java byte codes the platform-independent codes interpreted
by the interpreter on the Java platform. The interpreter parses and runs each Java byte code
instruction on the computer. Compilation happens just once; interpretation occurs each time
the program is executed. The following figure illustrates how this works.
You can think of Java byte codes as the machine code instructions for the Java Virtual
Machine (Java VM). Every Java interpreter, whether its a development tool or a Web
browser that can run applets, is an implementation of the Java VM. Java byte codes help
make write once, run anywhere possible. You can compile your program into byte codes on
any platform that has a Java compiler. The byte codes can then be run on any implementation
of the Java VM. That means that as long as a computer has a Java VM, the same program
written in the Java programming language can run on Windows 2000, a Solaris workstation,
or on an iMac.
The Java API is a large collection of ready-made software components that provide many
useful capabilities, such as graphical user interface (GUI) widgets. The Java API is grouped
into libraries of related classes and interfaces; these libraries are known as packages. The next
section, What Can Java Technology Do? Highlights what functionality some of the packages
in the Java API provide.
The following figure depicts a program thats running on the Java platform. As the figure
shows, the Java API and the virtual machine insulate the program from the hardware.
Native code is code that after you compile it, the compiled code runs on a specific hardware
platform. As a platform-independent environment, the Java platform can be a bit slower than
native code. However, smart compilers, well-tuned interpreters, and just-in-time byte code
compilers can bring performance close to that of native code without threatening portability.
An application is a standalone program that runs directly on the Java platform. A special kind
of application known as a server serves and supports clients on a network. Examples of
servers are Web servers, proxy servers, mail servers, and print servers. Another specialized
program is a servlet. A servlet can almost be thought of as an applet that runs on the server
side. Java Servlets are a popular choice for building interactive web applications, replacing
the use of CGI scripts. Servlets are similar to applets in that they are runtime extensions of
applications. Instead of working in browsers, though, servlets run within Java Web servers,
configuring or tailoring the server.
How does the API support all these kinds of programs? It does so with packages of software
components that provides a wide range of functionality. Every full implementation of the
Java platform gives you the following features:
The essentials: Objects, strings, threads, numbers, input and output, data
structures, system properties, date and time, and so on.
Applets: The set of conventions used by applets.
Networking: URLs, TCP (Transmission Control Protocol), UDP (User Data
gram Protocol) sockets, and IP (Internet Protocol) addresses.
Internationalization: Help for writing programs that can be localized for
users worldwide. Programs can automatically adapt to specific locales and be
displayed in the appropriate language.
Security: Both low level and high level, including electronic signatures,
public and private key management, access control, and certificates.
Software components: Known as JavaBeansTM, can plug into existing
component architectures.
Object serialization: Allows lightweight persistence and communication via
Remote Method Invocation (RMI).
Java Database Connectivity (JDBCTM): Provides uniform access to a wide
range of relational databases.
The Java platform also has APIs for 2D and 3D graphics, accessibility, servers,
collaboration, telephony, speech, animation, and more. The following figure depicts
what is included in the Java 2 SDK.
We cant promise you fame, fortune, or even a job if you learn the Java programming
language. Still, it is likely to make your programs better and requires less effort than other
languages. We believe that Java technology will help you do the following:
Through the ODBC Administrator in Control Panel, you can specify the particular database
that is associated with a data source that an ODBC application program is written to use.
Think of an ODBC data source as a door with a name on it. Each door will lead you to a
particular database. For example, the data source named Sales Figures might be a SQL
Server database, whereas the Accounts Payable data source could refer to an Access
database. The physical database referred to by a data source can reside anywhere on the
LAN.
The ODBC system files are not installed on your system by Windows 95. Rather, they are
installed when you setup a separate database application, such as SQL Server Client or Visual
Basic 4.0. When the ODBC icon is installed in Control Panel, it uses a file called
ODBCINST.DLL. It is also possible to administer your ODBC data sources through a stand-
alone program called ODBCADM.EXE. There is a 16-bit and a 32-bit version of this
program and each maintains a separate list of ODBC data sources.
From a programming perspective, the beauty of ODBC is that the application can be written
to use the same set of function calls to interface with any data source, regardless of the
database vendor. The source code of the application doesnt change whether it talks to
Oracle or SQL Server. We only mention these two as an example. There are ODBC drivers
available for several dozen popular database systems. Even Excel spreadsheets and plain
text files can be turned into data sources. The operating system uses the Registry information
written by ODBC Administrator to determine which low-level ODBC drivers are needed to
talk to the data source (such as the interface to Oracle or SQL Server). The loading of the
ODBC drivers is transparent to the ODBC application program. In a client/server
environment, the ODBC API even handles many of the network issues for the application
programmer.
The advantages of this scheme are so numerous that you are probably thinking there must be
some catch. The only disadvantage of ODBC is that it isnt as efficient as talking directly to
the native database interface. ODBC has had many detractors make the charge that it is too
slow. Microsoft has always claimed that the critical factor in performance is the quality of
the driver software that is used. In our humble opinion, this is true. The availability of good
ODBC drivers has improved a great deal recently. And anyway, the criticism about
performance is somewhat analogous to those who said that compilers would never match the
speed of pure assembly language. Maybe not, but the compiler (or ODBC) gives you the
opportunity to write cleaner programs, which means you finish sooner. Meanwhile,
computers get faster every year.
JDBC
In an effort to set an independent database standard API for Java; Sun Microsystems
developed Java Database Connectivity, or JDBC. JDBC offers a generic SQL database
access mechanism that provides a consistent interface to a variety of RDBMSs. This
consistent interface is achieved through the use of plug-in database connectivity modules,
or drivers. If a database vendor wishes to have JDBC support, he or she must provide the
driver for each platform that the database and Java run on.
To gain a wider acceptance of JDBC, Sun based JDBCs framework on ODBC. As you
discovered earlier in this chapter, ODBC has widespread support on a variety of platforms.
Basing JDBC on ODBC will allow vendors to bring JDBC drivers to market much faster
than developing a completely new connectivity solution.
JDBC was announced in March of 1996. It was released for a 90 day public review that
ended June 8, 1996. Because of user input, the final JDBC v1.0 specification was released
soon after.
The remainder of this section will cover enough information about JDBC for you to know
what it is about and how to use it effectively. This is by no means a complete overview of
JDBC. That would fill an entire book.
JDBC Goals
Few software packages are designed without goals in mind. JDBC is one that, because of its
many goals, drove the development of the API. These goals, in conjunction with early
reviewer feedback, have finalized the JDBC class library into a solid framework for building
database applications in Java.
The goals that were set for JDBC are important. They will give you some insight as to why
certain classes and functionalities behave the way they do. The eight design goals for JDBC
are as follows:
2. SQL Conformance
SQL syntax varies as you move from database vendor to database vendor. In an effort to
support a wide variety of vendors, JDBC will allow any query statement to be passed
through it to the underlying database driver. This allows the connectivity module to
handle non-standard functionality in a manner that is suitable for its users.
4. Provide a Java interface that is consistent with the rest of the Java system
Because of Javas acceptance in the user community thus far, the designers feel that
they should not stray from the current design of the core Java system.
5. Keep it simple
This goal probably appears in all software design goal listings. JDBC is no exception.
Sun felt that the design of JDBC should be very simple, allowing for only one method of
completing a task per mechanism. Allowing duplicate functionality only serves to confuse
the users of the API.
And for dynamically updating the cache table we go for MS Access database.
Java is also unusual in that each Java program is both compiled and interpreted.
With a compile you translate a Java program into an intermediate language called
Java byte codes the platform-independent code instruction is passed and run on the
computer.
Compilation happens just once; interpretation occurs each time the program is
executed. The figure illustrates how this works.
Interpreter
Java Program
Compilers My Program
You can think of Java byte codes as the machine code instructions for the Java
Virtual Machine (Java VM). Every Java interpreter, whether its a Java
development tool or a Web browser that can run Java applets, is an implementation
of the Java VM. The Java VM can also be implemented in hardware.
Java byte codes help make write once, run anywhere possible. You can compile your Java
program into byte codes on my platform that has a Java compiler. The byte codes can then be
run any implementation of the Java VM. For example, the same Java program can run
Windows NT, Solaris, and Macintosh.
7. SYSTEM TESTING
The purpose of testing is to discover errors. Testing is the process of trying to discover every
conceivable fault or weakness in a work product. It provides a way to check the functionality
of components, sub assemblies, assemblies and/or a finished product It is the process of
exercising software with the intent of ensuring that the Software system meets its
requirements and user expectations and does not fail in an unacceptable manner. There are
various types of test. Each test type addresses a specific testing requirement.
TYPES OF TESTS
Unit testing
Unit testing involves the design of test cases that validate that the internal program logic is
functioning properly, and that program inputs produce valid outputs. All decision branches
and internal code flow should be validated. It is the testing of individual software units of the
application .it is done after the completion of an individual unit before integration. This is a
structural testing, that relies on knowledge of its construction and is invasive. Unit tests
perform basic tests at component level and test a specific business process, application,
and/or system configuration. Unit tests ensure that each unique path of a business process
performs accurately to the documented specifications and contains clearly defined inputs and
expected results.
Integration testing
Integration tests are designed to test integrated software components to determine if they
actually run as one program. Testing is event driven and is more concerned with the basic
outcome of screens or fields. Integration tests demonstrate that although the components were
individually satisfaction, as shown by successfully unit testing, the combination of
components is correct and consistent. Integration testing is specifically aimed at exposing
the problems that arise from the combination of components
Functional test
Functional tests provide systematic demonstrations that functions tested are available as
specified by the business and technical requirements, system documentation, and user
manuals.
White Box Testing is a testing in which in which the software tester has
knowledge of the inner workings, structure and language of the software, or at
least its purpose. It is purpose. It is used to test areas that cannot be reached
from a black box level.
Unit testing is usually conducted as part of a combined code and unit test phase of the
software lifecycle, although it is not uncommon for coding and unit testing to be conducted as
two distinct phases.
Test objectives
All field entries must work properly.
Pages must be activated from the identified link.
The entry screen, messages and responses must not be delayed.
Features to be tested
Verify that the entries are of the correct format
No duplicate entries should be allowed
All links should take the user to the correct page.
Test Results: All the test cases mentioned above passed successfully. No defects
encountered.
Test Results: All the test cases mentioned above passed successfully. No defects
encountered.
7.4 TestCases
Test cases can be divided in to two types. First one is Positive test cases and second one is
negative test cases. In positive test cases are conducted by the developer intention is to get the
output. In negative test cases are conducted by the developer intention is to dont get the
output.
3 Upload file into single Enter all fields Web data True
cloud , multiple cloud uploaded
successfully
1 Create the new user Enter the Personal info and False
registration process personal info and address info its
address info. not update into
database
successfully.
Maximize the profit of service providers, this paper has proposed a novel Double-Quality-
Guaranteed (DQG) renting scheme for service providers. This scheme combines short-term
renting with long-term renting, which can reduce the resource waste greatly and adapt to the
dynamical demand of computing capacity. An M/M/m+D queueing model is build for our
multiserver system with varying system size. And then, an optimal configuration problem of
profit maximization is formulated in which many factors are taken into considerations, such
as the market demand, the workload of requests, the server-level agreement, the rental cost of
servers, the cost of energy consumption, and so forth. The optimal solutions are solved for
two different situations, which are the ideal optimal solutions and the actual optimal
solutions. In addition, a series of calculations are conducted to compare the profit obtained by
the DQG renting scheme with the Single-Quality-Unguaranteed (SQU) renting scheme. The
results show that our scheme outperforms the SQU scheme in terms of both of service quality
and profit.
Samplecode
package databaseconnection;
import java.sql.*;
try
Class.forName("com.mysql.jdbc.Driver");
con =
DriverManager.getConnection("jdbc:mysql://localhost:3306/profit","root","root");
}
catch(Exception e)
System.out.println("class error");
return con;
<%@page
import="com.oreilly.servlet.*,java.sql.*,java.lang.*,java.text.SimpleDateFormat,java.util.*,ja
va.io.*,javax.servlet.*, javax.servlet.http.*" %>
try {
if(paramname.equalsIgnoreCase("fname"))
{
fname=multi.getParameter(paramname);
}
if(paramname.equalsIgnoreCase("lname"))
{
lname=multi.getParameter(paramname);
}
if(paramname.equalsIgnoreCase("photo"))
{
photo=multi.getParameter(paramname);
}
if(paramname.equalsIgnoreCase("email"))
{
email=multi.getParameter(paramname);
}
if(paramname.equalsIgnoreCase("username"))
{
username=multi.getParameter(paramname);
session.setAttribute("username",username);
System.out.println("username in register page
is"+username);
}
if(paramname.equalsIgnoreCase("password"))
{
password=multi.getParameter(paramname);
System.out.println("password in register page
is"+password);
}
if(paramname.equalsIgnoreCase("mobileno"))
{
mobileno=multi.getParameter(paramname);
}
if(paramname.equalsIgnoreCase("country"))
{
country=multi.getParameter(paramname);
}
int f = 0;
Enumeration files = multi.getFileNames();
while (files.hasMoreElements())
{
paramname = (String) files.nextElement();
if(paramname.equals("d1"))
{
paramname = null;
}
if(paramname != null)
{
f = 1;
photo = multi.getFilesystemName(paramname);
String fPath = context.getRealPath(""+photo);
file1 = new File(fPath);
fs = new FileInputStream(file1);
list.add(fs);
String ss=fPath;
FileInputStream fis = new FileInputStream(ss);
StringBuffer sb1=new StringBuffer();
int i = 0;
while ((i = fis.read()) != -1) {
if (i != -1) {
//System.out.println(i);
String hex = Integer.toHexString(i);
// session.put("hex",hex);
sb1.append(hex);
// sb1.append(",");
}
}
//name=dirName+"\\Gallery\\"+image;
int lyke=0;
//String as="0";
ps.setString(1,fname);
ps.setString(2,lname);
ps.setString(3,email);
ps.setString(4,username);
ps.setString(5,password);
fs1 = (FileInputStream)list.get(0);
ps.setBinaryStream(6,fs1,fs1.available());
ps.setString(7,mobileno);
ps.setString(8,country);
int x=ps.executeUpdate();
response.sendRedirect("cloudcustomer.jsp?success");
}
catch (Exception e)
{
out.println(e.getMessage());
}
%>
</body>
</html>
ScreenShots