Major Finalproject
Major Finalproject
Submitted in partial fulfillment of the requirement for the award of the Degree of
BACHELOR OF TECHNOLOGY
IN
COMPUTER SCIENCE AND ENGINEERING
Submitted By
website:www.kitw.ac.in
Dept_email_id:[email protected]
Date:
CERTIFICATE
This is to certify that the major project report entitled “SMART ROUTING
STARTEGIES FOR ENHANCING TRAFFIC AND ENERGY EFFICIENCY IN
HETEROGENOUS WIRELESS SENSOR NETWORK” is a record of bonafied work
carried out by by DODDULA RISHITHA(206B1A0520), AMBATI AKSHITHA
(206B1A0504), BALPE SHIVANI (206B1A0509), JAMPANA HARSHITHA
(206B1A0538) of B.Tech, under my supervision and guidance in Partial fulfillment for the
award of Bachelor of Technology in Computer Science and Engineering during the
academic year 2023-2024.
Mrs.T.MOUNIKA, Mrs.M.NAGARANI,Assoc.Prof
Asst.Prof M.Tech
ACKNOWLEDGEMENT I
DECLARATION II
ABSTRACT III
1. INTRODUCTION 1
3. EXISTING SYSTEM 7
4. PROPOSED SYSTEM 8
5. SYSTEM REQUIREMENTS 9
6. MODULES 10
CONCLUSION 37
REFFERENCES 38
Smart Routing Strategies for Enhancing Traffic and Energy Efficiency in
Heterogeneous Wireless Sensor Networks
ACKNOWLEDGEMENT
We would also like to thank our faculty and supporting staff of Computer Science and
Engineering Department and all other departments for their kind co-operation directly or
indirectly in making the project a successful one.
Finally, we want to deeply acknowledge all our friends and family members who have
encouraged us during the preparation of our project.
By
KITW-CSE Page I
Smart Routing Strategies for Enhancing Traffic and Energy Efficiency in
Heterogeneous Wireless Sensor Networks
DECLARATION
By
DODDULA RISHITHA 206B1A0520
AMBATI AKSHITHA 206B1A0504
BALPE SHIVANI 206B1A0509
JAMPANA HARHITHA 206B1A0538
KITW-CSE Page II
Smart Routing Strategies for Enhancing Traffic and Energy Efficiency in
Heterogeneous Wireless Sensor Networks
ABSTRACT
The energy-efficiency of routing algorithm is crucial for improving the lifetime of
battery constrained Wireless Sensor Networks (WSNs). The consideration of nodes heterogeneity in
routing is essential for achieving optimal resource utilization. This letter considers sensor nodes with
random initial energies and random disparities in data generation rate (traffic) to model a realistic
clustering based WSN suited for heterogeneous sensing applications. The letter presents an energy
model for the scenario and proposes a Traffic and Energy Aware Routing (TEAR) scheme to
improve the stability period. The simulation results indicate that TEAR outperforms other clustering
based routing algorithms under the scenario.
It is a resource constraint type network. Routing in WSN is most expensive task as it utilizes more
power resources. This paper is intended to introduce energy efficient routing protocol, known as
Position Responsive Routing Protocol (PRRP) to enhance energy efficiency of WSN.
Position responsive routing protocol differs in several ways than other existing routing techniques.
Position responsive routing protocol shows significant improvement of 45% in energy efficiency of
wireless sensor network life time as a whole by increasing battery life of individual nodes.
Furthermore PRRP shows drastic increases for data throughput and provide better solution to routing
energy hole due to it fair distributed approach of gateway selection.
1. INTRODUCTION
Internet of Things (IoT) envisions interoperability of heterogeneous devices to support diverse
applications, and the Wireless Sensor Network (WSN) technology is an important building block of
IoT sphere. Consideration of heterogeneity (e.g., energy, link and computational heterogeneities) can
improve the performance of WSN routing algorithms in terms of network lifetime, stability,
reliability, network delay, etc. The energy heterogeneity in WSN routing is pursued widely; however,
the link and computation heterogeneities, which are generally used along with the energy
heterogeneity, are relatively less explored areas. In the early work in WSN routing algorithms for
energy heterogeneous scenarios, Stable Election Protocol (SEP) considers two-level energy
heterogeneity in Low-Energy Adaptive Clustering Hierarchy (LEACH) like cluster-head (CH) role
rotation environment. SEP proposes weighted election probabilities based on the initial energies of the
nodes to give energy and residual energy for CH role The heterogeneity in terms of disparities in data
generation rate (traffic) is considered under computation heterogeneity. Analyzed the effect of traffic
heterogeneity in homogeneous WSN routing (LEACH) algorithm. Energy Dissipation Forecast and
Clustering Management (EDFCM) considers traffic heterogeneity along with energy heterogeneity in
a very specific two-level WSN. Further, EDFCM considers additional nodes (management nodes) to
control the number of clusters, which makes its natural distributed localized decision-making behavior
questionable.
The consideration of traffic heterogeneity along with energy heterogeneity is crucial for modeling
realistic WSNs with application heterogeneity and event-driven scenarios. This letter considers both,
energy and traffic heterogeneities, with multiple random levels. An energy model is presented for the
multi-heterogeneity scenario, where consideration of multi-level traffic heterogeneity is a novel
concept.
KITW-CSE Page 1
Smart Routing Strategies for Enhancing Traffic and Energy Efficiency in
Heterogeneous Wireless Sensor Networks
2. LITERATURE SURVEY
1 School of Communication and Information Engineering, Xi’an University of Posts and
Telecommunications, Xi’an 710121, China
2 Shaanxi Key Laboratory of Information Communication Network and Security, Xi’an University
of Posts and Telecommunications, Xi’an 710121, China
Abstract
Wireless sensor network (WSN) nodes are devices with limited power, and rational utilization of
node energy and prolonging the network lifetime are the main objectives of the WSN’s routing
protocol. However, irrational considerations of heterogeneity of node energy will lead to an energy
imbalance between nodes in heterogeneous WSNs (HWSNs). Therefore, in this paper, a routing
protocol for HWSNs based on the modified grey wolf optimizer (HMGWO) is proposed. First, the
protocol selects the appropriate initial clusters by defining different fitness functions for
heterogeneous energy nodes; the nodes’ fitness values are then calculated and treated as initial
weights in the GWO. At the same time, the weights are dynamically updated according to the
distance between the wolves and their prey and coefficient vectors to improve the GWO’s
optimization ability and ensure the selection of the optimal cluster heads (CHs). The experimental
results indicate that the network lifecycle of the HMGWO protocol improves by 55.7%, 31.9%,
46.3%, and 27.0%, respectively, compared with the stable election protocol (SEP), distributed
energy-efficient clustering algorithm (DEEC), modified SEP (M-SEP), and fitness-value-based
improved GWO (FIGWO) protocols. In terms of the power consumption and network throughput,
the HMGWO is also superior to other protocols.
Abstract
WSN has important applications such as habitat monitoring, structural health monitoring, target
tracking in military and many more. This has evolved due to availability of sensors that are cheaper
KITW-CSE Page 2
Smart Routing Strategies for Enhancing Traffic and Energy Efficiency in
Heterogeneous Wireless Sensor Networks
and intelligent but these are having battery support. So, one of the major issues in WSN is
maximization of network life. Heterogeneous WSNs have the potential to improve network lifetime
and also provide higher quality networking and system services than the homogeneous WSN.
Routing is the main concern of energy consumption in WSN. Previous research shows that
performance of the network can be improve significantly using protocol of hierarchical HWSN.
However, the appropriateness of a particular routing protocol mainly depends on the capabilities of
the nodes and on the application requirements. This study presents different aspects of
Heterogeneous Wireless Sensor network and design issues for routing in heterogeneous
environment. Different perspectives from different authors regarding energy efficiency based on
resource heterogeneity for heterogeneous wireless sensor networks have been presented.
Abstract - In these recent years, loT has graded the forecast of agriculture and automation. A loT,
which mostly comprises different technologies. The wireless sensor network is one such big
technology. Nodes communicate with each other through the nodes, which are spatially arranged.
The communication between nodes is wireless, and the data is sent to the Base Station.
Communication is established between the nodes through the concept of routing protocols. We
have different routing algorithms for different networks. LEACH, DEEC and more are the routing
protocols used for homogenous networks, and SEP (stable election protocol) is one of the routing
algorithms used in heterogeneous networks. The importance of these protocols comes from not
only the communication but also the need to be energy efficient and less power consumptive. We
implemented the routing algorithm SEP to observe its constituents like power consumption, energy
usage, data transmission, and the number of dead nodes. By observing the factors of SEP, as it is
not much effective protocol and thus implemented the improved or advanced protocol of SEP that
is Improved version-SEP. I-SEP is an algorithm for the Stable Election Protocol, which is an
improved algorithm. In this improved version of SEP, we have the concept of cluster head
formation. It means the group of nodes elects the single node as head and transfers their data to the
head. It's the most efficient use of energy as the nodes need not waste energy in transmitting the
KITW-CSE Page 3
Smart Routing Strategies for Enhancing Traffic and Energy Efficiency in
Heterogeneous Wireless Sensor Networks
information as the transmission is the duty of Cluster Heads. In the I-SEP protocol, the number of
not live nodes decreases as it is less powerconsumptive. So, its use over the SEP is more helpful in
the longevity of nodes and networks. We need to implement the protocol for the purpose of the
high network lifetime and the best use of its energy. Implementation was done in MATLAB. We
studied the existing algorithm SEP, and after finding the difficulties and drawbacks in the factors,
we implemented ISEP.
Abstract— the previous few years have seen an enlarged interest in the prospective utilize of
wireless sensor networks (WSNs) in different fields like: - disaster management, battle ground
surveillance, and border security surveillance. In such applications, a huge number of sensor
nodes are deployed, which are frequently unattended and work separately. Clustering is a key
technique used to expand the lifetime of a sensor network by reducing energy consumption. It
can also raise network scalability. Researchers in all fields of wireless sensor network think that
nodes are homogeneous, but some nodes may be of dissimilar energy to extend the lifetime of a
WSN and its dependability. In this paper, we presented heterogeneous model for Wireless
Sensor Network and clustering algorithms proposed in the literature for heterogeneous wireless
sensor networks (HWSNs).A systematic review on heterogeneous routing protocols for wireless
sensor network
Thapar Institute of Engineering and Technology (Deemed University), Patiala (Punjab), India,Joel
Rodrigues,Senac Faculty of Ceará
The research and development in wireless communication and networking is more focused on
delivering sensitive information to its final destination under several constraints such as energy, latency,
reliability, stability, and security. Through the rapid advancement in digital technology, wireless
transceiver, and Micro Electro-Mechanical Systems (MEMS), it can be possible to integrate sensing and
computing units along with transceiver and power supply into a single unit called as Sensor Nodes
(SNs). The collection of SNs built a specialized type of network called as Wireless Sensor Networks
KITW-CSE Page 4
Smart Routing Strategies for Enhancing Traffic and Energy Efficiency in
Heterogeneous Wireless Sensor Networks
(WSNs). Many pre-existing research proposals on WSNs have focused mainly on minimization of
energy consumption during the process of sensing, computation and transferring the same to the Base
Station (BS) through gateways. Although clustering is the most prominent technique for the
enhancement of network lifetime by efficient energy utilization of SN, but node heterogeneity is
another interesting aspect which can be used to save the energy consumption of SNs in the network
field. Keeping in view of all these issues, in this paper, we have categorized various heterogeneous
routing protocols for WSNs based upon predefined parameters. In this work, we focused on the static
BS only, however, the location of BS is not fixed. Relative comparison of various protocols with other
state of the art existing protocols is provided with respect to different performance evaluation
parameters, like CH Selection, Energy Efficiency, Security and Application Specific. The broad
categorization gives insights to various users to select one of the protocols from different categories
based upon its merits over the other proposals.
Hybrid Heterogeneous Routing Scheme for Improved Network Performance in WSNs for Animal
Tracking
KITW-CSE Page 5
Smart Routing Strategies for Enhancing Traffic and Energy Efficiency in
Heterogeneous Wireless Sensor Networks
3. EXISTING SYSTEM
In the existing system, Kim addressed the downward routing reliability problem in RPL
and designed an asymmetric transmission power based network where the root directly
transmits downlink packets to destination nodes using higher transmission power than low
power nodes possess. Ko proposed the interoperability problem of two operation modes
(MOPs) defined in the RPL standard, ultimately demonstrating that there is a serious
connectivity problem when two MOPs are mixed within a single network.
The Dual MOP-RPL, which allows nodes with different MOPs to communicate gracefully
in a single network while preserving the high bi-directional data delivery performance, was
established to solve this problem. None of these studies have investigated RPL load
balancing problems over a real multi-hop LLN test bed, however.
In the existing system, many energy consumption algorithms have been proposed to
optimize and improve original RPL routing protocol. Gaddour, for example, proposed the
CO-RPL, which functions by using multiple route selection to improve the original RPL
object function.
CO-RPL exhibits better energy consumptions and packet pass rates than original RPL, but
packet congestion and control packet flooding are still possible in large-scale wireless
sensor networks. Zhang established a new RPL routing object function based on energy-
efficiency, but only energy conservation (not energy balancing) is considered during
routing.
Disadvantages
KITW-CSE Page 6
Smart Routing Strategies for Enhancing Traffic and Energy Efficiency in
Heterogeneous Wireless Sensor Networks
4. PROPOSED SYSTEM
The system in WSN routing algorithms for energy heterogeneous scenarios, Stable Election
Protocol (SEP) considers two-level energy heterogeneity in Low-Energy Adaptive Clustering
Hierarchy (LEACH) like cluster-head (CH) role rotation environment.
SEP proposes weighted election probabilities based on the initial energies of the nodes to give
energy-rich nodes more chances of becoming CHs. The Distributed Energy-Efficient Clustering
(DEEC) considers multi-level energy heterogeneous WSN and prefers nodes with higher initial
energy and residual energy for CH role.
Advantages
KITW-CSE Page 7
Smart Routing Strategies for Enhancing Traffic and Energy Efficiency in
Heterogeneous Wireless Sensor Networks
5. SYSTEM REQUIREMENTS
Hardware Requirements:
Software Requirements:
• Operating system : Windows XP or Windows 7, Windows 8.
• Coding Language : Java – AWT,Swings,Networking
• Data Base : My Sql / MS Access.
• Documentation : MS Office
• IDE : Eclipse Galileo
• Development Kit : JDK 1.6
KITW-CSE Page 8
Smart Routing Strategies for Enhancing Traffic and Energy Efficiency in
Heterogeneous Wireless Sensor Networks
6. MODULES
IMPLEMENTATION
Source:
In this module, the service provider will browse the data file and then send to the particular
receivers. Service provider will send their data file to router and router will connect to clusters, in a
cluster highest energy sensor node will be activated and send to particular receiver (A, B, C…).
And if any attacker will change the energy of the particular sensor node, then service provider will
reassign the energy for sensor node.
Router
The Router manages a multiple clusters (cluster1, cluster2, cluster3, and cluster4) to provide data
storage service. In cluster n-number of nodes (n1, n2, n3, n4…) are present, and in a cluster the
sensor node which have more energy considered as a cluster head and it will communicate first. In
a router service provider can view the node details, view routing path, view time delay and view
attackers.
Cluster
In cluster n-number nodes are present and the clusters are communicates with every clusters
(cluster1, cluster2, cluster3 and cluster4).In a cluster the sensor node which have more energy
considered as a cluster head.
Attacker
Attacker is one who is injecting the fake energy to the corresponding sensor nodes. The attacker
decries the energy to the particular sensor node. After attacking the nodes, energy will be changed
in a router.
KITW-CSE Page 9
Smart Routing Strategies for Enhancing Traffic and Energy Efficiency in
Heterogeneous Wireless Sensor Networks
7. SYSTEM DESIGN
KITW-CSE Page 10
Smart Routing Strategies for Enhancing Traffic and Energy Efficiency in
Heterogeneous Wireless Sensor Networks
CLASS DIAGRAM:
KITW-CSE Page 11
Smart Routing Strategies for Enhancing Traffic and Energy Efficiency in
Heterogeneous Wireless Sensor Networks
SEQUENCE DIAGRAM
KITW-CSE Page 12
Smart Routing Strategies for Enhancing Traffic and Energy Efficiency in
Heterogeneous Wireless Sensor Networks
KITW-CSE Page 13
Smart Routing Strategies for Enhancing Traffic and Energy Efficiency in
Heterogeneous Wireless Sensor Networks
8. SOFTWARE ENVIRONMENTS
Java Technology
Java technology is both a programming language and a platform.
compiled and interpreted. With the compiler 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, 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.
KITW-CSE Page 14
Smart Routing Strategies for Enhancing Traffic and Energy Efficiency in
Heterogeneous Wireless Sensor Networks
You can think of Java byte codes as the machine code instructions for the Java Virtual Machine
(Java VM). Every Java interpreter, whether it’s a development tool or a Web browser that can run
applets, is an implementation of the Java VM. Java 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.
KITW-CSE Page 15
Smart Routing Strategies for Enhancing Traffic and Energy Efficiency in
Heterogeneous Wireless Sensor Networks
Java platform differs from most other platforms in that it’s a software-only platform that runs
on top of other hardware-based platforms.
However, the Java programming language is not just for writing cute, entertaining applets for
the Web. The general-purpose, high-level Java programming language is also a powerful
software platform. Using the generous API, you can write many types of programs.
An application is a standalone program that runs directly on the Java platform. A special kind
of application known as a server serves and supports clients on a network. Examples of servers
are Web servers, proxy servers, mail servers, and print servers. Another specialized program is
a servlet. A servlet can almost be thought of as an applet that runs on the server side. Java
Servlets are a popular choice for building interactive web applications, replacing the use of CGI
scripts. Servlets are similar to applets in that they are runtime extensions of applications.
Instead of working in browsers, though, servlets run within Java Web servers, configuring or
tailoring the server.
How does the API support all these kinds of programs? It does so with packages of software
components that provides a wide range of functionality. Every full implementation of the Java
platform gives IP
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 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.
KITW-CSE Page 16
Smart Routing Strategies for Enhancing Traffic and Energy Efficiency in
Heterogeneous Wireless Sensor Networks
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.
KITW-CSE Page 17
Smart Routing Strategies for Enhancing Traffic and Energy Efficiency in
Heterogeneous Wireless Sensor Networks
Write less code: Comparisons of program metrics (class counts, method counts, and so
on) suggest that a program written in the Java programming language can be four times
smaller than the same program in C++.
Write better code: The Java programming language encourages good coding practices,
and its garbage collection helps you avoid memory leaks. Its object orientation, its
JavaBeans component architecture, and its wide-ranging, easily extendible API let you
reuse other people’s tested code and introduce fewer bugs.
Develop programs more quickly: Your development time may be as much as twice as
fast versus writing the same program in C++. Why? You write fewer lines of code and it is
a simpler programming language than C++.
Avoid platform dependencies with 100% Pure Java: You can keep your program
portable by avoiding the use of libraries written in other languages. The 100% Pure Java TM
Product Certification Program has a repository of historical process manuals, white papers,
brochures, and similar materials onli.
Write once, run anywhere: Because 100% Pure Java programs are compiled into
machine-independent byte codes, they run consistently on any Java platform.
Distribute software more easily: You can upgrade applets easily from a central server.
Applets take advantage of the feature of allowing new classes to be loaded “on the fly,”
without recompiling the entire program.
ODBC
Microsoft Open Database Connectivity (ODBC) is a standard programming interface for
application developers and database systems providers. Before ODBC became a de facto standard for
Windows programs to interface with database systems, programmers had to use proprietary languages
for each database they wanted to connect to. Now, ODBC has made the choice of the database system
almost irrelevant from a coding perspective, which is as it should be. Application developers have much
more important things to worry about than the syntax that is needed to port their program from one
database to another when business needs suddenly change.
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
KITW-CSE Page 18
Smart Routing Strategies for Enhancing Traffic and Energy Efficiency in
Heterogeneous Wireless Sensor Networks
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 doesn’t 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 isn’t 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.
KITW-CSE Page 19
Smart Routing Strategies for Enhancing Traffic and Energy Efficiency in
Heterogeneous Wireless Sensor Networks
To gain a wider acceptance of JDBC, Sun based JDBC’s 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:
1. SQL Level API
The designers felt that their main goal was to define a SQL interface for Java. Although not the
lowest database interface level possible, it is at a low enough level for higher-level tools and APIs
to be created. Conversely, it is at a high enough level for application programmers to use it
confidently. Attaining this goal allows for future tool vendors to “generate” JDBC code and to hide
many of JDBC’s complexities from the end user.
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.
KITW-CSE Page 20
Smart Routing Strategies for Enhancing Traffic and Energy Efficiency in
Heterogeneous Wireless Sensor Networks
Because of Java’s 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.
Simple Architecture-neutral
Object-oriented Portable
Distributed High-performance
Interpreted multithreaded
Robust Dynamic Secure
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.
KITW-CSE Page 21
Smart Routing Strategies for Enhancing Traffic and Energy Efficiency in
Heterogeneous Wireless Sensor Networks
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 it’s 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.
Networking
TCP/IP stack
KITW-CSE Page 22
Smart Routing Strategies for Enhancing Traffic and Energy Efficiency in
Heterogeneous Wireless Sensor Networks
IP datagram’s
The IP layer provides a connectionless and unreliable delivery system. It considers each
datagram independently of the others. Any association between datagram must be supplied by
the higher layers. The IP layer supplies a checksum that includes its own header. The header
includes the source and destination addresses. The IP layer handles routing through an Internet.
It is also responsible for breaking up large datagram into smaller ones for transmission and
reassembling them at the other end.
UDP
UDP is also connectionless and unreliable. What it adds to IP is a checksum for the contents
of the datagram and port numbers. These are used to give a client/server model - see later.
KITW-CSE Page 23
Smart Routing Strategies for Enhancing Traffic and Energy Efficiency in
Heterogeneous Wireless Sensor Networks
TCP
TCP supplies logic to give a reliable connection-oriented protocol above IP. It provides a
virtual circuit that two processes can use to communicate.
Internet addresses
In order to use a service, you must be able to find it. The Internet uses an address scheme
for machines so that they can be located. The address is a 32 bit integer which gives the IP
address. This encodes a network ID and more addressing. The network ID falls into various
classes according to the size of the network address.
Network address
Class A uses 8 bits for the network address with 24 bits left over for other addressing. Class
B uses 16 bit network addressing. Class C uses 24 bit network addressing and class D uses
all 32.
Subnet address
Internally, the UNIX network is divided into sub networks. Building 11 is currently on one
sub network and uses 10-bit addressing, allowing 1024 different hosts.
Host address
8 bits are finally used for host addresses within our subnet. This places a limit of 256
machines that can be on the subnet.
Total address
KITW-CSE Page 24
Smart Routing Strategies for Enhancing Traffic and Energy Efficiency in
Heterogeneous Wireless Sensor Networks
Port addresses
A service exists on a host, and is identified by its port. This is a 16 bit number. To send a
message to a server, you send it to the port for that service of the host that it is running on. This
is not location transparency! Certain of these ports are "well known".
Sockets
A socket is a data structure maintained by the system to handle network connections. A socket
is created using the call socket. It returns an integer that is like a file descriptor. In fact, under
Windows, this handle can be used with Read File and Write File functions.
#include <sys/types.h>
#include <sys/socket.h>
int socket(int family, int type, int protocol);
Here "family" will be AF_INET for IP communications, protocol will be zero, and type will
depend on whether TCP or UDP is used. Two processes wishing to communicate over a
network create a socket each. These are similar to two ends of a pipe - but the actual pipe does
not yet exist.
KITW-CSE Page 25
Smart Routing Strategies for Enhancing Traffic and Energy Efficiency in
Heterogeneous Wireless Sensor Networks
J2ME uses configurations and profiles to customize the Java Runtime Environment (JRE). As a
complete JRE, J2ME is comprised of a configuration, which determines the JVM used, and a profile,
which defines the application by adding domain-specific classes. The configuration defines the basic
run-time environment as a set of core classes and a specific JVM that run on specific types of devices.
We'll discuss configurations in detail in the The profile defines the application; specifically, it adds
domain-specific classes to the J2ME configuration to define certain uses for devices. We'll cover
profiles in depth in the The following graphic depicts the relationship between the different virtual
machines, configurations, and profiles. It also draws a parallel with the J2SE API and its Java virtual
machine. While the J2SE virtual machine is generally referred to as a JVM, the J2ME virtual machines,
KVM and CVM, are subsets of JVM. Both KVM and CVM can be thought of as a kind of Java virtual
machine -- it's just that they are shrunken versions of the J2SE JVM and are specific to J2ME.
Introduction In this section, we will go over some considerations you need to keep in mind when
developing applications for smaller devices. We'll take a look at the way the compiler is invoked when
using J2SE to compile J2ME applications. Finally, we'll explore packaging and deployment and the role
preverification plays in this process.
KITW-CSE Page 26
Smart Routing Strategies for Enhancing Traffic and Energy Efficiency in
Heterogeneous Wireless Sensor Networks
9. SYSTEM STUDY
FEASIBILITY STUDY
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.
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.
KITW-CSE Page 27
Smart Routing Strategies for Enhancing Traffic and Energy Efficiency in
Heterogeneous Wireless Sensor Networks
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.
KITW-CSE Page 28
Smart Routing Strategies for Enhancing Traffic and Energy Efficiency in
Heterogeneous Wireless Sensor Networks
PRELIMINARY INVESTIGATION
The first and foremost strategy for development of a project starts from the thought of
designing a mail enabled platform for a small firm in which it is easy and convenient of
sending and receiving messages, there is a search engine ,address book and also including
some entertaining games. When it is approved by the organization and our project guide the
first activity, ie. preliminary investigation begins. The activity has three parts:
Request Clarification
Feasibility Study
Request Approval
REQUEST CLARIFICATION
After the approval of the request to the organization and project guide, with an investigation
being considered, the project request must be examined to determine precisely what the system
requires. Here our project is basically meant for users within the company whose systems can
be interconnected by the Local Area Network(LAN). In today’s busy schedule man need
everything should be provided in a readymade manner. So taking into consideration of the
vastly use of the net in day to day life, the corresponding development of the portal came into
existence.
FEASIBILITY ANALYSIS
An important outcome of preliminary investigation is the determination that the system request is
feasible. This is possible only if it is feasible within limited resource and time. The different feasibilities
that have to be analyzed are
KITW-CSE Page 29
Smart Routing Strategies for Enhancing Traffic and Energy Efficiency in
Heterogeneous Wireless Sensor Networks
Operational Feasibility
Economic Feasibility
Technical Feasibility
Operational Feasibility
Operational Feasibility deals with the study of prospects of the system to be developed. This system
operationally eliminates all the tensions of the Admin and helps him in effectively tracking the project
progress. This kind of automation will surely reduce the time and energy, which previously consumed
in manual work. Based on the study, the system is proved to be operationally feasible.
Economic Feasibility
Technical Feasibility
According to Roger S. Pressman, Technical Feasibility is the assessment of the technical resources of
the organization. The organization needs IBM compatible machines with a graphical web browser
connected to the Internet and Intranet. The system is developed for platform Independent environment.
Java Server Pages, JavaScript, HTML, SQL server and WebLogic Server are used to develop the
system. The technical feasibility has been carried out. The system is technically feasible for
development and can be developed with the existing facility.
REQUEST APPROVAL
Not all request projects are desirable or feasible. Some organization receives so many project requests
from client users that only few of them are pursued. However, those projects that are both feasible
and desirable should be put into schedule. After a project request is approved, it cost, priority,
completion time and personnel requirement is estimated and used to determine where to add it to
any project list. Truly speaking, the approval of those above factors, development works can be
launched.
KITW-CSE Page 30
Smart Routing Strategies for Enhancing Traffic and Energy Efficiency in
Heterogeneous Wireless Sensor Networks
INPUT DESIGN
Input Design plays a vital role in the life cycle of software development, it requires very careful
attention of developers. The input design is to feed data to the application as accurate as possible. So
inputs are supposed to be designed effectively so that the errors occurring while feeding are minimized.
According to Software Engineering Concepts, the input forms or screens are designed to provide to
have a validation control over the input limit, range and other related validations.
This system has input screens in almost all the modules. Error messages are developed to alert the user
whenever he commits some mistakes and guides him in the right way so that invalid entries are not
made. Let us see deeply about this under module design.
Input design is the process of converting the user created input into a computer-based format. The goal
of the input design is to make the data entry logical and free from errors. The error is in the input are
controlled by the input design. The application has been developed in user-friendly manner. The forms
have been designed in such a way during the processing the cursor is placed in the position where must
be entered. The user is also provided with in an option to select an appropriate input from various
alternatives related to the field in certain cases.
Validations are required for each data entered. Whenever a user enters an erroneous data, error message
is displayed and the user can move on to the subsequent pages after completing all the entries in the
current page.
OUTPUT DESIGN
The Output from the computer is required to mainly create an efficient method of
communication within the company primarily among the project leader and his team members, in other
words, the administrator and the clients. The output of VPN is the system which allows the project
leader to manage his clients in terms of creating new clients and assigning new projects to them,
maintaining a record of the project validity and providing folder level access to each client on the user
side depending on the projects allotted to him. After completion of a project, a new project may be
assigned to the client. User authentication procedures are maintained at the initial stages itself. A new
user may be created by the administrator himself or a user can himself register as a new user but the
task of assigning projects and validating a new user rests with the administrator only.
KITW-CSE Page 31
Smart Routing Strategies for Enhancing Traffic and Energy Efficiency in
Heterogeneous Wireless Sensor Networks
The application starts running when it is executed for the first time. The server has to be started and
then the internet explorer in used as the browser. The project will run on the local area network so the
server machine will serve as the administrator while the other connected systems can act as the clients.
The developed system is highly user friendly and can be easily understood by anyone using it even for
the first time.
KITW-CSE Page 32
Smart Routing Strategies for Enhancing Traffic and Energy Efficiency in
Heterogeneous Wireless Sensor Networks
Router
KITW-CSE Page 33
Smart Routing Strategies for Enhancing Traffic and Energy Efficiency in
Heterogeneous Wireless Sensor Networks
Base station
Destination file
KITW-CSE Page 34
Smart Routing Strategies for Enhancing Traffic and Energy Efficiency in
Heterogeneous Wireless Sensor Networks
Attacker file
Upload file
KITW-CSE Page 35
Smart Routing Strategies for Enhancing Traffic and Energy Efficiency in
Heterogeneous Wireless Sensor Networks
Routing path
KITW-CSE Page 36
Smart Routing Strategies for Enhancing Traffic and Energy Efficiency in
Heterogeneous Wireless Sensor Networks
CONCLUSION
KITW-CSE Page 37
Smart Routing Strategies for Enhancing Traffic and Energy Efficiency in
Heterogeneous Wireless Sensor Networks
REFERENCE
[1] S. Tanwar, N. Kumar, and J. J. Rodrigues, "A systematic review on heterogeneous routing
protocols for wireless sensor network," Journal of network and computer applications, vol. 53,
pp. 39-56, 2015.
[2] G. Smaragdakis, I. Matta, and A. Bestavros, "SEP: A stable election protocol for clustered
heterogeneous wireless sensor networks," in Second international workshop on sensor and actor
network protocols and applications (SANPA 2004), 2004.
[4] L. Qing, Q. Zhu, and M. Wang, "Design of a distributed energyefficient clustering algorithm for
heterogeneous wireless sensor networks," Computer communications, vol. 29, pp. 2230-2237,
2006.
[5] H. Zhou, Y. Wu, Y. Hu, and G. Xie, "A novel stable selection and reliable transmission protocol
for clustered heterogeneous wireless sensor networks," Computer communications, vol. 33, pp.
18431849, 2010.
[6] D. Sharma, A. P. Bhondekar, A. Ojha, A. Shukla, and C. Ghanshyam, "A traffic aware cluster
head selection mechanism for hierarchical wireless sensor networks routing," in IEEE Parallel,
Distributed and Grid Computing (PDGC), 2016 Fourth International Conference on, 2016, pp.
673-678.
[7] M.-Y. Wang, J. Ding, W.-P. Chen, and W.-Q. Guan, "SEARCH: A stochastic election approach
for heterogeneous wireless sensor networks," Communications Letters, IEEE, vol. 19, pp. 443-
446, 2015
KITW-CSE Page 38