Monday, May 7, 2012

How does the Asynchronous Web work?

To achieve the Asynchronous Web we need to be able to send responses back to the browser spontaneously, but how can this be achieved within the confines of the HTTP protocol? We cannot send a response to a non-existent request, so it is necessary to manipulate the request/response mechanism to achieve the desired effect. The most straight forward way is with a basic polling mechanism. Send requests on a regular basis, and give the system continuous opportunities to update the presentation. This technique, which is illustrated below, is not ideal as there is no ideal polling interval. There is a necessary trade off between timely updates and chattiness of the system. As illustrated, it is possible for multiple events to occur between polls, but it is also possible to have no events occur. In the final analysis, polling is not a truly asynchronous mechanism.
The next option to consider is HTTP streaming, where multiple responses can be sent to a single request, as illustrated below. This is an efficient mechanism, but unfortunately is not ubiquitously acceptable across all proxy/firewall configurations, making it unsuitable for general purpose deployments.
The last option to consider is HTTP long polling, where the request is made in anticipation of a future response, but that response is blocked until some event occurs that triggers its fulfillment. This mechanism, which is illustrated below, is nearly as efficient as streaming and is completely compatible with proxy/firewall configurations as it is indistinguishable from a slow responding server.
So long polling provides a viable mechanism for supporting the Asynchronous Web, and is in fact the mechanism used in industry implementations like Ajax Push and Comet. While the mechanism is relatively simple, the ramifications of holding these blocking requests indefinitely are not. We will now examine these in more detail beginning with the Servlet.

What is the Asynchronous Web, and How is it Revolutionary? By Stephen Maryka 01 Apr 2009 | TheServerSide.com

Legacy web applications are synchronous in nature. The user interacts with the web interface presented in the browser, the browser makes requests back to the server based on that user interaction, and the server responds to those requests with new presentation for the user - fundamentally a synchronous process. This means that the presentation delivered to the user represents a snapshot in time of what is a dynamic system. That snapshot becomes stale in between user interactions and does not necessarily provide an accurate view onto the current state of the system. Even when you bring Ajax techniques into the equation this synchronous process is unchanged. While the use of XmlHttpRequest and Ajax techniques facilitates a more fine-grained interaction model than a full page refresh, the requests are still generated based on user interaction, so the process remains synchronous, and the potential for a stale view onto the system persists.
The Asynchronous Web is fundamentally different, and that difference revolutionizes how web applications behave. In the Asynchronous Web it is possible to deliver spontaneous presentation changes to the user as the state of a dynamic system changes, without the need for the user to interact with the interface. The advantages are obvious as we can now maintain an accurate view onto the system for the user. Examples are numerous, and include any system providing a view onto a dynamic system, such as a stock portfolio, an inventory, or a day timer/calendar. When you have multiple users interacting with the same system, the interactions of one user can spontaneously impact what other users see, thus creating a truly collaborative system - the essence of what Web 2.0 promises. Again, examples are numerous, including a simple chat client, and an eBay bidding system. Ultimately, most systems that humans interact with are collaborative in nature, so the web interface onto those systems should be too.

Monday, April 23, 2012

Email

Electronic mail, commonly known as email or e-mail, is a method of exchanging digital messages from an author to one or more recipients. Modern email operates across the Internet or other computer networks. Some early email systems required that the author and the recipient both be online at the same time, in common with instant messaging. Today's email systems are based on a store-and-forward model. Email servers accept, forward, deliver and store messages. Neither the users nor their computers are required to be online simultaneously; they need connect only briefly, typically to an email server, for as long as it takes to send or receive messages.
An email message consists of three components, the message envelope, the message header, and the message body. The message header contains control information, including, minimally, an originator's email address and one or more recipient addresses. Usually descriptive information is also added, such as a subject header field and a message submission date/time stamp.
Originally a text-only (7-bit ASCII and others) communications medium, email was extended to carry multi-media content attachments, a process standardized in RFC 2045 through 2049. Collectively, these RFCs have come to be called Multipurpose Internet Mail Extensions (MIME).
Electronic mail predates the inception of the Internet, and was in fact a crucial tool in creating it,[2] but the history of modern, global Internet email services reaches back to the early ARPANET. Standards for encoding email messages were proposed as early as 1973 (RFC 561). Conversion from ARPANET to the Internet in the early 1980s produced the core of the current services. An email sent in the early 1970s looks quite similar to a basic text message sent on the Internet today.
Network-based email was initially exchanged on the ARPANET in extensions to the File Transfer Protocol (FTP), but is now carried by the Simple Mail Transfer Protocol (SMTP), first published as Internet standard 10 (RFC 821) in 1982. In the process of transporting email messages between systems, SMTP communicates delivery parameters using a message envelope separate from the message (header and body) itself.

Monday, April 16, 2012

How Internet Search Engines Work

Internet search engines are special sites on the Web that are designed to help people find information stored on other sites. There are differences in the ways various search engines work, but they all perform three basic tasks:
  • They search the Internet -- or select pieces of the Internet -- based on important words.
  • They keep an index of the words they find, and where they find them.
  • They allow users to look for words or combinations of words found in that index.
Early search engines held an index of a few hundred thousand pages and documents, and received maybe one or two thousand inquiries each day. Today, a top search engine will index hundreds of millions of pages, and respond to tens of millions of queries per day. In this article, we'll tell you how these major tasks are performed, and how Internet search engines put the pieces together in order to let you find the information you need on the Web.

Web search engine

A web search engine is designed to search for information on the World Wide Web and FTP servers. The search results are generally presented in a list of results often referred to as search engine results pages (SERPs). The information may consist of web pages, images, information and other types of files. Some search engines also mine data available in databases or open directories. Unlike web directories, which are maintained only by human editors, search engines also maintain real-time information by running an algorithm on a web crawler.

Timeline (full list)
Year Engine Current status
1993 W3Catalog Inactive
Aliweb Inactive
1994 WebCrawler Active, Aggregator
Go.com Active, Yahoo Search
Lycos Active
1995 AltaVista Inactive (URL redirected to Yahoo!)
Daum Active
Magellan Inactive
Excite Active
SAPO Active
Yahoo! Active, Launched as a directory
1996 Dogpile Active, Aggregator
Inktomi Acquired by Yahoo!
HotBot Active (lycos.com)
Ask Jeeves Active (ask.com, Jeeves went away)
1997 Northern Light Inactive
Yandex Active
1998 Google Active
MSN Search Active as Bing
1999 AlltheWeb Inactive (URL redirected to Yahoo!)
GenieKnows Active, rebranded Yellowee.com
Naver Active
Teoma Active
Vivisimo Inactive
2000 Baidu Active
Exalead Acquired by Dassault Systèmes
2002 Inktomi Acquired by Yahoo!
2003 Info.com Active
2004 Yahoo! Search Active, Launched own web search
(see Yahoo! Directory, 1995)
A9.com Inactive
Sogou Active
2005 AOL Search Active
Ask.com Active
GoodSearch Active
SearchMe Closed
2006 wikiseek Inactive
Quaero Active
Ask.com Active
Live Search Active as Bing, Launched as
rebranded MSN Search
ChaCha Active
Guruji.com Active
2007 wikiseek Inactive
Sproose Inactive
Wikia Search Inactive
Blackle.com Active
2008 Powerset Inactive (redirects to Bing)
Picollator Inactive
Viewzi Inactive
Boogami Inactive
LeapFish Inactive
Forestle Inactive (redirects to Ecosia)
VADLO Active
Duck Duck Go Active, Aggregator
2009 Bing Active, Launched as
rebranded Live Search
Yebol Active
Megafore Active
Mugurdy Inactive due to a lack of funding
Goby Active
2010 Black Google Mobile Active
Blekko Active
Cuil Inactive
Yandex Active, Launched global
(English) search
Yummly Active
2011 Interred Active
2012 Volunia Active , only Power User
Goorbe Active, only Persian Language

Uniform resource locator

In computing, a uniform resource locator (URL) is a specific character string that constitutes a reference to an Internet resource.
A URL is technically a type of uniform resource identifier (URI) but in many technical documents and verbal discussions URL is often used as a synonym for URI

Web Browser

A web browser is a software application for retrieving, presenting, and traversing information resources on the World Wide Web. An information resource is identified by a Uniform Resource Identifier (URI) and may be a web page, image, video, or other piece of content.[2] Hyperlinks present in resources enable users easily to navigate their browsers to related resources. A web browser can also be defined as an application software or program designed to enable users to access, retrieve and view documents and other resources on the Internet.
Although browsers are primarily intended to access the World Wide Web, they can also be used to access information provided by web servers in private networks or files in file systems. The major web browsers are Firefox, Google Chrome, Internet Explorer, Opera, and Safari