Finalreport
Finalreport
Finalreport
From a technical perspective, the key for the success of a corporate network is choosing
the right data sharing platform, a system which enables the shared data (stored and
maintained by different companies) network-wide visible and supports efficient analytical
queries over those data. Traditionally, data sharing is achieved by building a centralized
data warehouse, which periodically extracts data from the internal production systems
(e.g., ERP) of each company for subsequent querying. Unfortunately, such a warehousing
solution has some deficiencies in real deployment.
First, the corporate network needs to scale up to support thousands of participants, while
the installation of a large-scale centralized data warehouse system entails nontrivial costs
including huge hardware/software investments (total cost of ownership) and high
maintenance cost (total cost of operations). In the real world, most companies are not
keen to invest heavily on additional information systems until they can clearly see the
potential return on investment (ROI). Second, companies want to fully customize the
access control policy to determine which business partners can see which part of their
shared data. Unfortunately, most of the data warehouse solutions fail to offer such
flexibilities. Finally, to maximize the revenues, companies often dynamically adjust their
business process and may change their business partners. Therefore, the participants may
join and leave the corporate networks at will. The data warehouse solution has not been
designed to handle such dynamicity.
The system extends the role-based access control for the inherent distributed environment
of corporate networks. Through a web console interface, companies can easily configure
their access control policies and prevent undesired business partners to access their shared
data.
System employs P2P technology to retrieve data between business partners. Instances are
organized as a structured P2P overlay network named BATON. The data are indexed by
the table name, column name and data range for efficient retrieval.
System employs a hybrid design for achieving high performance query processing. The
major workload of a corporate network is simple, low-overhead queries. Such queries
typically only involve querying a very small number of business partners and can be
processed in short time. The system is mainly optimized for these queries. In summary,
the design of the system provides economical, flexible and scalable solutions for
corporate network applications. We demonstrate the efficiency of our system by
benchmarking our system against other large scale data processing platforms, over a set
of queries designed for data sharing applications. The results show that for simple, low-
overhead queries, the performance is significantly better than other large scale data
processing platforms. We describe the design of systems core components, which
including the bootstrap peer and the normal peer.
It can effectively help the companies to reduce their operational costs and increase the
revenues. However, the inter-company data sharing and processing poses unique
challenges to such a data management system including scalability, performance,
throughput, and security. In this paper, we present BestPeer++, a system which delivers
elastic data sharing services for corporate network applications in the cloud based on
BestPeer—a peer-to-peer (P2P) based data management platform. By integrating cloud
computing, database, and P2P technologies into one system, BestPeer++provides an
economical, flexible and scalable platform for corporate network applications and
• Classes: Stored data is used to locate data in predetermined groups. For example,
a restaurant chain could mine customer purchase data to determine when
customers visit and what they typically order. This information could be used to
increase traffic by having daily specials.
• Clusters: Data items are grouped according to logical relationships or consumer
preferences. For example, data can be mined to identify market segments or
consumer affinities.
• Sequential patterns: Data is mined to anticipate behavior patterns and trends. For
example, an outdoor equipment retailer could predict the likelihood of a backpack
being purchased based on a consumer's purchase of sleeping bags and hiking
shoes.
• Extract, transform, and load transaction data onto the data warehouse system.
• Store and manage the data in a multidimensional database system.
• Provide data access to business analysts and information technology
professionals.
• Analyze the data by application software.
• Present the data in a useful format, such as a graph or table.
In the real world, most companies are not keen to invest heavily on additional
information systems until they can clearly see the potential return on investment (ROI).
Companies want to fully customize the access control policy to determine which business
partners can see which part of their shared data. Users of the system expect fast and
correct retrieval of data without any delay.
The delay is bound to occur as a standard mechanism which is not dynamic and adaptable
is used for processing of all queries.
• Simple queries also consume the same time that is required to process
complex queries.
The proposed system is enhanced with distributed access control, multiple types of
indexes for delivering elastic data sharing services. The software components of the
system are separated into two parts: core and the adapter.
o The core contains all the data sharing functionalities and is designed to be
platform independent.
o The adapter contains one abstract adapter describing the elastic
infrastructure service interface and a set of concrete adapter components
which implement such an interface through APIs provided.
The two level design helps us to achieve portability. With suitable adapters the system
can be easily implemented in the cloud as well as the non-cloud environment.
Every client with whom the network is to be used is registered and created an instance
making it an authorized entity to access information in the network.
The system accepts queries to be processed. As soon as a query arrives from an
authorized client, the query is analyzed for complexity and then processed using our
system if it is simple in nature else is sent using an interface to the system designed to
handle complex queries.
The processing also utilizes the peers involved to process the queries and has them to
send back results and the results are aggregated to be sent to the requested clients.
SOFTWARE DESCRIPTION
4.1 Java
Platform Independence
• The Write-Once-Run-Anywhere ideal has not been achieved (tuning for different
platforms usually required), but closer than with other languages.
Object Oriented
Compiler/Interpreter Combo
• Code is compiled to byte codes that are interpreted by a Java virtual machines
(JVM).
• This provides portability to any machine for which a virtual machine has been
written.
• The two steps of compilation and interpretation allow for extensive code checking
and improved security.
Robust
• Exception handling built-in, strong type checking (that is, all data must be
Department of ISE, BIT Bangalore 12
Distributed Data Sharing Platform for Private Enterprise
declared an explicit type), local variables must be initialized.
Security
• No memory pointers
• Programs run inside the virtual machine sandbox.
• Array index limit checking
• Code pathologies reduced by
§ Byte code verifier - checks classes after loading
§ Class loader - confines objects to unique namespaces. Prevents
loading a hacked "java.lang.SecurityManager" class, for example.
§ Security manager - determines what resources a class can access
such as reading and writing to the local disk.
Dynamic Binding
• The linking of data and methods to where they are located is done at run-time.
• New classes can be loaded while a program is running. Linking is done on the fly.
• Even if libraries are recompiled, there is no need to recompile code that uses
classes in those libraries.
• This differs from C++, which uses static binding. This can result in fragile classes
for cases where linked code is changed and memory pointers then point to the
wrong addresses.
Good Performance
Built-in Networking
• Java was designed with networking in mind and comes with many classes to
develop sophisticated Internet communications.
IMP applications are called IMlets, but in reality they are MIDlets. They subclass MIDlet,
and follow the same packaging, deployment, security and life-cycle as MIDlets.
CDC is a smaller subset of Java SE, containing almost all the libraries that are not GUI
related.
Extends the Foundation Profile to include lightweight GUI support in the form of an
AWT subset.
This extension of Personal Basis Profile includes a more comprehensive AWT subset and
adds applet support.
4.2 JAVASCRIPT
• Less server interaction − You can validate user input before sending the page off
to the server. This saves server traffic, which means less load on your server.
• Immediate feedback to the visitors − They don't have to wait for a page reload to
see if they have forgotten to enter something.
• Increased interactivity − You can create interfaces that react when the user hovers
over them with a mouse or activates them via the keyboard.
• Richer interfaces − You can use JavaScript to include such items as drag-and-
drop components and sliders to give a Rich Interface to your site visitors.
• Client-side JavaScript does not allow the reading or writing of files. This has
been kept for security reason.
Tomcat is an application server designed to execute Java servlets and render web pages
that use Java Server page coding. Accessible as either a binary or a source code version,
Tomcat’s been used to power a wide range of applications and websites across the
Internet. At the time of writing, it’s definitely one of the more popular servlet containers
JavaServer Pages (JSP) is a server-side programming technology that enables the creation
JavaServer Pages often serve the same purpose as programs implemented using the
Common Gateway Interface (CGI). But JSP offer several advantages in comparison with
the CGI.
Finally, JSP is an integral part of Java EE, a complete platform for enterprise class
applications. This means that JSP can play a part in the simplest applications to the most
complex and demanding.
4.5 MYSQL
MySQL provides a implementation of a SQL database very well suited for small to
medium web pages. The database is free and open source with a commercial license
available (MySQL is now owned by Oracle after they bought Sun).
Common applications for MySQL include php and java based web applications that
require a DB storage backend, e.g. Dokuwiki, Joomla, xwiki etc. Very many applications
that use MySQL are geared towards the LAMP stack (Linux, Apache, MySQL, php).
• It’s Easy To Use MySQL is very easy to install, and thanks to a bevy of third-
party tools that can be added to the database, setting up an implementation is a
relatively simple task. In addition, it’s also an easy database to work with. So long
as you understand the language, you shouldn’t run into too many problems.
• Support Is Readily Available Whenever Necessary Although Oracle’s history of
supporting its customers can be spotty at best, the nature of MySQL – which got
its start as an open-source platform – means that there’s a large and thriving
community of developers and enthusiasts to which one can turn for help. This is
due in large part to the popularity of the solution, the end result of which is no
shortage of experts.
• It’s Open-Source Oracle’s purchase of Sun Microsystems (and by association,
MySQL) was met with some contention from the development community. The
general fear was that Oracle would transform the tool into a closed, proprietary
ecosystem. Thankfully, though Oracle has tightened its grip on MySQL
somewhat, it can still be considered an open-source database option, as the code is
still available for free online.
• It’s Incredibly Inexpensive Depending on what you plan to use it for, a MySQL
implementation could range in price from free to $10,000 or more. Either way, it’s
significantly less expensive than most other database options on the market (save
for MySQL’s open-source competitors).
HTML, HyperText Markup Language, gives content structure and meaning by defining
The two languages—HTML and CSS—are independent of one another and should
remain that way. CSS should not be written inside of an HTML document and vice versa.
As a rule, HTML will always represent content, and CSS will always represent the
appearance of that content
REQUIREMENT SPECIFICATION
HARDWARE REQUIREMENTS:
SOFTWARE REQUIREMENTS:
The BestPeer++ core contains all platform-independent logic, including query processing
and P2P overlay. It runs on top of the Cloud adapter and consists of two software
components: bootstrap peer and normal peer. A BestPeer++ network can only have a
single bootstrap peer instance which is always launched and maintained by the BestPeer
++ service provider, and a set of normal peer instances. The architecture is depicted in
Fig. 6.1. This section briefly describes the functionalities of these two kinds of peer.
Individual components and data flows inside these peers are presented in the subsequent
Department of ISE, BIT Bangalore 22
Distributed Data Sharing Platform for Private Enterprise
sections.
The bootstrap peer is the entry point of the whole network. It has several responsibilities.
First, the bootstrap peer serves for various administration purposes, including monitoring
and managing normal peers and also scheduling various network management events.
Second, the bootstrap peer acts as a central repository for meta data of corporate network
applications, including shared global schema, participant normal peer list, and role
definitions. In addition, BestPeer++ employs the standard PKI encryption scheme to
encrypt/decrypt data transmitted between normal peers in order to further increase the
security of the system. Thus, the bootstrap peer also acts as a certificate authority (CA)
center for certifying the identities of normal peers. Normal peers are the BestPeer++
instances launched by businesses. Each normal peer is owned and managed by an
individual business and serves the data retrieval requests issued by the users of the
owning business. To meet the high throughput requirement, BestPeer++ does not rely on
a centralized server to locate which normal peer hold which tables. Instead, the normal
Department of ISE, BIT Bangalore 23
Distributed Data Sharing Platform for Private Enterprise
peers are organized as a balanced tree peer-to-peer overlay based on BATON. The query
processing is, thus, performed in entirely a distributed manner.
The bootstrap peer is run by the BestPeer++ service provider, and its main functionality is
to manage the BestPeer+ + network. This section presents how bootstrap peer performs
various administrative tasks.
Each normal peer intends to join an existing corporate network must first connect to the
bootstrap peer. If the join request is permitted by the service provider, the bootstrap peer
will put the newly joined peer into the peer list of the corporate network. At the same
time, the joined peer will receive the corporate network information including the current
participants, global schema, role definitions, and an issued certificate. When a normal
peer needs to leave the network, it also notifies the bootstrap peer first. The bootstrap
peer will move the departure peer to the black list and mark the certificate of the
departing peer invalid. The bootstrap peer will the reclaim all resources allocated to the
departing peer and finally remove the departing peer from the peer list.
In addition to managing peer join and peer departure, the bootstrap peer spends most of
its running-time on monitoring the healthy of normal peers and scheduling fail-over and
auto-scaling events. Algorithm 1 shows how the daemon service of the bootstrap works.
The bootstrap periodically collects performance metrics of each normal peer. If some
peers are malfunctioned or crashed, the bootstrap peer will trigger an automatic fail-over
event for each failed normal peer. The bootstrap peer asks the newly launched instance to
perform database recovery from the latest database backup stored. Finally, the failed peer
is put into the blacklist. Similarly, if any normal peer is overloaded (e. g., CPU is over-
utilized or free storage space is low), the bootstrap peer triggers an auto-scaling event to
In a data sharing platform like our system, enforcing system’s consistency guarantee is a
crucial but difficult task. An important issue is the consistency of the whole system when
there are node failures, more specifically how queries can be executed in these situations.
Business applications rely on accurate summarization of data, and thus may suffer from
any form of data inconsistency. Therefore, the widely used eventual consistency model or
other weakened consistency models do not fit in our case. In BestPeer++, we opt to
enforce strong consistency by guaranteeing that all necessary data in a business scope is
online at query time. When a node crashes, all affected queries need to be blocked until
the auto fail-over process is completed. We are able to provide correctness and
consistency guarantee in this way at the expense of some latency. However, given that the
recovery time complies with SLA’s constraint, this latency is restrained within an
acceptable range.
The normal peer software consists of five components: schema mapping, data loader, data
indexer, access control, and query executor. We present the first four components in this
section. Query processing in the system will be presented in the next section.
There are two data flows inside the normal peer: an offline data flow and an online data
flow. In the offline data flow, the data are extracted periodically by a data loader from the
business production system to the normal peer instance. In particular, the data loader
extracts the data from the business production system, transforms the data format from its
local schema to the shared global schema of the corporate network according to the
schema mapping, and finally stores the results in the MySQL databases hosted in the
normal peer.
In the online data flow, user queries are submitted to the normal peer and then processed
by the query processor. The query processor performs user queries using a fetch and
process strategy. The query processor first parses the query and then employs the
Department of ISE, BIT Bangalore 25
Distributed Data Sharing Platform for Private Enterprise
BATON search algorithm to identify the peers that hold the data related to the query.
Schema Mapping
Schema mapping is a component that defines the mapping between the local schema of
each production system and the global shared schema employed by the corporate
network. Currently, the system only supports relational schema mapping, namely both
local schema and the global schema are relational. The mapping consists of metadata
mappings (i.e., mapping local table definitions to global table definitions) and value
mappings (i. e., mapping local terms to global terms). Besides schema- level mapping, the
system can also support instance- level mapping, which complements the mapping
process when there is not sufficient schema information. In general, the schema mapping
process requires human to be involved and is rather time consuming. However, it only
needs to perform once. Furthermore, the system adopts templates to facilitate the
mapping process. Specifically, for each popular production system, we provide a
mapping template which defines the transformation of local schemas of those systems to
a global schema. What the business only needs is to modify the mapping template to meet
its own needs. We found that this mapping template approach works well in practice and
significantly reduces the service setup efforts.
Data Loader
Data Loader is a component that extracts data from production systems to normal peer
instances according to the result of schema mapping. While the process of extracting and
transforming data is straightforward, the main challenge comes from maintaining
consistency between raw data stored in the production systems and extracted data stored
in the normal peer instance (and subsequently data indices created from these extracted
data) while the raw data being updated inside the production systems. We solve the
consistency problem by the following approach. When the data loader first extracts data
from the production system, besides storing the results in the normal peer instance, the
data loader also creates a snapshot of the newly inserted data. After that, at interval times,
the data loader reextracts data from the production system to create a new snapshot. This
snapshot is then compared to the previously stored one to detect data changes. Finally, the
Given two consecutive data snapshots, we employ a similar algorithm as the one
proposed in. In our algorithm, the system first fingerprints every tuple of the tables in the
two snapshots to a unique integer.
Data Indexer
In our system, the data are stored in the local MySQL database hosted by each normal
peer. Thus, to process a query, we need to locate which normal peers host the tables
involved in the query. For example, to process a simple query like select R.a from R
where R.b=x, we need to know the location of the peers store tuples belonging to the
global table R.
We adopt the peer-to-peer technology to solve the data locating problem and only send
queries to normal peers which host related data. In particular, we employ BATON, a
balanced binary tree overlay protocol to organize all normal peers. Given a value domain
[L, U], each node in BATON is responsible for two ranges.
If we traverse the tree via in-order, we can access the values in consecutive domains. In
BATON, each node maintains log2N routing neighbors in the same level, which are used
to facilitate the search process in this index structure. To achieve a balanced structure,
BATON employs two flexible load balancing schemes. A node can balance its load with
adjacent nodes when there exists underloaded ones. However, in the case that there is no
adjacent node available for load balancing, BATON performs a global adjustment by
moving a non-adjacent leaf node from its original position to the overloaded region to
share load. Since BATON organizes nodes as a balanced tree, such a scheme could incur
network restructuring.
The system employs replication of index data in the BATON structure to ensure the
correct retrieval of index data in the presence of failures. Specifically, we use the two-tier
partial replication strategy to provide both data availability and load balancing, as
proposed in our recent study.
6.3.1 OBJECTIVES
Input Design is the process of converting a user-oriented description of the input into a
computer-based system. This design is important to avoid errors in the data input process
and show the correct direction to the management for getting correct information from
the computerized system.
It is achieved by creating user-friendly screens for the data entry to handle large volume
of data. Swing has been used for this purpose in the project. The goal of designing input
is to make data entry easier and to be free from errors. The data entry screen is designed
in such a way that all the data manipulates can be performed. It also provides record
viewing facilities.
Eclipse IDEs provides efficient language toolkit for converting user description to
computer based system.
When the data is entered it will check for its validity. Data can be entered with the help of
screens. Validation can be invoked manually on a resource or group of resources
including XML, DTD and XML Schemas
6.4.1 OBJECTIVES
• Convey information about past activities, current status or projections of the
Future
• Trigger an action.
• Confirm an action.
The idea of parallel processing is shown in Fig. 6.5. For each join, instead of forwarding
all tuples into a single processing node, we disseminate them into a set of nodes, which
will process the join in parallel. We adopt the conventional replicated join approach.
Namely, the small table will be replicated to all processing nodes and joined with a
partition of the large table. For example, in Fig. 6.5, table S is replicated to two nodes and
joined with the partitions of R (R1 and R2). When a query involves multiple joins and
group by, the query plan can be expressed as a processing graph.
EÞ is generated as follows:
2. Root node v0 represents the peer that accepts the query, which is responsible for
collecting the results for the user. fðv0Þ 1⁄4 0.
3. Suppose Q involves x joins and y “Group By” attributes, the maximal level of the
graph L satisfies L xþfðyÞ(fðyÞ1⁄41,ify!1.OtherwisefðyÞ1⁄40).In this way, we generate a
level of nodes for each join operator and the “Group By” operator.
4. Except for the root node, all other nodes only process one join operator or the “Group
By” operator.
5. Nodes of level L accept input data from the Best- Peer++’s storage system (e.g., local
databases). After completing its processing, node vi sends its data to the nodes in
level fðvi Þ 1.
6. All of operators that are not evaluated in the non-root node are processed by the root.
In the replicated join, we trade off the network cost (a table is replicated to multiple
nodes) for the parallel- ism. The benefit may be neutralized when a large number of
tuples are re-partitioned in the P2P network. Therefore, we propose a model to estimate
the cost. The parameters used in the model are summarized in Table 3.
The intermediate result from level iþ1 needs to be broadcasted to all of the tðTiÞ
partitions of table Ti involving in level i’s join. In this cost model, we assume that the I/O
(local and network communication) and the CPU time dominate the overall cost. First, we
define the workload of ith replicated join as the product of last step’s workload and the
number of partition of Table Ti:
After finishing the development of any computer based system the next complicated time
consuming process is system testing. During the time of testing only the development
company can know that, how far the user requirements have been met out, and so on.
Software testing is an important element of the software quality assurance and represents
the ultimate review of specification, design and coding. The increasing feasibility of
software as a system and the cost associated with the software failures are motivated
forces for well planned through testing.
Testing Objectives
These are several rules that can save as testing objectives they are:
• System testing is done for checking the server name of the machines being
connected between the customer and executive..
• The product information provided by the company to the executive is
tested against the validation with the centralized data store.
• System testing is also done for checking the executive availability to
connected to the server.
• The server name authentication is checked and availability to the customer
• Proper communication chat line viability is tested and made the chat
system function properly.
Department of ISE, BIT Bangalore 38
Distributed Data Sharing Platform for Private Enterprise
• Mail functions are tested against the user concurrency and customer mail
date validate.
• Following are the some of the testing methods applied to this effective
project:
This examines the logic of the system. If we are getting the output that is required by the
user, then we can say that the logic is perfect.
We can set with, what program should do and how it should perform under various
condition. This testing is a comparative study of evolution of system performance and
system requirements.
In this the error will be found at each individual module, it encourages the programmer to
find and rectify the errors without affecting the other modules.
Unit testing focuses on verifying the effort on the smallest unit of software-module. The
local data structure is examined to ensure that the date stored temporarily maintains its
integrity during all steps in the algorithm’s execution. Boundary conditions are tested to
ensure that the module operates properly at boundaries established to limit or restrict
processing.
Data can be tested across an interface. One module can have an inadvertent, adverse
effect on the other. Integration testing is a systematic technique for constructing a
program structure while conducting tests to uncover errors associated with interring.
It begins after the integration testing is successfully assembled. Validation succeeds when
the software functions in a manner that can be reasonably accepted by the client. In this
the majority of the validation is done during the data entry operation where there is a
maximum possibility of entering wrong data. Other validation will be performed in all
process where correct details and data should be entered to get the required results.
Recovery Testing is a system that forces the software to fail in variety of ways and
verifies that the recovery is properly performed. If recovery is automatic, re-
initialization, and data recovery are each evaluated for correctness.
Security testing attempts to verify that protection mechanism built into system will in fact
protect it from improper penetration. The tester may attempt to acquire password through
external clerical means, may attack the system with custom software design to break
down any defenses to others, and may purposely cause errors.
Performance Testing is used to test runtime performance of software within the context of
an integrated system. Performance test are often coupled with stress testing and require
both software instrumentation.
Black- box testing focuses on functional requirement of software. It enables to derive ets
of input conditions that will fully exercise all functional requirements for a program.
Black box testing attempts to find error in the following category:
After performing the validation testing, the next step is output testing of the proposed
system since no system would be termed as useful until it does produce the required
output in the specified format. Output format is considered in two ways, the screen format
and the printer format.
User Acceptance Testing is the key factor for the success of any system. The system
under consideration is tested for user acceptance by constantly keeping in touch with
prospective system users at the time of developing and making changes whenever
required.
PSEUDOCODE
adminhome.jsp
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Car Dealer</title>
<script type="text/javascript">
function callAdminLogin(){
var user=document.getElementById("username").value;
var pass=document.getElementById("password").value;
document.cloudForm.action='admin_home.action';
document.cloudForm.submit();
Department of ISE, BIT Bangalore 42
Distributed Data Sharing Platform for Private Enterprise
}else{
function callDealerRegister(){
document.cloudForm.action='goto_register_page.action';
document.cloudForm.submit();
function callSearch(){
document.cloudForm.action='search_page.action';
document.cloudForm.submit();
</script>
</head>
<body>
<div id="layout">
<div id="titlebg">
<div class="title">CAR</div>
</div>
<div id="gradientbg">
<div id="links">
<div id="arrow"></div>
<div id="arrowabout"></div>
<div id="arrowservice"></div>
<div id="arrowcatalogue"></div>
<div id="arrowcontact"></div>
<div id="header"></div>
</div>
<div id="bodypart">
<div id="catalogue">
<div class="cat">CATALOGUE</div>
<div id="cat1"></div>
<div id="car1"></div>
<div id="cat2"></div>
<div id="car2"></div>
</div>
<div id="line"></div>
<div id="ourservices">
<div id="pic1"></div>
</div>
<div id="line1"></div>
<div id="aboutus">
<div id="pic2"></div>
</div>
</div>
</div>
</form>
</body>
</html>
register.jsp
pageEncoding="ISO-8859-1"%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Car Dealer</title>
<script type="text/javascript">
function callAdminLogin(){
var user=document.getElementById("username").value;
var pass=document.getElementById("password").value;
document.cloudForm.action='admin_home.action';
document.cloudForm.submit();
}else{
document.cloudForm.action='register.action';
document.cloudForm.submit();
function callSearch(){
document.cloudForm.action='search_page.action';
document.cloudForm.submit();
</script>
</head>
<body>
<div id="layout">
<div id="titlebg">
<div class="title">CAR</div>
<div class="title1">DEALER</div>
</div>
<div id="links">
<div id="arrow"></div>
<div id="arrowabout"></div>
<div id="arrowservice"></div>
<div id="arrowcatalogue"></div>
<div id="arrowcontact"></div>
</div>
<div id="header"></div>
</div>
<table width="100%">
<tr>
<td align="center">
<s:if test="%{msg!=null}">
<s:property value="%{msg}"/>
</s:if>
</H4>
<table class="normaltxt">
<tr>
<td> Name</td>
</tr>
<tr>
<td><s:textfield name="user.firstname"
id="firstname" cssClass="required input_field"></s:textfield> </td>
</tr>
<tr>
<td> Email</td>
Department of ISE, BIT Bangalore 50
Distributed Data Sharing Platform for Private Enterprise
</tr>
<tr>
</tr>
<tr>
<td> Username</td>
</tr>
<tr>
<td><s:textfield name="user.username"
id="username" cssClass="required input_field"></s:textfield> </td>
</tr>
<tr>
<td>Password</td>
</tr>
<tr>
<td><s:password name="user.password"
cssClass="required input_field" id="password"></s:password></td>
</tr>
<tr>
</tr>
<tr>
<td><s:password name="user.repassword"
cssClass="required input_field" id="repassword"></s:password></td>
</tr>
<tr>
<td> Mobile</td>
</tr>
<tr>
</tr>
<tr>
</tr>
<tr>
<td><s:textfield name="user.showRoomName"
id="showRoomName" cssClass="required input_field"></s:textfield> </td>
</tr>
<tr>
</tr>
<tr>
<td><s:textfield name="user.showRoomLocation"
id="showRoomLocation" cssClass="required input_field"></s:textfield> </td>
</tr>
<tr>
</tr>
<tr>
<td><s:textarea name="user.showRoomAddress"
id="showRoomAddress" cssClass="required input_field"></s:textarea></td>
</tr>
<tr>
</tr>
<tr>
<td><s:textfield name="user.showRoomCity"
id="showRoomCity" cssClass="required input_field"></s:textfield> </td>
</tr>
<td>Deposit Amount</td>
</tr>
<tr>
<td><s:textfield name="user.depositAmount"
id="depositAmount" cssClass="required input_field"></s:textfield> </td>
</tr>
<tr>
<input type="button"
onclick="registerSubmit()" class="submit_btn" value="Register">
</td>
</tr>
</table>
</s:form>
</td>
</tr>
</table>
</div>
</body>
</html>
login.jsp
pageEncoding="ISO-8859-1"%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Car Dealer</title>
<script type="text/javascript">
function callAdminLogin(){
var user=document.getElementById("username").value;
document.cloudForm.action='admin_home.action';
document.cloudForm.submit();
}else{
function callDealerLogin()
document.cloudForm.action='goto_login_page.action';
document.cloudForm.submit();
function loginSubmit(){
document.cloudForm.action='login.action';
document.cloudForm.submit();
</script>
</head>
<body>
<div id="layout">
<div class="title">CAR</div>
<div class="title1">DEALER</div>
</div>
<div id="gradientbg">
<div id="links">
<div id="arrow"></div>
<div id="arrowabout"></div>
<div id="arrowservice"></div>
<div id="arrowcatalogue"></div>
<div id="arrowcontact"></div>
</div>
<div id="header"></div>
</div>
<div id="bodypart">
<div id="catalogue">
<div class="cat">CATALOGUE</div>
<div id="cat1"></div>
<div id="car1"></div>
<div id="cat2"></div>
<div id="car2"></div>
</div>
<div id="line"></div>
<div id="ourservices">
<div id="pic1"></div>
</div>
<div id="line1"></div>
<div id="pic2"></div>
</div>
--><div id="aboutus">
<s:if test="%{msg!=null}">
<s:property value="%{msg}"/>
</s:if>
</span>
<table>
<tr>
</tr>
<tr>
<td><s:textfield name="user.username"
id="username"></s:textfield> </td>
Department of ISE, BIT Bangalore 59
Distributed Data Sharing Platform for Private Enterprise
</tr>
<tr>
<td class="normaltxt">Password</td>
</tr>
<tr>
<td><s:password name="user.password"
id="password"></s:password></td>
</tr>
<tr>
<input type="button"
onclick="loginSubmit()" class="submit_btn" value="Login">
</td>
</tr>
</table>
</s:form>
</div>
</div>
</body>
</html>
databaseConncetion.java
package com.peer.database;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import com.peer.utility.StaticInfo;
Class.forName(driverClassName);
user.java
package com.peer.bo;
return id;
this.id = id;
return firstname;
this.firstname = firstname;
return username;
this.username = username;
return email;
this.email = email;
return deleted;
this.deleted = deleted;
return mobile;
this.mobile = mobile;
return password;
return repassword;
this.repassword = repassword;
return createdOn;
this.createdOn = createdOn;
return ipaddress;
this.ipaddress = ipaddress;
return connect;
this.connect = connect;
request.java
package com.peer.bo;
this.username = username;
return service;
this.service = service;
return userId;
this.userId = userId;
return requestOn;
this.requestOn = requestOn;
return id;
this.id = id;
peerReceiver.java
package com.peer.utility;
import java.io.ObjectInputStream;
import java.net.ServerSocket;
import java.net.Socket;
import com.peer.bo.Packet;
import com.peer.ui.PeerHome;
Socket socket=null;
ServerSocket serverSocket=null;
try{
serverSocket=new ServerSocket(port);
start();
}catch (Exception e) {
e.printStackTrace();
try{
while(true){
socket=serverSocket.accept();
ois=new ObjectInputStream(socket.getInputStream());
Object obj=ois.readObject();
if(packet.result.equalsIgnoreCase("success")){
PeerHome.textField1.setEditable(false);
PeerHome.textField2.setEditable(false);
PeerHome.button1.setEnabled(false);
PeerHome.button1.setLabel("Connected");
}else{
}catch (Exception e) {
e.printStackTrace();
sender.java
Department of ISE, BIT Bangalore 70
Distributed Data Sharing Platform for Private Enterprise
package com.peer.utility;
import java.io.ObjectOutputStream;
import java.net.Socket;
import com.peer.bo.Packet;
Socket socket=null;
ObjectOutputStream oos=null;
try{
socket=new Socket(sysname,port);
oos=new ObjectOutputStream(socket.getOutputStream());
oos.writeObject(obj);
}catch (Exception e) {
e.printStackTrace();
userDAO.java
package com.peer.dao;
import java.sql.CallableStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
import com.peer.bo.Request;
import com.peer.bo.User;
import com.peer.database.DatabaseConnection;
import com.peer.utility.StaticInfo;
/*'check_username_already_exists'
'get_user_details_for_user_id'
'get_user_id_for_user_name'
'insert_new_user'
'list_users'
'check_login'*/
Connection conn=null;
ResultSet rs=null;
boolean status=false;
try {
call.setString(1,username);
rs = call.executeQuery();
if(rs.next()){
status=true;
con.close();
} catch (SQLException e) {
e.printStackTrace();
} catch (ClassNotFoundException e) {
e.printStackTrace();
return(status);
boolean status=false;
Department of ISE, BIT Bangalore 73
Distributed Data Sharing Platform for Private Enterprise
try {
call.setString(1,username);
call.setString(2,password);
rs = call.executeQuery();
if(rs.next()){
status=true;
con.close();
} catch (SQLException e) {
e.printStackTrace();
} catch (ClassNotFoundException e) {
e.printStackTrace();
return(status);
try {
Department of ISE, BIT Bangalore 74
Distributed Data Sharing Platform for Private Enterprise
Connection con = conn=dbCon.getConnection();
call.setInt(1,userId);
rs = call.executeQuery();
if(rs.next()){
user.setId(rs.getInt("id"));
user.setEmail(rs.getString("email"));
user.setUsername(rs.getString("username"));
user.setFirstname(rs.getString("firstname"));
user.setMobile(""+rs.getString("mobile"));
user.setCreatedOn(rs.getString("created_on"));
user.setIpaddress(rs.getString("ipaddress"));
if(rs.getString("is_connect").equalsIgnoreCase("N")){
user.setConnect(false);
}else{
user.setConnect(true);
con.close();
} catch (SQLException e) {
Department of ISE, BIT Bangalore 75
Distributed Data Sharing Platform for Private Enterprise
e.printStackTrace();
} catch (ClassNotFoundException e) {
e.printStackTrace();
return(user);
try {
call.setString(1,username);
rs = call.executeQuery();
if(rs.next()){
user.setId(rs.getInt("id"));
user.setEmail(rs.getString("email"));
user.setUsername(rs.getString("username"));
user.setFirstname(rs.getString("firstname"));
user.setMobile(""+rs.getString("mobile"));
user.setCreatedOn(rs.getString("created_on"));
Department of ISE, BIT Bangalore 76
Distributed Data Sharing Platform for Private Enterprise
user.setIpaddress(rs.getString("ipaddress"));
if(rs.getString("is_connect").equalsIgnoreCase("N")){
user.setConnect(false);
}else{
user.setConnect(true);
con.close();
} catch (SQLException e) {
e.printStackTrace();
} catch (ClassNotFoundException e) {
e.printStackTrace();
return(user);
try {
call.setString(2,email);
call.setString(3,username);
call.setString(4,password);
call.setString(5,mobile);
call.setString(6,ipaddress);
con.close();
} catch (SQLException e) {
e.printStackTrace();
} catch (ClassNotFoundException e) {
e.printStackTrace();
try {
call.setString(1,username);
} catch (SQLException e) {
e.printStackTrace();
} catch (ClassNotFoundException e) {
e.printStackTrace();
try {
stmt = conn.createStatement();
stmt.executeUpdate(sql);
con.close();
} catch (SQLException e) {
e.printStackTrace();
} catch (ClassNotFoundException e) {
e.printStackTrace();
try {
rs = call.executeQuery();
while(rs.next()){
user.setId(rs.getInt("id"));
user.setEmail(rs.getString("email"));
user.setUsername(rs.getString("username"));
user.setFirstname(rs.getString("firstname"));
user.setMobile(""+rs.getString("mobile"));
user.setCreatedOn(rs.getString("created_on"));
user.setIpaddress(rs.getString("ipaddress"));
if(rs.getString("is_connect").equalsIgnoreCase("N")){
user.setConnect(false);
}else{
user.setConnect(true);
con.close();
} catch (SQLException e) {
e.printStackTrace();
} catch (ClassNotFoundException e) {
e.printStackTrace();
return(userList);
try {
rs = call.executeQuery();
while(rs.next()){
request.setId(rs.getInt("id"));
request.setUsername(rs.getString("req_username"));
request.setRequestOn(rs.getString("req_on"));
request.setService(rs.getString("req_service"));
reqList.add(request);
con.close();
} catch (SQLException e) {
e.printStackTrace();
catch (ClassNotFoundException e) {
e.printStackTrace();
return(reqList);
RESULTS
a) Admin Login
c) Peer Home
e) Create User
i) Admin home
We have discussed the unique challenges posed by sharing and processing data in an
inter-businesses environment and proposed a system which delivers elastic data sharing
services, by integrating database, and peer-to-peer technologies. The benchmark
conducted on our system when implemented on the cloud in real time environment shows
that our system can efficiently handle typical workloads in a corporate network and can
deliver near linear query throughput as the number of normal peers grows. Therefore, our
system is a promising solution for efficient data sharing within corporate networks.
[5] H. Garcia-Molina and W.J. Labio, “Efficient Snapshot Differential Algorithms for
Data Warehousing,” technical report, Stanford Univ., 1996.
[6] R. Huebsch, J.M. Hellerstein, N. Lanham, B.T. Loo, S. Shenker, and I. Stoica,
“Querying the Internet with PIER,” Proc. 29th Int’l Conf. Very Large Data Bases, pp.
321-332, 2003.
[7] H.V. Jagadish, B.C. Ooi, K.-L. Tan, Q.H. Vu, and R. Zhang, “Speeding up Search in
Peer-to-Peer Networks with a Multi-Way Tree Structure,” Proc. ACM SIGMOD Int’l
Conf. Management of Data, 2006.
[8] H.V. Jagadish, B.C. Ooi, K.-L. Tan, C. Yu, and R. Zhang, “iDistance: An Adaptive
B+-Tree Based Indexing Method for Nearest Neighbor Search,” ACM Trans. Database
Systems, vol. 30, pp. 364-397, June 2005.
[11] W.S. Ng, B.C. Ooi, K.-L. Tan, and A. Zhou, “PeerDB: A P2P-Based System for
Distributed Data Sharing,” Proc. 19th Int’l Conf. Data Eng., pp. 633-644, 2003.
[12] V. Poosala and Y.E. Ioannidis, “Selectivity Estimation without the Attribute Value
Independence Assumption,” Proc. 23rd Int’l Conf. Very Large Data Bases (VLDB ’97),
pp. 486-495, 1997.
[14] Saepio Technologies Inc., “The Enterprise Marketing Management Strategy Guide,”
White Paper, 2010.
[15] I. Tatarinov, Z.G. Ives, J. Madhavan, A.Y. Halevy, D. Suciu, N.N. Dalvi, X. Dong,
Y. Kadiyska, G. Miklau, and P. Mork, “The Piazza Peer Data Management Project,”
SIGMOD Record, vol. 32, no. 3, pp. 47-52, 2003.
[16] S. Wu, S. Jiang, B.C. Ooi, and K.-L. Tan, “Distributed Online Aggregation,” Proc.
VLDB Endowment, vol. 2, no. 1, pp. 443-454, 2009
Department of ISE, BIT Bangalore 91
Distributed Data Sharing Platform for Private Enterprise
[17] S. Wu, J. Li, B.C. Ooi, and K.-L. Tan, “Just-in-Time Query Retrieval over Partially
Indexed Data on Structured P2P Overlays,” Proc. ACM SIGMOD Int’l Conf.
Management of Data (SIGMOD ’08), pp. 279-290, 2008.
[18] S. Wu, Q.H. Vu, J. Li, and K.-L. Tan, “Adaptive Multi-Join Query Processing in
PDBMS,” Proc. IEEE Int’l Conf. Data Eng. (ICDE ’09), pp. 1239-1242, 2009.