Fri, May 31, 2019 4:51:09 PM

problem. For example, two processes can�t simultaneously send information to a printer. To <br/>
solve the problem, resources that can be shared, such as the printer, must be locked while <br/>
they are being used. So a task locks a resource, completes its task, and then releases the lock <br/>
so that someone else can use the resource. <br/>
Java�s concurrency is built into the language, and Java SE5 has added significant additional <br/>
library support. <br/>
Java and the Internet <br/>
If Java is, in fact, yet another computer programming language, you may question why it is <br/>
so important and why it is being promoted as a revolutionary step in computer <br/>
programming. The answer isn�t immediately obvious if you�re coming from a traditional <br/>
programming perspective. Although Java is very useful for solving traditional standalone <br/>
programming problems, it is also important because it solves programming problems for the <br/>
World Wide Web. <br/>
What is the Web? <br/>
The Web can seem a bit of a mystery at first, with all this talk of �surfing,� �presence,� and <br/>
�home pages.� It�s helpful to step back and see what it really is, but to do this you must <br/>
understand client/server systems, another aspect of computing that�s full of confusing issues. <br/>
Client/server computing <br/>
The primary idea of a client/server system is that you have a central repository of <br/>
information� some kind of data, usually in a database�that you want to distribute on <br/>
demand to some set of people or machines. A key to the client/server concept is that the <br/>
repository of information is centrally located so that it can be changed and so that those <br/>
changes will propagate out to the information consumers. Taken together, the information <br/>
repository, the software that distributes the information, and the machine(s) where the <br/>
information and software reside are called �the server.� The software that resides on the <br/>
consumer machine, communicates with the server, fetches the information, processes it, and <br/>
then displays it on the consumer machine is called the client. <br/>
The basic concept of client/server computing, then, is not so complicated. The problems arise <br/>
because you have a single server trying to serve many clients at once. Generally, a database <br/>
management system is involved, so the designer �balances� the layout of data into tables for <br/>
optimal use. In addition, systems often allow a client to insert new information into a server. <br/>
This means you must ensure that one client�s new data doesn�t walk over another client�s new <br/>
data, or that data isn�t lost in the process of adding it to the database (this is called <br/>
transaction processing). As client software changes, it must be built, debugged, and installed <br/>
on the client machines, which turns out to be more complicated and expensive than you <br/>
might think. It�s especially problematic to support multiple types of computers and operating <br/>
systems. Finally, there�s the all-important performance issue: You might have hundreds of <br/>
clients making requests of your server at any moment, so a small delay can be critical. To <br/>
minimize latency, programmers work hard to offload processing tasks, often to the client <br/>
machine, but sometimes to other machines at the server site, using so-called middleware. <br/>
(Middleware is also used to improve maintainability.) <br/>
The simple idea of distributing information has so many layers of complexity that the whole <br/>
problem can seem hopelessly enigmatic. And yet it�s crucial: Client/server computing <br/>
accounts for roughly half of all programming activities. It�s responsible for everything from <br/>
taking orders and credit-card transactions to the distribution of any kind of data�stock <br/>
market, scientific, government, you name it. What we�ve come up with in the past is <br/>
Introduction to Objects 33�<br/>
individual solutions to individual problems, inventing a new solution each time. These were <br/>
hard to create and hard to use, and the user had to learn a new interface for each one. The <br/>
entire client/server problem needed to be solved in a big way. <br/>
The Web as a giant server <br/>
The Web is actually one giant client/server system. It�s a bit worse than that, since you have <br/>
all the servers and clients coexisting on a single network at once. You don�t need to know <br/>
that, because all you care about is connecting to and interacting with one server at a time <br/>
(even though you might be hopping around the world in your search for the correct server). <br/>
Initially it was a simple one-way process. You made a request of a server and it handed you a <br/>
file, which your machine�s browser software (i.e., the client) would interpret by formatting <br/>
onto your local machine. But in short order people began wanting to do more than just <br/>
deliver pages from a server. They wanted full client/server capability so that the client could <br/>
feed information back to the server, for example, to do database lookups on the server, to add <br/>
new information to the server, or to place an order (which requires special security <br/>
measures). These are the changes we�ve been seeing in the development of the Web. <br/>
The Web browser was a big step forward: the concept that one piece of information can be <br/>
displayed on any type of computer without change. However, the original browsers were still <br/>
rather primitive and rapidly bogged down by the demands placed on them. They weren�t <br/>
particularly interactive, and tended to clog up both the server and the Internet because <br/>
whenever you needed to do something that required programming you had to send <br/>
information back to the server to be processed. It could take many seconds or minutes to find <br/>
out you had misspelled something in your request. Since the browser was just a viewer it <br/>
couldn�t perform even the simplest computing tasks. (On the other hand, it was safe, because <br/>
it couldn�t execute any programs on your local machine that might contain bugs or viruses.) <br/>
To solve this problem, different approaches have been taken. To begin with, graphics <br/>
standards have been enhanced to allow better animation and video within browsers. The <br/>
remainder of the problem can be solved only by incorporating the ability to run programs on <br/>
the client end, under the browser. This is called client-side programming. <br/>
Client-side programming <br/>
The Web�s initial server-browser design provided for interactive content, but the interactivity <br/>
was completely provided by the server. The server produced static pages for the client <br/>
browser, which would simply interpret and display them. Basic HyperText Markup <br/>
Language (HTML) contains simple mechanisms for data gathering: text-entry boxes, check <br/>
boxes, radio boxes, lists and dropdown lists, as well as a button that could only be <br/>
programmed to reset the data on the form or �submit� the data on the form back to the <br/>
server. This submission passes through the Common Gateway Interface (CGI) provided on <br/>
all Web servers. The text within the submission tells CGI what to do with it. The most <br/>
common action is to run a program located on the server in a directory that�s typically called <br/>
�cgi-bin.� (If you watch the address window at the top of your browser when you push a <br/>
button on a Web page, you can sometimes see �cgi-bin� within all the gobbledygook there.) <br/>
These programs can be written in most languages. Perl has been a common choice because it <br/>
is designed for text manipulation and is interpreted, so it can be installed on any server <br/>
regardless of processor or operating system. However, Python (www.Python.org) has been <br/>
making inroads because of its greater power and simplicity. <br/>
Many powerful Web sites today are built strictly on CGI, and you can in fact do nearly <br/>
anything with CGI. However, Web sites built on CGI programs can rapidly become overly <br/>
complicated to maintain, and there is also the problem of response time. The response of a <br/>
CGI program depends on how much data must be sent, as well as the load on both the server <br/>
and the Internet. (On top of this, starting a CGI program tends to be slow.) The initial <br/>
34 Venkata Pilaka Venkata Pilaka <br/>

Comments

Popular posts from this blog

termux vnc viewer setup

../Settings.jpg

me.html