crawling the web with - welcome! | mcgill...

32
Crawling the Web with ... Patrick Desmarais (260329253) Iain Macdonald (260270134) Guillaume Viger (260309396)

Upload: hoangquynh

Post on 16-Nov-2018

213 views

Category:

Documents


0 download

TRANSCRIPT

Crawling the Web with ...

Patrick Desmarais (260329253)Iain Macdonald (260270134)Guillaume Viger (260309396)

Issues

RAM Access: units of CPU cycles

Disk Access: millions of CPU cycles

Network Access: 100s millions of CPU cycles

And now for something completely different...

javascript

server-side

non-blocking

javascript

slow

javascript +

=

javascript

asynchronous

callbacks

normally_blocking_call(function(result){

do_next_thing();}

);

NoSQL

BSON

High Performance

Flexible

Schemaless

MongoDB

MongoDB - A Benchmark

Insert 40,000 100 character string and link using a reference table, or singleBSON object. Standard configuration, native driver (MySQLdb/pymongo)

MongoDB is FAST

A complex DB driver

Native MongoDB-NodeJS binding

Asynchronous vs. synchronous

Concurrency managed by NodeJS

The perils of parallelism

parallel programming with nodejs

Queue

Queue

Queue

Queue

Interval: 200msTimeout: 5000ms

169 different urls found

Conclusion

NodeJS is fast!169 urls in 5 seconds from

mcgill.ca

Extensions...Less database connections.

No time interval.

Extra

What should we look for?

href="http://([^\."/ ]+\.?)+(/[^/" \?]*)*"

Results

2057

169

Chunk parsed

http://blyon.com/blyon-cdn/opte/maps/static/1069646562.LGL.2D.700x700.png (Web)http://www.useful-tools.org/wp-content/uploads/Google-web-crawler-1.jpg (Google Robot)http://nodeblog.files.wordpress.com/2011/07/nodejs.png?w=520&h=178 (Nodejs logo)http://coloringinpages.com/img/turtle-coloring-in-pages-5.gif (Nice Turtle)http://blog.michaelrice.com/wp-content/uploads/2010/10/V8.png (Google V8 logo)http://substack.net/images/node_turtle.png (Former Nodejs logo)http://blog.zenika.com/public/javascript_architecture/nodejsarch.png (Node Architecture)http://www.google.ca/badurl (Error page of google => broken robot)http://isolinz.files.wordpress.com/2010/11/kids-fighting-over-soccer-redball.jpg (Kids Fighting)www.mongodb.org (MongoDB banner and logo)

References