Dynamic pages - server-side

Dynamic pages - client-side

DCU proxy servers

RSS demo page

CGI scripts

Javascript demo page

PHP demo page


The Web



Life before the Web

Many archives existed on the Internet before the Web. You accessed them as follows:

ftp

	Run the ftp program.

c ftp.cs.ucla.edu	

	Connect to some ftp site that you know of.
	There is no easy way of bookmarking 
	or linking to these sites.
	People have to build and maintain their own lists 
	of sites and passwords.

enter userid "anonymous"
enter password (your full email address)

	Typing or Pasting all this in every time was VERY tedious.

ls

	List files. Plain format, showing list of filenames.
	Little or no idea what is in these files.

get index.txt

	Get a master file that will explain 
	what is in the archive.
	You have to read it offline and then find what you are
	interested in - say a collection of Shakespeare plays.

cd Shakespeare

	Go into a sub-category.

get index.txt

	Find out what is in there.

get macbeth.txt

	Finally get what you are looking for (possibly).

	All these files you get end up in random places
	on your disk. They are not all stored in a place
	like the browser cache, periodically wiped.
	Instead, you have to manage them all.


With this user interface, isn't it no wonder that the Internet never took off!

In fact, there were even worse interfaces. Some archives were accessible only by commands embedded in email messages!

There was lots of information and resources online before the Web, but it simply wasn't "browsable". You couldn't casually follow links, and move on. You had to invest lots of effort in everything you looked at. So it was only used by those who were basically interested in the technology. Mass adoption had to wait for a "browsable", "memory-free" user interface.




1993

Mosaic - Perhaps the most revolutionary program of all time. Combines all of that complexity in a single address:

ftp://ftp.cs.ucla.edu/index.txt
(Berners-Lee's idea), but crucially, Mosaic makes it mouse-driven.

The above is the address of a file. You can bookmark it privately, or provide a link on your page for others to follow. No passwords, no typing, just an address. To view it, you click on this address. It downloads into temporary file space (browser cache). Browser maintains this space - you don't have to manage it. And the final act of beauty: This file contains within it a description of what is in the archive, including a link to:

ftp://ftp.cs.ucla.edu/Shakespeare/index.txt
which contains a link to:
ftp://ftp.cs.ucla.edu/Shakespeare/macbeth.txt
You can browse, "graze", and move on, with no clean-up to be done afterwards. You can casually follow links with little effort, no typing, just mouse clicks.


Note: Strictly speaking, Mosaic wasn't the first mouse-driven web browser. It was the first that was widely used. This seems to be because it was the first that:
  1. ran on Windows, Mac and UNIX (Berners-Lee's browser was for NeXT)
  2. was easy to install (a single file)
  3. was easy to use (looked like a normal modern app)
  4. had inline images (Mosaic invented the IMG tag)
For instance, I had heard about mouse-driven (UNIX) web browsers before Mosaic, but never got around to downloading them because I didn't see the point of the Web until I saw Mosaic.




Why did the Web (since Mosaic) work?

  1. Hide addresses (hypertext).
  2. Share the work (people construct links for you to follow).
  3. Browsable (cache, no passwords). Index files browsable and discardable.

  4. Clickable (there were text-based Web browsers before Mosaic, but they involved typing numbers to say which link to follow). A mouse is perfect for once-off, "discardable" selections like this.
  5. Readable texts - The text-based browsers filled the text with intrusive numbers, so many didn't see the point of the system. Mouse-clicking on underlined words restores the readability of the text.
  6. Distributed hypertext - Hypertext had been around for years. But when hypertext meant you could click on words in a help system, many said "cute" but didn't really see the point. When the click could take you to points in new systems, suddenly everyone saw the point and hypertext finally became popular.

  7. Browsers allow handy organisation and editing of private bookmarks.
  8. Not restricted to one interaction - Browsers allow you to spawn off multiple simultaneous window sessions while waiting for slow downloads.
    (Even today, how many web users have yet to discover Ctrl-N?)



People keep trying to break this model and return to the primitive Internet before the Web:

  1. Frames break this model (can't bookmark, have to go through a laborious process of clicking to get to a page).
  2. Providing info through Flash or Javascript pop-ups breaks this model (again, can't bookmark, have to follow a process to see data rather than being able to go to it direct).
  3. In general, any page you can't bookmark or link to breaks this model.

  4. Using   <FORM METHOD=POST>   in a CGI script breaks this model (you can't link to a filled-in version of the form, instead you have to follow a process of filling in the form each time to see the results). Of course, you might do this deliberately, e.g. if the form is meant to contain a password.
    To allow someone link to the form filled in with arguments, use:   <FORM METHOD=GET>  
  5. In general, temporary URLs and changing URLs break this model (have to follow a process to find the data again).

  6. Referencing things online without providing a working hyperlink to them breaks this model.
  7. Listing an email address without making it a mailto: link breaks this model. Unfortunately this is becoming increasingly essential because of spam.
  8. Sending email attachments (instead of having the file online with a password) also breaks this model (have to start up a new application, not so easily browsable, can't link to it).
  9. Having to register to get into a site breaks this model (again, back to old ftp anonymous passwords).

  10. Not linking to other sites, not linking creatively within your site, and in short, just using hypertext to present a series of menu options, breaks this model (back to hypertext as it was used before the Web, to just present a few menu options within a site).
    If somebody who was unimpressed by hypertext back before the Web could time travel forward to see most commercial sites today, I think they would still be unimpressed by hypertext, and not see the point of it.

  11. Many P2P file-sharing systems break this model, by having temporary "web sites", that you can't link to.



What is p2p good for?

p2p is an important model for distributing CPU load, bandwidth, addressing and routing data, and so on, as the Internet shows. You could argue that the 1970s-80s applications email, usenet and DNS, are all p2p.

What I am looking at here is p2p for publishing (data or programs). Sharing data with p2p just seems worse than the Web, since there is (usually) no permanent address you can link to. So does p2p have any function other than sharing data that it is illegal to set up a website for (such as copyrighted files or child porn)?

Some possible legal uses:

  1. An individual sharing massive files (multimedia, movies) that you find hard to find a host for anywhere, so you just share these gigabyte-files direct from your PC when you are online.
  2. A small site (e.g. a blog) sharing large files (e.g. video) that are the subject of massive topical interest (flash crowds). P2P could be used to distribute the load.
  3. An organisation sharing thousands of gigabyte-files. e.g. the BBC archive.
  4. Using p2p to distribute multi-megabyte releases of very popular downloads, e.g. a new Windows update or a new Linux release. To stop the main server getting overloaded.

Summary of legal uses?

  1. Small-to-medium bandwidth legal data: p2p no use, use website.
  2. Small-to-medium bandwidth legal software: p2p no use, use website.
  3. Massive bandwidth legal data: p2p could be useful - doesn't matter so much if data is corrupted - few people will do that anyway.
  4. Massive bandwidth legal software: p2p could be useful - but dangerous if software is corrupted - and lot of incentive to do so.

Of course, as it stands today, over 90 percent of all actual use of p2p is illegal.


p2p for other things

i.e. different problems to the Web-like model of downloading a piece of info



HTTP client

Web browser

Uses MIME types.
(a) Plug-in - Runs inside browser process.
(b) Helper application - Separate process.





HTTP server

Doesn't make separate disk access for every file request - too slow.
Instead maintains cache in memory of frequently accessed files.
Multi-threaded.
Site spread over multiple disks to help many reads going on at once.



For high-demand sites: Multiple copies of entire site - "server farm" - front end routes requests to different CPUs.

Problem: OK to have all (small size) requests come in through one front end and get routed to searching nodes.
Not OK to have all (large size) replies go back through one front end - bottleneck.
Solution: TCP handoff - trick to have the searching node reply directly in a manner that is invisible to client.
The reply load is therefore distributed over all the nodes.



URLs


Some URL formats.

gopher - port 70 - not used any more - pre-web system
ftp (no password) hardly used any more - pre-web system
ftp (with password) still important
file: very useful
mailto: very useful - but spammers search for these
telnet useful - but rarely do it by clicking a link

news: not as important as used to be:

  1. read on Google
  2. so many other places to talk now - discussion websites, blogs





Keeping state

Relating one client-server stateless request with other client-server requests.

Identify user (pay-to-view, register, personalisation). Shopping carts.



Structuring content


XHTML




Dynamic pages - server-side




Dynamic pages - client-side




Performance (client-side)


Caching


DCU proxy servers

  1. wwwproxy.computing.dcu.ie

  2. proxy.dcu.ie

To set proxy (precise menus may vary depending on version):
  1. Firefox - Tools - Options - Network - Settings
  2. IE - Tools - Options - Connections - LAN settings