Well, we are all familiar with Google Maps (both on computers and on mobiles).Recently, Google has launched a new feature for the mobile version of the Google Maps, "My Location".
The "My Location" feature is mainly for those phones which DO NOT have GPS feature. Still, it is capable of showing your position within 1000 meters of your actual position.And if you have GPS enabled handset, then off course it will show you your exact position.
So how does it work even without GPS?It's quite simple.The My Location feature uses the same technology that is being used while calling, texting etc, that is, through the network towers. Each network tower has got unique footprints. When we press the '0' button of our phone with the Google Maps application running, Google estimates your present location based on the unique footprint of the nearby tower. As said above, the accuracy can be within 1000 meters. This goes pretty close to GPS.
So what is the benefit of using My Location feature?It's simple too. Every time you want to search anything on the map, say restaurants, you are free from the hassle of finding out and entering your present location. Google will do that for you, that too without a GPS enabled phone. But yes, this feature is still in Beta, so sometimes you might get an error.
Frame Relay
- Frame Relay is packet-switching WAN technology that exists at the Data Link layer of the OSI model
- Typically more cost-effective than leased lines
- Communication occurs over virtual circuits
- Permanent virtual circuits (PVCs) are always available
- Switched virtual circuits (SVCs) are created and then terminated as required
Frame relay is a packet switching technology that exists at the data link layer of the OSI model and is one that has become increasingly common as a WAN solution since the early 1990s. Unlike with leased lines and circuit – switched networks, the available bandwidth on a providers frame relay network is shared amongst many subscribers. This sharing of resources leads to significantly lower costs tan traditional leased lines.
Many people tend to be confused by packet switching technologies like frame relay. Mostly this is a result of trying to under stand how data actually gets from one location to another. On packet switched networks (like frame relay), data streams are separated through the use of “virtual” rather than dedicated hardware circuits. In other words, a logical path is defined between endpoints, through a provider’s packet switched network. Many virtual circuits will be defined for different customers, and will be multiplexed overt the shared physical links of the network. An example, consider the figure below. It shows two different companies, each connecting two offices over a providers frame relay network. Notice that between frame relay switches X and Y, both of their virtual circuits traverse a common physical link. The data that one company passes between their own offices is completely separate from the data of the other company all data stay witching each company’s dedicated virtual circuit only.
Two main types of virtual circuits can be defined on a frame relay networks permanent virtual circuits (PVCs) and switched virtual circuits (SVCs) a PVC functions somewhat similar to a leased line, in that a service provider defines a path through the packet switched network to each customer location, in cases where companies wish to have “always-on” connectivity between locations using frame relay, PVCs are usually defined.
A switched virtual circuit (SVC) functions somewhat differently, almost like a circuit switched connection. SVCs are not permanent, and can instead be created as required across a packet –switched network. For example, an SVC could be created between a company’s head office and a remote location. For the duration of the connection, data might travel over a completely different path.
Frame relay networks are referred to as being non-broadcast multi access (NBMA). What this means is that, by default, broadcast traffic will normally not be passed over a virtual circuit without explicit configuration. This is an important consideration when dealing with the use of broadcast-based routing protocols like RIP or IGRP in a frame ready environment. You will look at how broadcast traffic can be handled on frame relay networks later in this section.
Frame relay equipment
- connections to a frame relay network require both DTE and DCE equipment
- the DTE equipment is a Cisco equipment
- the DCE equipment is a CSU/DSU
In order to connect to a frame relay network, both DTE and DCE equipment needs to be located at the customer premises. This DTE equipment is usually a router whose serial interface connects to a DCE device. In the past, customers required a completely separate DTE device known as a frame relay access device (FRAD) to connect to a frame relay network. However, almost all routers sold today (with an appropriate serial interface) are capable of handling frame relay encapsulation and communication. The DCE device is usually a CSU/DSU that provides clocking functions and the connection to the provider’s physical circuit. Ultimately m the physical ink from the customer, premises connects to the frame relay switching equipment of the service provider. This switching equipment is not the responsibility of the customer. The figure blow illustrates the interconnections of equipment on a frame relay network.
Once the planning for a computer program has been done, the next step in its development is to write the specific steps for solving the problem at hand in a language and form, which is acceptable to a computer system. A language that is acceptable to a computer system is called a computer language or programming language and the process of writing instructions in such a language for an already planned program is called programming or coding. The aim of this article is to introduce some of the common computer languages which are used for writing computer programs.
ANALOGY WITH NATURAL LANGUAGES
A language is a means of communication. We use a natural language such as English to communicate our ideas and emotion to others. Similarly a computer language is used by a programmer to instruct a computer what he/she wants it to do.
All natural languages (English, French, and German etc) use a standard set of words and symbols for the purpose of communication. These words and symbols are understood by everyone using that language. We normally call the set of words allowed in a language the vocabulary of the language. For example, the words we use in English form the vocabulary of English language. Each word has a definite meaning and can be looked up in a dictionary. In a similar manner all computer languages have a vocabulary of their own. Each word of the vocabulary has a definite unambiguous meaning which can be looked up in the manual meant for that language. The main difference between a natural language and a computer language is that natural languages have a large vocabulary but most computer languages use a very limited or restricted vocabulary. This is because a programming language by its very nature and purpose does not need to say too much. Every problem to be solved by a computer has to be broken down into discrete logical steps which basically comprise of four fundamental operations input and output operations, arithmetic operations movement of information within the CPU and memory and logical or comparison operations.
Each natural language has a systematic method of using the words and symbols of that language, which is defined by the grammar rules of the language. Similarly the words and symbols of a computer language must also be used as per set rules which are known as syntax rules of the language. In case of a natural language people computer language we must stick to the exact syntax rules of the language if we want to be understood correctly by the computer. Yet no computer is capable of correcting and deducing meaning from incorrect instructions. Computer languages are smaller and simpler than natural languages but they have to be used with great precision. Unless a programmer adheres exactly to the syntax rules of a programming language, even down to the punctuation marks his/her instructions will not be understood by the computer.
Over the years programming languages have progressed from machine-oriented languages which use strings of binary 1s and 0s, to problem-oriented languages which use common mathematical and/or English terms. However all computer languages can be broadly classified into the following three categories.
1. Machine language
2. Assembly language
3. High-level language
MACHINE LANGUAGE
Although computers can be programmed to understand many different computer languages there is only one language understood by the computer without using a translation program. This language is called the machine language of the computer. The machine language of a computer is normally written as strings of binary 1s and 0s. The circuitry of a computer is wired in a manner that it immediately recognizes the machine language instructions and converts them into the electrical signals needed to execute them.
A machine language instruction normally has a two-part format .The first part of an instruction is the operation code which tells the computer what function to perform and the second part is the operand which tells the computer where to find or store the data or other instructions which are to be manipulated .Hence each instruction tells the computer what operation to perform and the length and locations of the data fields which are involved in the operation. Every computer has a set of operation codes called its instruction set. Each operation code in the instruction set is meant for performing a specific basic operation or function. Typical operations included in the instruction set of a computer are as follows:
1. Arithmetic operations
2. Logical operations
3. Branch operations (For transfer of control to the address given in the operand field)
4. Data movement operations (For moving data between memory locations and registers)
5. Data movement operations (For moving data from/to one of the computers input/output devices)
Although some computers are designed to use only single-address instructions many computers use multiple-address instructions which include the address of two or more operands. For example the augends and addend may be the two operands of an addition operation.
Evolution in technology has given rise to the tremendous touch sensing technology that is implemented in many computing systems and being used by people around globe.Let's dig deeper and get to know more about this amazing technology.
As technology evolves in distinct ways,the nature of computing gets more user-friendly and efficient. The invention of the roller mouse had simplified the process of browsing and using a graphical interface. Furthermore,to add more comfort using the pointing device,the optical technology was invented which replaced the roller mouse. this made browsing and exploring even more hassle free. To deviate from complexities encountered using the optical mouse,a group of pioneers invented the touch screen.
THE TOUCH SCREEN
The touch screen technology which is usually used in computing systems allows a user to control a computer by simply touching the display using a finger or a stylus.It consists of three main components viz. the touch sensor,a software driver and a controller. We discuss in brief how these tree major components help in delivering the correct output with a single touch.
THE TOUCH SENSOR
The sensor within the touch screen is simply a glass plate,which when touched gives out a specific output on the screen. The Sensor within the display screen is placed in such a manner that maximum area on the screen can sense a touch and deliver appropriate output.
The sensor constantly applies a small voltage across the display screen.When an area on the screen is touched,there is a small change in the voltage and this mechanism is used to pinpoint the exact location of the touch on the screen.While this is the basic and most commonly used mechanism to detect a touch,different manufacturers use and implement different mechanisms to detect a touch on the screen.
THE CONTROLLER
Every touch screen has a controller which is basically a small computer that acts as a link between the sensor and the device's processor. This small computer is usually placed within the display. It takes all input from the touch sensor and converts it to data that the computer system can understand. This data contains the exact location of the touch.
SOFTWARE DRIVER
Last but not the least comes the software driver which is installed on the device that allows the touch screen and the device to work together. It directs the operating system on how to interpret a particular touch event sent from the controller. Nowadays,touch screen drivers are basically the mouse-emulation type driver which makes screen touching the same as a mouse-click.
An advantage of this is that the touch screen can work with existing software drivers. also,new applications produced would not require specific touch screen programming.
Reading an XML Configuration File
To allow our XML-RPC classes to use our configuration file, we must create a helper class that parses the information and then makes it available to the server and clients. Although we could build this behavior into methods within the XML-RPC classes (similar to how the getHandlers( ) method was used in our LightweightServer class), using a separate class allows this class to be shared by both the clients and server, reducing duplication of code. We have already determined the information that needs to be obtained and can begin by writing a skeleton class with accessor methods for that data. The actual contents of the member variables we use will be populated by the parsing behavior we write in a moment.
Getting the Configuration Information
We could add code directly to the com.oreilly.xml.LightweightXmlRpcServer class to parse a configuration file; we could then add similar code to our XML-RPC clients that performed the same task. However, this results in a lot of duplicate code. Instead, another com.oreilly.xml utility class is introduced here: XmlRpcConfiguration. The beginnings of this class are shown in Example A; a constructor takes in either a filename or an InputStream to read XML configuration data from. Simple accessor methods are also provided to access the configuration data once it has been loaded. By isolating the input and output of the class from specific XML constructs, we can change the parsing mechanism (which we look at next) without changing our XML-RPC server and client code; this is a much more object-oriented approach than embedding XML parsing code within our server and client code.
Example A. The XmlRpcConfiguration Class to Read XML Configuration Data
package com.oreilly.xml;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.InputStream;
import java.io.IOException;
import java.util.Hashtable;
/**
*
XmlRpcConfiguration
is a utility class* that will load configuration information for XML-RPC servers
* and clients to use.
*
* @author
*
This email address is being protected from spambots. You need JavaScript enabled to view it. * @version 1.0
*/
public class XmlRpcConfiguration {
/** The stream to read the XML configuration from */
private InputStream in;
/** Port number server runs on */
private int portNumber;
/** Hostname server runs on */
private String hostname;
/** SAX Driver Class to load */
private String driverClass;
/** Handlers to register in XML-RPC server */
private Hashtable handlers;
/**
*
* This will set a filename to read configuration
* information from.
*
*
* @param filename
String
name of* XML configuration file.
*/
public XmlRpcConfiguration(String filename)
throws IOException {
this(new FileInputStream(filename));
}
/**
*
* This will set a filename to read configuration
* information from.
*
*
* @param in
InputStream
to read* configuration information from.
*/
public XmlRpcConfiguration(InputStream in)
throws IOException {
this.in = in;
portNumber = 0;
hostname = "";
handlers = new Hashtable( );
// Parse the XML configuration information
}
/**
*
* This returns the port number the server listens on.
*
*
* @return
int
number of server port.*/
public int getPortNumber( ) {
return portNumber;
}
/**
*
* This returns the hostname the server listens on.
*
*
* @return
String
hostname of server.*/
public String getHostname( ) {
return hostname;
}
/**
*
* This returns the SAX driver class to load.
*
*
* @return
String
- name of SAX driver class.*/
public String getDriverClass( ) {
return driverClass;
}
/**
*
* This returns the handlers the server should register.
*
*
* @return
Hashtable
of handlers.*/
public Hashtable getHandlers( ) {
return handlers;
}
}
With this skeleton in place, we can add JDOM parsing behavior to load the member variables with configuration data. To ensure that this information is ready when needed, we call the parsing method in the class constructor. The intent of providing these basic accessor methods is to hide the details of how the configuration information is obtained from the classes and applications that usethe information. Changes to JDOM version, or even to using an entirely different method ofaccessing the XML data, affect only this class; changes do not have to be made to the XML-RPC clients and server. This provides a highly maintainable method of getting configuration information.
Loading the Configuration Information
With our class skeleton created, we can begin outlining the details of the parsing behavior we need. In this situation, we have a simple task because we know the structure of the XML document coming in (thanks to our DTD and its constraints). Thus we can directly access the elements in the document for which we need to obtain values. The best way to think about this is as a hierarchical
tree structure; we can then "walk" the tree and obtain values for the elements we need information from. Figure B shows our XML configuration file represented in this fashion With this model in mind, it is simple to use the getChildren( ) and getChild( ) methods that JDOM provides to navigate to each of the XML elements we want to obtain data from; we can then invoke getContent( ) on the resultant elements and use those values in our application. We need to import the needed JDOM classes (and the Java support classes), create a new method to parse our configuration, and then invoke that method from the XmlRpcConfiguration constructor.
The Real World
As we continue through our topical discussions, the line between a realistic use of XML and our examples is becoming thinner. Our XML-RPC server in this article is close to being ready for production use; it has a flexible configuration file format, it registers handlers dynamically, and
maintains a lightweight structure for handling XML-RPC requests. However, the use of XML for pure data, as discussed in this article, is as new an idea as most of our other XML topics. As with RMI versus RPC, it is possible to overuse the technology. In this section, we compare XML as a data storage medium with other more traditional formats, discussing when one format is preferable over the other, as well as comparing JDOM with other solutions for accessing our underlying XML data.
XML Versus Directory Services and LDAP
Another fairly recent upstart in the technology and data space is the Lightweight Directory Access Protocol (LDAP) and directory services. From the first steps in research at Berkeley and Michigan to Netscape's now widespread Directory Server (http://www.netscape.com), LDAP has become a hot topic in its own right. With the rise of XML, there has been a fair bit of confusion as to when directory services are appropriate to use instead of XML. While directory services are well recognized as useful for company directories and integration of company-wide mail, addressing, and calendaring services, using the LDAP protocol has become popular for configuration information. Storing information about application configuration as well as about how to respond to key application events (such as authentication) is commonly handled with a directory server. This provides faster search and retrieval than a database, and the hierarchical format of most directory servers lends itself well to configuration information. With this article on XML for storing the same type of data, the question of when to use LDAP and when to use XML is particularly pertinent.
The surprising answer to this query is that the question itself is not valid! There is really not a comparison between LDAP and XML, as the two serve orthogonal purposes. Where LDAP and directory services are about making technology or components available by some specific name,
XML is about the storage and transmission of the data involved with those components. In fact, a more appropriate question is "When will LDAP and XML integrate?" The answer lies in the same technologies for XML data binding that we mentioned in regards to databases; the Castor project actually has a complete XML-to-LDAP binding. Additionally, directory services are moving towards a uniform data storage medium; XML certainly could be this medium. As the hierarchical structures of LDAP and XML are close matches, don't be surprised to see a marriage between LDAP services and XML storage.
More Articles …
Subcategories
Web Hosting
Web Hosting is a service offered by web hosting providers to the individuals and organizations to make their websites accessible on the internet. Depending on the requirement, one can avail different types of web hosting such as shared hosting, dedicated hosting, virtual private hosting, cloud hosting etc.
Page 159 of 193