3 introductiond
DESCRIPTION
introTRANSCRIPT
Greedy Routing with Anti-Void Traversal Introduction For Wireless Sensor Networks
1. INTRODUCTION
1.1INTRODUCTION
A wireless sensor network (WSN) consists of sensor nodes (SNs) with wireless
communication capabilities for specific sensing tasks. Due to the limited available
resources, efficient design of localized multihop routing protocols becomes a crucial subject
within the WSNs. How to guarantee delivery of packets is considered an Important issue for
the localized routing algorithms. The well-known greedy forwarding (GF) algorithm is
considered a superior scheme with its low routing overheads.
However, the void problem, which makes the GF technique unable to find its next closer hop
to the destination, will cause the GF algorithm failing to guarantee the delivery of data packets.
Several routing algorithms are proposed to either resolve or reduce the void problem, which
can be classified into non-graph-based and graph-based schemes. In the non graph- based
algorithms the intuitive schemes as proposed in construct a two-hop neighbor table for
implementing the GF algorithm. The network flooding mechanism is adopted Within the GRA
and PSR schemes while the void problem occurs. There also exist routing protocols that adopt
the backtracking method at the occurrence of the network holes . The routing schemes as
proposed by ARP and LFR memorize the routing path after the void problem takes Place.
Moreover, other routing protocols propagate and update the information of the observed void
node in order to reduce the probability of encountering the void problem. By exploiting these
routing algorithms, however, the void problem can only be either
1) Partially alleviated or
2) Resolved with considerable routing overheads and significant converging time.
On the other hand, there are research works on the design of graph-based routing algorithms to
deal with the void problem.
1
Greedy Routing with Anti-Void Traversal Introduction For Wireless Sensor Networks
GREEDY ANTI-VOID ROUTING (GAR) PROTOCOL
The objective of the GAR protocol is to resolve the void problem such that the packet
delivery from NS to ND can be guaranteed. Before diving into the detail formulation of the
proposed GAR algorithm, an introductory example is described in order to facilitate the
understanding of the GAR protocol. The data packets initiated from the source node NS to the
destination node ND will arrive in NV based on the GF algorithm. The void problem occurs
asNV receives the packets, which leads to the adoption of the RUT scheme as the forwarding
strategy of the GAR protocol. A circle is formed by centering at sV with its radius being equal
to half of the transmission range R=2. The circle is hinged at NV and starts to conduct
counterclockwise rolling until an SN has been encountered by the boundary of the circle, i.e.,
NA. Consequently, the data packets in NV will be forwarded to the encountered node NA.
Subsequently, a new equal-sized circle will be formed, which is centered at sA and
hinged at node NA. The counterclockwise rolling procedure will be proceeded in order to
select the next hop node, i.e., NB in this case. Similarly, same process will be performed by
other intermediate nodes (such as NB and NX) until the node NY is reached, which is
considered to have a smaller distance to ND than that of NV to ND. The conventional GF
scheme will be resumed at NY for delivering data packets to the destination node ND. As a
consequence, the resulting path by adopting the GAR protocol.
2
Greedy Routing with Anti-Void Traversal Introduction For Wireless Sensor Networks
Fig 1.1.1 Greedy anti-void routing (gar) protocol implementation
3
Greedy Routing with Anti-Void Traversal Introduction For Wireless Sensor Networks
Proposed Rolling-Ball UDG Boundary Traversal (RUT) Scheme
The RUT scheme is adopted to solve the boundary finding problem, and the
combination of the GF and the RUT scheme (i.e., the GAR protocol) can resolve the void
problem, leading to the guaranteed packet delivery. The definition of boundary and the
problem statement are described as follows:
Definition If there exists a set B _ N such that 1) the nodes in B form a simple unidirectional
ring and 2) the nodes located on and inside the ring are disconnected with those outside of the
ring, B is denoted as the boundary set and the unidirectional ring is called a boundary.
Fig 1.1.2 The proposed RUT scheme.
Partial UDG Construction (PUC) Mechanism
4
Greedy Routing with Anti-Void Traversal Introduction For Wireless Sensor Networks
The PUC mechanism is targeted to recover the UDG linkage of the boundary node Ni
within a non-UDG network. The boundary nodes within the proposed GAR protocol are
defined as the SNs that are utilized to handle the packet delivery after encountering the void
problem. As shown in Fig. 6, node Ni is considered a boundary node since the converged SP
arc segment exists after Ni conducts the proposed IMS algorithm by the input of the current
one-hop neighbors fN1;N2;N3;N4;Njg. It is noted that the boundary nodes consist of a portion
of the network SNs. Therefore, conducting the PUC mechanism only by the boundary nodes
can conserve network resources than most of the existing flooding-based schemes that require
information from all the network nodes.
Hop Count Reduction (HCR) Mechanism
Based on the rolling-ball traversal within the RUT scheme, the selected next-hop nodes
may not be optimal by considering the minimal HC criterion. Excessive routing delay
associated with power consumption can occur if additional hop nodes are traversed by
adopting the RUT scheme.The void node NV starts the RUT scheme by selecting N1 as its
next hop node with the HCR and the IN mechanisms counterclockwise rolling direction, while
N2 and N3 are continuously chosen as the next hop nodes. Considering the case that N3 is
located within the same transmission range of N1, it is apparently to observe that the packets
can directly be transmitted from N1 to N3. Excessive communication waste can be preserved
without conducting the rerouting process to N2
Intersection Navigation (IN) Mechanism
The IN mechanism is utilized to determine the rolling direction in the RUT scheme
while the void problem occurs. It is noticed that the selection of rolling direction (i.e., either
counterclockwise or clockwise) does not influence the correctness of the proposed RUT
scheme to solve Problem 2, as in Theorem 1. However, the routing efficiency may be severely
degraded if a comparably longer routing path is selected at the occurrence of a void node. The
primary benefit of the IN scheme is to choose a feasible rolling direction while a void node is
encountered.
1.2 Literature
5
Greedy Routing with Anti-Void Traversal Introduction For Wireless Sensor Networks
We present platypus, an authenticated source routing system routing system built around
the concept of network capabilities, which allow for accountable, fine-grained path selected by
cryptographically attesting to policy compliance at each hop along a source route. Platypus
policy framework that can be used to address several issues in wide-area routing at both the
edge and the core, and evaluate its performance and security. Our result shows that
incremental deployment of platypus can achieve immediate gains.
C#
Language used mostly at the client levels which have the capability of creating
dynamic wed pages. The essential need of VBScript is due to the following requirements.
1. User interaction
2. Data validation
3. Client side utility
FEATURES
i. Interpreted language
ii. Object oriented support
iii. Provides procedural capabilities
iv. Work on event driven model
v. Embedded within ML format
vi. Works on Document Object Model
ELEMENT OF C#
6
Greedy Routing with Anti-Void Traversal Introduction For Wireless Sensor Networks
i. Variable
ii. Arrays
iii. Control statements
iv. Functions
v. Objects
vi. Events
vii. Delegation
viii. Properties
ix. Interface
x. Exceptions
Client Application Development
Client applications are the closest to a traditional style of application in Windows-
based programming. These are the types of applications that display windows or forms on the
desktop, enabling a user to perform a task. Client applications include applications such as
word processors and spreadsheets, as well as custom business applications such as data-entry
tools, reporting tools, and so on. Client applications usually employ windows, menus, buttons,
and other GUI elements, and they likely access local resources such as the file system and
peripherals such as printers.
Another kind of client application is the traditional ActiveX control (now replaced by
the managed Windows Forms control) deployed over the Internet as a Web page. This
application is much like other client applications: it is executed natively, has access to local
resources, and includes graphical elements.
In the past, developers created such applications using C/C++ in conjunction with the
Microsoft Foundation Classes (MFC) or with a rapid application development (RAD)
environment such as Microsoft® Visual Basic®. The .NET Framework incorporates aspects of
these existing products into a single, consistent development environment that drastically
simplifies the development of client applications.
7
Greedy Routing with Anti-Void Traversal Introduction For Wireless Sensor Networks
The Windows Forms classes contained in the .NET Framework are designed to be used
for GUI development. You can easily create command windows, buttons, menus, toolbars, and
other screen elements with the flexibility necessary to accommodate shifting business needs.
For example, the .NET Framework provides simple properties to adjust visual
attributes associated with forms. In some cases the underlying operating system does not
support changing these attributes directly, and in these cases the .NET Framework
automatically recreates the forms. This is one of many ways in which the .NET Framework
integrates the developer interface, making coding simpler and more consistent.
Microsoft.NET Framework
The .NET Framework is a new computing platform that simplifies application
development in the highly distributed environment of the Internet. The .NET Framework is
designed to fulfill the following objectives:
FEATURES
Interoperability
Because computer systems commonly require interaction between new and older
applications, the .NET Framework provides means to access functionality that is implemented
in programs that execute outside the .NET environment. Access to com components is
provided in the System.Runtime.InteropServices and System.EnterpriseServices namespaces
of the framework; access to other functionality is provided using the P/Invoke feature.
Common Language Runtime Engine
The Common Language Runtime (CLR) is the execution engine of the .NET
Framework. All .NET programs execute under the supervision of the CLR, guaranteeing
certain properties and behaviors in the areas of memory management, security, and exception
handling.
8
Greedy Routing with Anti-Void Traversal Introduction For Wireless Sensor Networks
Language Independence
The .NET Framework introduces a Common Type System, or CTS. The
CTS specification defines all possible datatypes and programming constructs supported by the
CLR and how they may or may not interact with each other conforming to the Common
Language Infrastructure (CLI) specification. Because of this feature, the .NET Framework
supports the exchange of types and object instances between libraries and applications written
using any conforming .NET language.
Base Class Library
The Base Class Library (BCL), part of the Framework Class Library (FCL), is a library
of functionality available to all languages using the .NET Framework. The BCL
provides classes which encapsulate a number of common functions, including file reading and
writing, graphic rendering, database interaction, XML document manipulation and so on.
Simplified Deployment
The .NET Framework includes design features and tools that help manage
the installation of computer software to ensure that it does not interfere with previously
installed software, and that it conforms to security requirements.
Security
The design is meant to address some of the vulnerabilities, such as buffer overflows,
that have been exploited by malicious software. Additionally, .NET provides a common
security model for all applications.
9
Greedy Routing with Anti-Void Traversal Introduction For Wireless Sensor Networks
Portability
The design of the .NET Framework allows it theoretically to be platform agnostic, and
thus cross-platform compatible. That is, a program written to use the framework should run
without change on any type of system for which the framework is implemented. While
Microsoft has never implemented the full framework on any system except Microsoft
Windows, the framework is engineered to be platform agnostic,[5] and cross-platform
implementations are available for other operating systems (see Silverlight and the Alternative
implementations section below). Microsoft submitted the specifications for the Common
Language Infrastructure (which includes the core class libraries, Common Type System, and
the Common Intermediate Language), the C# language, and the C++/CLI language to
both ECMA and the ISO, making them available as open standards.
Asp.Net Architecture
ASP.NET is an important component of .NET Framework. ASP.NET Provides advanced
capabilities, such as efficient database access and easy-to-use Application and Session state
capabilities.ASP.NET application can be created using any .NET language, such as Visual
Basic.NET or Visual C#. NET.
ASP.Net is the latest Microsoft programming framework that allows for the rapid development
of powerful web applications. In this issue of Better Web Design, author going to discuss the
advantages of using ASP. Net. Application Architecture is the most important process of
developing a good application. ASP.NET uses ISAPI to run on the Internet Information Server
(IIS) in Windows 2000 Server. The configuration of ASP.NET is managed by information
stored in XML-format in a configuration file. The cache allows for improved performance of
ASP.NET, as the most commonly requested pages would be served from the ASP.NET cache.
State management services for ASP.NET are provided by the ASP.NET state service.
10
Greedy Routing with Anti-Void Traversal Introduction For Wireless Sensor Networks
The .NET Framework provides the Common Language Runtime (CLR), which compiles and
manages the execution of ASP.NET code, and the class libraries, which offer pre-built
programmatic functionality for Web Forms, XML support, and exception handling.ADO.NET
provides ASP.NET with connections to databases
The Advantages
Powerful database-driven functionality
Faster web applications
Memory leak and crash protection
Multiple language support
11
Greedy Routing with Anti-Void Traversal Introduction For Wireless Sensor Networks
Fig 1.2.1 ASP.NET Architecture
12
Greedy Routing with Anti-Void Traversal Introduction For Wireless Sensor Networks
Features of the Common Language Runtime
The common language runtime manages memory, thread execution, code execution,
code safety verification, compilation, and other system services. These features are intrinsic to
the managed code that runs on the common language runtime.
With regards to security, managed components are awarded varying degrees of trust,
depending on a number of factors that include their origin (such as the Internet, enterprise
network, or local computer). This means that a managed component might or might not be
able to perform file-access operations, registry-access operations, or other sensitive functions,
even if it is being used in the same active application.
Finally, the runtime can be hosted by high-performance, server-side applications, such
as Microsoft® SQL Server™ and Internet Information Services (IIS). This infrastructure
enables you to use managed code to write your business logic, while still enjoying the superior
performance of the industry's best enterprise servers that support runtime hosting.
Assemblies
In the .NET framework, an assembly is a compiled code library used for deployment,
versioning, and security. There are two types: process assemblies (EXE) and library
assemblies (DLL). A process assembly represents a process which will use classes defined in
library assemblies. .NET assemblies contain code in CIL, which is usually generated from
a CLI language, and then compiled into machine language at run time by the CLR just-in-time
compiler.
An assembly can consist of one or more files. Code files are called modules. An
assembly can contain more than one code module and since it is possible to use
different languages to create code modules it is technically possible to use several different
languages to create an assembly. Visual Studio however does not support using different
languages in one assembly.
13
Greedy Routing with Anti-Void Traversal Introduction For Wireless Sensor Networks
Metadata
.NET metadata, in the Microsoft .NET framework, refers to certain data structures
embedded within the Common Intermediate Language code that describes the high-level
structure of the code. Metadata describes all classes and class members that are defined in the
assembly, and the classes and class members that the current assembly will call from another
assembly. The metadata for a method contains the complete description of the method,
including the class (and the assembly that contains the class), the return type and all of the
method parameters.
A .NET language compiler will generate the metadata and store this in
the assembly containing the CIL. When the CLR executes CIL it will check to make sure that
the metadata of the called method is the same as the metadata that is stored in the calling
method. This ensures that a method can only be called with exactly the right number of
parameters and exactly the right parameter types
Security
.NET has its own security mechanism with two general features: Code Access
Security (CAS), and validation and verification. Code Access Security is based on evidence
that is associated with a specific assembly. Typically the evidence is the source of the
assembly (whether it is installed on the local machine or has been downloaded from the
intranet or Internet). Code Access Security uses evidence to determine the permissions granted
to the code. Other code can demand that calling code is granted a specified permission. The
demand causes the CLR to perform a call stack walk: every assembly of each method in the
call stack is checked for the required permission; if any assembly is not granted the permission
a security exception is thrown.
14
Greedy Routing with Anti-Void Traversal Introduction For Wireless Sensor Networks
Class Library
The .NET Framework class library is a collection of reusable types that tightly
integrate with the common language runtime. The class library is object oriented, providing
types from which your own managed code can derive functionality. This not only makes
the .NET Framework types easy to use, but also reduces the time associated with learning new
features of the .NET Framework. In addition, third-party components can integrate seamlessly
with classes in the .NET Framework.
For example, the .NET Framework collection classes implement a set of interfaces that
you can use to develop your own collection classes. Your collection classes will blend
seamlessly with the classes in the .NET Framework.
As you would expect from an object-oriented class library, the .NET Framework types
enable you to accomplish a range of common programming tasks, including tasks such as
string management, data collection, database connectivity, and file access. In addition to these
common tasks, the class library includes types that support a variety of specialized
development scenarios.
Server Application Development
Server-side applications in the managed world are implemented through runtime hosts.
Unmanaged applications host the common language runtime, which allows your custom
managed code to control the behavior of the server. This model provides you with all the
features of the common language runtime and class library while gaining the performance and
scalability of the host server.
The following illustration shows a basic network schema with managed code running
in different server environments. Servers such as IIS and SQL Server can perform standard
operations while your application logic executes through the managed code.
15
Greedy Routing with Anti-Void Traversal Introduction For Wireless Sensor Networks
Language Support
The Microsoft .NET Platform currently offers built-in support for three languages: C#,
Visual Basic, and JScript.
ADO.NET Overview
ADO.NET is an evolution of the ADO data access model that directly addresses user
requirements for developing scalable applications. It was designed specifically for the web
with scalability, statelessness, and XML in mind.
ADO.NET uses some ADO objects, such as the Connection and Command objects, and also
introduces new objects. Key new ADO.NET objects include the DataSet, DataReader, and
DataAdapter.
When dealing with connections to a database, there are two different options: SQL
Server .NET Data Provider (System.Data.SqlClient) and OLE DB .NET Data Provider
(System.Data.OleDb). In these samples we will use the SQL Server .NET Data Provider.
These are written to talk directly to Microsoft SQL Server. The OLE DB .NET Data Provider
is used to talk to any OLE DB provider (as it uses OLE DB underneath).
Connections
Connections are used to 'talk to' databases, and are represented by provider-specific
classes such as SQLConnection. Commands travel over connections and resultsets are returned
in the form of streams which can be read by a DataReader object, or pushed into a DataSet
object.
Commands
Commands contain the information that is submitted to a database, and are represented
by provider-specific classes such as SQLCommand. A command can be a stored procedure
call, an UPDATE statement, or a statement that returns results. You can also use input and
output parameters, and return values as part of your command syntax. The example below
shows how to issue an INSERT statement against the Northwind database.
16
Greedy Routing with Anti-Void Traversal Introduction For Wireless Sensor Networks
DataReaders
The DataReader object is somewhat synonymous with a read-only/forward-only cursor
over data. The DataReader API supports flat as well as hierarchical data. A DataReader object
is returned after executing a command against a database. The format of the returned
DataReader object is different from a recordset. For example, you might use the DataReader to
show the results of a search list in a web page.
DataSets
The DataSet object is similar to the ADO Recordset object, but more powerful, and
with one other important distinction: the DataSet is always disconnected. The DataSet object
represents a cache of data, with database-like structures such as tables, columns, relationships,
and constraints. However, though a DataSet can and does behave much like a database, it is
important to remember that DataSet objects do not interact directly with databases, or other
source data. This allows the developer to work with a programming model that is always
consistent, regardless of where the source data resides. Data coming from a database, an XML
file, from code, or user input can all be placed into DataSet objects. Then, as changes are made
to the DataSet they can be tracked and verified before updating the source data. The
GetChanges method of the DataSet object actually creates a second DatSet that contains only
the changes to the data. This DataSet is then used by a DataAdapter (or other objects) to
update the original data source.
DataAdapters (OLEDB/SQL)
The DataAdapter object works as a bridge between the DataSet and the source data.
Using the provider-specific SqlDataAdapter (along with its associated SqlCommand and
SqlConnection) can increase overall performance when working with a Microsoft SQL Server
databases. For other OLE DB-supported databases, you would use the OleDbDataAdapter
object and its associated OleDbCommand and OleDbConnection objects.
The DataAdapter object uses commands to update the data source after changes have
been made to the DataSet. Using the Fill method of the DataAdapter calls the SELECT
17
Greedy Routing with Anti-Void Traversal Introduction For Wireless Sensor Networks
command; using the Update method calls the INSERT, UPDATE or DELETE command for
each changed row. You can explicitly set these commands in order to control the statements
used at runtime to resolve changes, including the use of stored procedures. For ad-hoc
scenarios, a CommandBuilder object can generate these at run-time based upon a select
statement. However, this run-time generation requires an extra round-trip to the server in order
to gather required metadata, so explicitly providing the INSERT, UPDATE, and DELETE
commands at design time will result in better run-time performance.
Fig 1.2.2 ADO.NET Architecture
Advantages of ADO.NET
ADO.NET is the next evolution of ADO for the .Net Framework.
18
Greedy Routing with Anti-Void Traversal Introduction For Wireless Sensor Networks
ADO.NET was created with n-Tier, statelessness and XML in the forefront. Two new objects, the
DataSet and DataAdapter, are provided for these scenarios.
We can execute a command directly against the database in order to do inserts, updates, and
deletes. You don't need to first put data into a dataset in order to insert, update, or delete it.
Also, you can use a Dataset to bind to the data, move through the data, and navigate data
relationships.
Structured Query Language (SQL)
To work with data in a database, author must use a set of commands and statements (language) defined
by the DBMS software. There are several different languages that can be used with relational
databases; the most common is SQL. Both the American National Standards Institute (ANSI) and the
International Standards Organization (ISO) have defined standards for SQL. Most modern DBMS
products support the Entry Level of SQL-92, the latest SQL standard (published in 1992).
5.11 SQL Server Features
Microsoft SQL Server supports a set of features that result in the following benefits:
Ease of installation, deployment, and use
SQL Server includes a set of administrative and development tools that improve
your ability to install, deploy, manage, and use SQL Server across several sites.
Scalability
The same database engine can be used across platforms ranging from laptop
computers running Microsoft Windows® 95/98 to large, multiprocessor servers
running Microsoft Windows NT®, Enterprise Edition.
Data warehousing
SQL Server includes tools for extracting and analyzing summary data for online
analytical processing (OLAP). SQL Server also includes tools for visually
designing databases and analyzing data using English-based questions.
System integration with other server software
SQL Server integrates with e-mail, the Internet, and Windows.
19