COS 125 DAY 7. Agenda Quiz Graded 3 A’s, 4 B’s, 1 C, & 1 D Any questions from the quiz? Next...

Preview:

Citation preview

COS 125

DAY 7

Agenda

Quiz Graded 3 A’s, 4 B’s, 1 C, & 1 D Any questions from the quiz? Next Quiz is Feb 26 over the rest of HITW test

Questions from last Class?? Assignment #2 Due

Problems? Capstone Projects Proposals Due Today we will discuss Common Internet Tools and

Multimedia on the Internet We will complete the HITW text in the next week and then

concentrate on Web Design (Castro text) for the rest of the semester

Objectives

Using Common Internet tools How Internet searching Woks How Google works How Map Sites Work Hoe Wikis work How Telnet works How File Compression works How Internet Searching works How agents work How Java, ActiveX, and JavaScript Work

Enjoying Entertainment and Multimedia on the Internet How Music and Audio work on the Internet The infamous MP3 file

How Search Engines Work

The Web contains billions of pages. Impossible to search the entire Web every time someone types in a search

term.

Search engines do the searching up to a month in advance + store the results in a huge database.

They send automatic programs called spiders out on the Web to build up a massive index or database of all the words found, where they were found, how many times they appear on each page, and so on.

When users type in a search term, this is the database that is actually queried.

Search Engine

Search Engine

Database

Spider

Spider

Spider

user

Web site

Web site

Web site

Spiders crawlWeb sites up toa month in advancegathering keywords

Keywords areindexed notingtheir location onthe page andfrequency of appearance

User enterssearch term

Search enginescans database tofind the search term

1

4

3

2

Exhibit 4 - 1 How Search Engines Work

How Search Engines Work

How Search Engines Work

But how does the search engine define relevance?

The spider:Counts words, Looks for the location of those words on the page, Avoids sites that attempt to trick them by repeating words

many times in a row.

How Internet Searching Works

3 Basic types Indexes

www.yahoo.comwww.dmoz.org

Search Engineswww.google.com

Meta Search Engineswww.mamma.comhttp://www.metacrawler.com/

How Meta-Search Engines Work

Uses Internet agentsSoftware bots (short for robots) that do the

work for youBots “go” the other search engines like

google.com and yahoo.com, run the search and “bring” the results back to you

But how does the search engine define relevance?

Relying on user behavior to form its rankings. Google ranks sites according to how many links point to the site from other Web sites.

Challenge: Get sites to appear high in the search engine rankings.

Solution: Specialized companies study the search

engines algorithms for ranking pages.

How the Googlebot works

Crawls WebPages & Downloads entire pages to Google’s Doc servers Finds all links & crawls them as wellDetermines update cycle and determines

next crawl for web pageIndexer servers reads all pages on docs

servers and creates and index and page ranks the sites

Googlebot footprints

How Google works

http://www.googleguide.com/

what Googles knows

Search History Reads Gmail Google Desktop reads hard drive Google products (froogle) learns your

shopping patterns Google Maps knows where you are going Google toolbars knows about all your Internet

activity

How map sites work

Combination maps and Databases Databases update by GPS researchers

Lat and long fixes on map coordinate grid User searches databases

Mapping software gets lat and long Finds correct map Marks location on map

Routing on point to another Based on complicated algorithms, most use “best

fit” methods not guaranteed to be optimal

How Wikis work

Collections of user created (and edited) informationCommunity based knowledge repository

Wikipedia is the largest and best known Wiki WikiquoteWikiSpecies

http://computer.howstuffworks.com/wiki.htm

How Telnet Works

Used for remote loginsAllows you to run commands just as you

were on that remote computer’s keyboardRequires

Telnet server (remote machine)Telnet client (you!)

Works mostly for UNIX and LINUX Windows NT and 2000 has limited server

support

Example

How File Compression Works

Many file transferred over the internet are compressed Takes a larger files and makes a smaller one from it Some Files can be expanded to original after it is

received Windows

.zip .arj

Macs .sit .hqx

UNIX .gz .z

How File Compression Works

Method one (lossless) Look for Redundancies in the file and replace with

tokens that are smaller than the redundant areas Works great for text based files

Example for a text file Replace “the” with t1 or T1 Replace “there” with t2 or T2 Replace “that” with t3 or T3 Of course you have to be able to handle an occurrence of the

token in the original file Place after ~ … t1 become ~t1

Lossless for audio FLAC (2-3:1)

How File Compression Works

Method (Lossy)Removes detail to reduce file sizeCannot recreate originalUsually used for Graphics

jpegmpeg

Example lossy using jpeg

275KB

95 KB

How Internet Agents works

“Intelligent” pieces of software that act in your interest Many are invisible to the users

Uses Good

Searching for info Shopping Web Site Maintenance

Bad Distributed Denial of Service attacks Cyber terrorism

http://www.botspot.com/

Controlling Bots on your web site

Place a Robots.txt file in your web server Bots are to read and follow directions The "/robots.txt" file usually contains a record

looking like this: User-agent: * Disallow: /cgi-bin/ Disallow: /tmp/ Disallow: /~joe/

Part of the Robots Exclusion Protocol http://www.robotstxt.org/wc/exclusion-admin.html

JAVA Applets

Creation Code Compile to byte-code Insert into web page

<applet code=“applet.class” width=200 height=200> <param name=“something” value=“somethingnew”></applet>

Can be in <head></head> or <body></body>

Http://perleybrook.umfk.maine.edu/samples/japplet.htmHttp://perleybrook.umfk.maine.edu/samples/colorchecker.html

http://www.javafile.com/

JavaScript

Interpretive version of JAVA Brings Dynamic capabilities to HTML<script language=“JavaScript”><!-- (html comment)Lines of script code…. --></script>

Can be in <head></head> or <body></body>

http://perleybrook.umfk.maine.edu/samples/Black Jack.htmhttp://perleybrook.umfk.maine.edu/samples/colorpicker.htm

ActiveX Controls

Only works with Microsoft Browsers on Microsoft operating systems

Allows HTML code to use a application on the PC through Microsoft COM (Component Object Model) model

Require the CLASSID for the application you wish to use

Using the Microsoft Media Player through ActiveX

<OBJECT ID="WindowsMediaPlayer1" WIDTH=400 HEIGHT=300

CLASSID="CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6">

<PARAM NAME="URL" VALUE="roya.mpeg"> <PARAM NAME="rate" VALUE="1"> … (more PARAM) <PARAM NAME="_cy" VALUE="10583"> </OBJECT>

http://perleybrook.umfk.maine.edu/samples/activeX.htm

Multimedia and the Internet

Everything that has been done with audio and video can be replicated on the Internet Radio TV Film

The Internet brings more “life” to audio and video Interactivity Combining multiple formats together Virtual reality First person simulations

Downside Need lots of bandwidth Allows for dysfunctional social behaviors

Escapism Social Withdrawal

Music and Audio on the Internet

Download audio files and play them .wav .mp3 .wma .au

Most browser can play most audio files Plug-ins Helper applications

Popular Audio Players Winamp Windows Media Player Realplayer

Problems with Multimedia files downloads

Audio and video files tend to be very largeSlow to downloadCan take longer to download the file than it

takes to play the files, especially over a dial up connection

One way to over come this problem is to “stream” the files

Streaming Demo

Video and Audio Streaming

Streaming is playing and downloading a file at the same timeAs soon as enough of the file has been

downloaded..the applications will begin to pay the file amd hope the rest gets there in time

Most Popular of these technologies is RealPlayer

Internet Radio

Many traditional radio station have started to broadcast over the Internet Larger audience increases ad revenue potential http://www.radio-locator.com/ http://www.live365.com/index.live

New Internet only Radio stations Netscape radio http://www.shoutcast.com/ http://www.pandora.com/?tc=g-036843-0156-1149

How MP3’s are created

An MP3 file is a compressed digital music file (about 10-1 compression)

Deletes sounds you can’t hearAffects quality

The MP3 Cycle

Making your own MP3

You need a MP3 RipperCompresses the digital audio (usually a CD

audio track) and encodes in MP3 formatThere are issues with copyright

violations if you rip copyrighted material and then distribute them

This has created a major controversy and brought an end to many music sharing applications like Napster

For next class

Read through to Chap 43 (page 296)Think about Free Music File Sharing. Is it

Legal?Moral?Ethical?Be prepared to define your thoughts