+ All Categories
Home > Documents > Robert Zimmer Room 6, St Johns 29 [email protected] Office Hours: Web-Based Computing.

Robert Zimmer Room 6, St Johns 29 [email protected] Office Hours: Web-Based Computing.

Date post: 28-Mar-2015
Category:
Upload: savannah-byrd
View: 216 times
Download: 0 times
Share this document with a friend
Popular Tags:
55
Robert Zimmer Room 6, St Johns 29 [email protected] Office Hours: Web-Based Computing
Transcript
Page 1: Robert Zimmer Room 6, St Johns 29 R.Zimmer@gold.ac.uk Office Hours: Web-Based Computing.

Robert ZimmerRoom 6, St Johns 29

[email protected] Hours:

Web-Based Computing

Page 2: Robert Zimmer Room 6, St Johns 29 R.Zimmer@gold.ac.uk Office Hours: Web-Based Computing.

The Return of Mickey Mouse

Last year, we saw the Sorcerer's Apprentice as an example of how software projects can go wrong

This year, we see it as a model of modern computing system

Page 3: Robert Zimmer Room 6, St Johns 29 R.Zimmer@gold.ac.uk Office Hours: Web-Based Computing.

Mickey has a lot of water to moveFor water, thing about information

At first, he delivers it all himself

Then he has a system to deliver it one load (two buckets) at a time

Page 4: Robert Zimmer Room 6, St Johns 29 R.Zimmer@gold.ac.uk Office Hours: Web-Based Computing.

Then he has a brilliant accident:He makes lots of new wap-enabled brooms all getting the information at the same time

Notice that each broom is really controlling himself

This can be a problemBut it can be an opportunity

Page 5: Robert Zimmer Room 6, St Johns 29 R.Zimmer@gold.ac.uk Office Hours: Web-Based Computing.

So, we have one pool of water (The Server) and lots of different brooms (the clients)

And that is what the course is aboutAlmost

Really there are lots of different pools of water and brooms going around from pool to pool

Page 6: Robert Zimmer Room 6, St Johns 29 R.Zimmer@gold.ac.uk Office Hours: Web-Based Computing.

The image:We have lots of pools of waterSome spilled waterAnd lots of brooms surfing in the water from pool to pool, taking water out of eachSometimes even putting water into some of the poolsThe Surfing Broom

Page 7: Robert Zimmer Room 6, St Johns 29 R.Zimmer@gold.ac.uk Office Hours: Web-Based Computing.

So what kinds of problems come up?

Too many brooms at the same pool

Two Brooms politely waiting for each other to go first

A broom gets lost: Impossible to work out which pools have the right kind of water

Page 8: Robert Zimmer Room 6, St Johns 29 R.Zimmer@gold.ac.uk Office Hours: Web-Based Computing.

It gets too slow for a broom get his water if there are lots of brooms there alreadyThe water keeps going off and need to be replaced by the water that complies with the new European Standard

Page 9: Robert Zimmer Room 6, St Johns 29 R.Zimmer@gold.ac.uk Office Hours: Web-Based Computing.

What this course is about

Applications distributed across a number of computers

Maintaining your own well

Not principally a programming coures, but Java used for illustration

Page 10: Robert Zimmer Room 6, St Johns 29 R.Zimmer@gold.ac.uk Office Hours: Web-Based Computing.

The rationale for using Java

PortableExhibits all the main features of object orientationHas hooks into the main distributed technologiesFree and widely available

Page 11: Robert Zimmer Room 6, St Johns 29 R.Zimmer@gold.ac.uk Office Hours: Web-Based Computing.

Distributed system functions

Core functions

Core functions

Distributed functions

Core functions are those which are found in any type of application, maintaining the well

Distributed functions are those concerned with maintaining distributed system and controlling access (talking to the brooms)

Page 12: Robert Zimmer Room 6, St Johns 29 R.Zimmer@gold.ac.uk Office Hours: Web-Based Computing.

Example (i) auction sitesAuctions either held in real-time or in elapsed timeUses the WebProfit made from commissions and also from banner adverts

Page 13: Robert Zimmer Room 6, St Johns 29 R.Zimmer@gold.ac.uk Office Hours: Web-Based Computing.

Example (ii) search engines

Used to find information on the WebMany general purpose engines, for example Lycos, YahooMainly use automatic indexing, some use human indexersRevenue from advertising

Page 14: Robert Zimmer Room 6, St Johns 29 R.Zimmer@gold.ac.uk Office Hours: Web-Based Computing.

Change notification sitesThe Web is incredibly dynamic: pages disappear or are updated very frequentlySuch sites inform webmasters when these events happenRevenues raised from charging for the service or banner adverts

Page 15: Robert Zimmer Room 6, St Johns 29 R.Zimmer@gold.ac.uk Office Hours: Web-Based Computing.

Email providersProvide Web-based email servicesSometimes the service is tiered with the lower tier freeRevenues from banner advertising.One of the most popular applications

Page 16: Robert Zimmer Room 6, St Johns 29 R.Zimmer@gold.ac.uk Office Hours: Web-Based Computing.

The main facilities of the Internet

The World Wide WebFTPEmail

Mailing listsNewsgroups

Page 17: Robert Zimmer Room 6, St Johns 29 R.Zimmer@gold.ac.uk Office Hours: Web-Based Computing.

The World Wide Web

Browsers

Browsers

Browsers

Web server

Page 18: Robert Zimmer Room 6, St Johns 29 R.Zimmer@gold.ac.uk Office Hours: Web-Based Computing.

The WebSimple but large distributed systemServers provide Web filesBrowsers consume and display Web files

Web documents expressed in HTMLTwo way communication, via formsExample of clients and servers

Page 19: Robert Zimmer Room 6, St Johns 29 R.Zimmer@gold.ac.uk Office Hours: Web-Based Computing.

Issues in distributed application development (i)

Legacy technologySpace problemsStateless server dispensing static pagesSecurity and privacyProgramming and abstraction

Page 20: Robert Zimmer Room 6, St Johns 29 R.Zimmer@gold.ac.uk Office Hours: Web-Based Computing.

Issues in distributed application development (ii)

TransactionsSpeed of development StandardsDesign

Page 21: Robert Zimmer Room 6, St Johns 29 R.Zimmer@gold.ac.uk Office Hours: Web-Based Computing.

Legacy technologyThe initial design of the Web was simple: static pages and no dynamic content ChangedAddresses running out ChangingWeb protocol is stateless Changed

Page 22: Robert Zimmer Room 6, St Johns 29 R.Zimmer@gold.ac.uk Office Hours: Web-Based Computing.

Security and privacyInternet is an open system.Architecture and protocols are publicGood effect is that errors can be spotted and rectified quicklyBad effect is that privacy can be compromised

Page 23: Robert Zimmer Room 6, St Johns 29 R.Zimmer@gold.ac.uk Office Hours: Web-Based Computing.

How secure is the Internet?

In 1996 Dan Farmer, one of the leading members of the Internet security community, analysed a number of Internet sites using a tool known as SATAN which reports on security vulnerabilities. He discovered that out of the 2200 sites he accessed, 1700 were relatively easy to attack (77 per cent of the sites). This is a staggering figure; however, what makes it more staggering is the fact that Farmer chose sites which should have been neurotic about security, for example sites owned by banks, government agencies, insurance companies and credit card companies.

Page 24: Robert Zimmer Room 6, St Johns 29 R.Zimmer@gold.ac.uk Office Hours: Web-Based Computing.

Speed of developmentFaster development times needed for Internet applicationsHence the need for OO languagesA potential use for patternsMore and more companies using rapid development methods

Page 25: Robert Zimmer Room 6, St Johns 29 R.Zimmer@gold.ac.uk Office Hours: Web-Based Computing.

Problems with transactions

A transaction is applied to stored data and can alter the dataConcurrency problemsInconsistent update problemsData changed in the presence of failure

Page 26: Robert Zimmer Room 6, St Johns 29 R.Zimmer@gold.ac.uk Office Hours: Web-Based Computing.

Distributed system designDesigning core functions is just as in conventional systemsHowever there are design issues concerned with:

ReliabilityTransmission mediaSpeed

Page 27: Robert Zimmer Room 6, St Johns 29 R.Zimmer@gold.ac.uk Office Hours: Web-Based Computing.

Design

Client Client

Client

Server

Transmissionmedia can be slow

A server can malfunction

Transmission media can fail

Page 28: Robert Zimmer Room 6, St Johns 29 R.Zimmer@gold.ac.uk Office Hours: Web-Based Computing.

Design issuesCoping with server failureCoping with transmission media failureCoping with slow transmission speeds such as those found in the InternetCoping with synchronicity

Page 29: Robert Zimmer Room 6, St Johns 29 R.Zimmer@gold.ac.uk Office Hours: Web-Based Computing.

The Internet

Page 30: Robert Zimmer Room 6, St Johns 29 R.Zimmer@gold.ac.uk Office Hours: Web-Based Computing.

The Internet is an open system

Details publicly availableA lot of software is freeLots of publicly available expertise available via such things as newsgroupsDangers with privacy

Page 31: Robert Zimmer Room 6, St Johns 29 R.Zimmer@gold.ac.uk Office Hours: Web-Based Computing.

Implications of open systems

Wide variety of implementations, for example of TCP/IPCost of implementation lessHigh level of compatibilityWide variety of developers selling products

Page 32: Robert Zimmer Room 6, St Johns 29 R.Zimmer@gold.ac.uk Office Hours: Web-Based Computing.

The First Problem we will address

How to make it clear what kinds of water you haveHow to get your data in a form that everybody can understand

Page 33: Robert Zimmer Room 6, St Johns 29 R.Zimmer@gold.ac.uk Office Hours: Web-Based Computing.

What most data looks like now: HTML

<HTML><HEAD>

<TITLE> John’s Sheep Farm </TITLE></HEAD><BODY><H1> My Sheep Farm </H1>Hi I have a farm where I keep sheep. Sheep are lovely and woolly. So am I.<UL>

<LI> My favourite sheep is called Buttercup </LI><LI> My first sheep was called Betty. </LI><LI> I am a fanatical Welsh rugby supporter. </LI></UL>

</BODY></HTML>

Page 34: Robert Zimmer Room 6, St Johns 29 R.Zimmer@gold.ac.uk Office Hours: Web-Based Computing.

Some Things to noticeThe tags come in pairsThe tags are only about formattingThere is no way to know that a browser should not be turn up this page for a query about the flowers called buttercups.

Page 35: Robert Zimmer Room 6, St Johns 29 R.Zimmer@gold.ac.uk Office Hours: Web-Based Computing.

Anchors and linksHTML provides facilities whereby documents can link to other documents either on the same computer or on another oneUses anchorsClicking a link transfers to the new page

Page 36: Robert Zimmer Room 6, St Johns 29 R.Zimmer@gold.ac.uk Office Hours: Web-Based Computing.

An example

<UL><LI> <A HREF = “http://www.SheepAreUs.com/home”> A good place

to buy sheep online </A> </LI></UL>

Page 37: Robert Zimmer Room 6, St Johns 29 R.Zimmer@gold.ac.uk Office Hours: Web-Based Computing.

URLKnown either as Uniform Resource Locator or Universal Resource LocatorIs an address of a Web page or other resourceLinks can be web pages, mail, newsgroups, FTP etc

Page 38: Robert Zimmer Room 6, St Johns 29 R.Zimmer@gold.ac.uk Office Hours: Web-Based Computing.

An example of a URL

http://www.open.ac.uk/staff/Darrel

Specifies Web page Specifies computer

Specifies locationof Web page

Page 39: Robert Zimmer Room 6, St Johns 29 R.Zimmer@gold.ac.uk Office Hours: Web-Based Computing.

FormsHTML has facilities for making GUIs for form filling,m for exampleForms contain visual objects such as text fields, buttons, select boxes etc.When a form is completed data is sent to the Web server and a program executed

Page 40: Robert Zimmer Room 6, St Johns 29 R.Zimmer@gold.ac.uk Office Hours: Web-Based Computing.

An example of an HTML form (i)

<FORM METHOD=”POST” ACTION=”/cgi-bin/Form1process”><P>

Please type your name below</P><P>

<INPUT TYPE=”TEXT” NAME=”nameField” MAXLENGTH=”30”></P><P>

Please type your address below</P><P>

<TEXTAREA NAME=”addField” ROWS=”5” COLS=”40”></TEXTAREA>

</P><P>

Male<INPUT TYPE=”RADIO”NAME=”maleButton”VALUE=”mButt”>

</P>

Page 41: Robert Zimmer Room 6, St Johns 29 R.Zimmer@gold.ac.uk Office Hours: Web-Based Computing.

An example of an HTML form (ii)

<P>Female<INPUT TYPE=”RADIO”NAME=”femaleButton”

VALUE=”fButt”></P><P>  <INPUT TYPE=”SUBMIT”  VALUE=”Submit”></P></FORM>

Form contains two radio buttons, a text field and a text area

Page 42: Robert Zimmer Room 6, St Johns 29 R.Zimmer@gold.ac.uk Office Hours: Web-Based Computing.

Our First Real Topic: XML

Page 43: Robert Zimmer Room 6, St Johns 29 R.Zimmer@gold.ac.uk Office Hours: Web-Based Computing.

XMLExtensible—that’s what the X means

Not a markup language but a language for defining markup languages

Tags not about layout, but about meaning (semantics)

Page 44: Robert Zimmer Room 6, St Johns 29 R.Zimmer@gold.ac.uk Office Hours: Web-Based Computing.

Rationale for XML

Difficulties with browser displayHTML non-standardDifficult to impossible to discern semantics from a markup language

Page 45: Robert Zimmer Room 6, St Johns 29 R.Zimmer@gold.ac.uk Office Hours: Web-Based Computing.

Aims of the XML designers

Easy to use on the InternetCapable of supporting a large number of applicationsCompatible with SGMLShould not be complicated to develop XML processorsOnly a small number of optional facilitiesDocuments in XML should be easy to understandEditors should be capable of constructing HTML documents

Page 46: Robert Zimmer Room 6, St Johns 29 R.Zimmer@gold.ac.uk Office Hours: Web-Based Computing.

XML as a central repository of data

Documentin XML

Spreadsheet

Web pages

Word processeddocument

Relationaldatabase

Page 47: Robert Zimmer Room 6, St Johns 29 R.Zimmer@gold.ac.uk Office Hours: Web-Based Computing.

An example of a simple XML-based markup language

<PRODUCT><PRODUCTNAME> CoatBlue</PRODUCTNAME><PRODUCTPRICE> 34000</PRODUCTPRICE>..</PRODUCT> Similar to

HTML but contains semanticmarkers

Page 48: Robert Zimmer Room 6, St Johns 29 R.Zimmer@gold.ac.uk Office Hours: Web-Based Computing.

An example of an XML definition

<?xml version = “1.0” encoding =”UTF-8"?><!DOCTYPE ENTRY[<!ELEMENT ENTRY ENTRYPAIR*><!ELEMENT ENTRYPAIR (NAME, DEFINITION)><!ELEMENT NAME (#PCDATA)><!ELEMENT DEFINITION (#PCDATA)>]>

Sequence of pairs consisting of a name and a definition.

Page 49: Robert Zimmer Room 6, St Johns 29 R.Zimmer@gold.ac.uk Office Hours: Web-Based Computing.

XML used to define attributes

<!ELEMENT TOWN (COUNTY, POPULATION)><ATTLIST TOWN NAME CDATA #REQUIRED>

The element TOWN has an attribute NAMEwhich contains char data and is alwaysrequired

Page 50: Robert Zimmer Room 6, St Johns 29 R.Zimmer@gold.ac.uk Office Hours: Web-Based Computing.

Processing XML documents (i)

Done via parsersParser can be conforming or non-conformingConforming checks everythingNon-conforming just makes rudimentary checksMost parsers conforming

Page 51: Robert Zimmer Room 6, St Johns 29 R.Zimmer@gold.ac.uk Office Hours: Web-Based Computing.

Processing XML documents(ii)

Many parsers written in JavaParsers can be in-memory based: they build up a tree.Parsers can also be event-based: they trigger processing when some XML element is encountered

Page 52: Robert Zimmer Room 6, St Johns 29 R.Zimmer@gold.ac.uk Office Hours: Web-Based Computing.

Event-based processing

public void startElement(String tagName){String currentTag = tagName;..}

Executed when a start element is encountered, for example <TOWN>. tagName assumes the valueof the tag name

Page 53: Robert Zimmer Room 6, St Johns 29 R.Zimmer@gold.ac.uk Office Hours: Web-Based Computing.

An example of XML in action

Scaleable vector graphics (SVG)WWW standard Vector graphic standardAttempt to develop a standard for such graphicsCan be used for text searching

Page 54: Robert Zimmer Room 6, St Johns 29 R.Zimmer@gold.ac.uk Office Hours: Web-Based Computing.

SVG source<SVG width = “3in” height = “2in”><DESC>This is a sample circle drawn for the book DistributedApplications and E-Commerce</DESC><G><CIRCLE style = “fill: red; stroke: black” cx = 100cy = 100 r = 100/></G></SVG>

Page 55: Robert Zimmer Room 6, St Johns 29 R.Zimmer@gold.ac.uk Office Hours: Web-Based Computing.

Associated technologies

XHTML, a standard version of XMLXSL, a style sheet transformation technology used to convert XML source into some other form, for example rtfXSL formatting objects, transformation to text document


Recommended