The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
You're Going To Need A Bigger Toolbox
1. You’re Going To Need A
Bigger Toolbox
DIBI 28th April 2010
gareth rushgrove | morethanseven.net http://www.flickr.com/photos/booleansplit/2376359338/
25. “Apache is like Microsoft Word, it has a
million options but you only need six. Nginx
does those six things, and it does five of
them 50 times faster than Apache.
Chris Lea
Why Nginx
gareth rushgrove | morethanseven.net
26. server {
listen 80;
server_name www.example.com;
location / {
root /var/www/example.com;
}
}
Nginx Example
gareth rushgrove | morethanseven.net
27. http {
upstream php {
server localhost:8002;
}
upstream python {
server localhost:8003;
}
}
server {
server_name www.example.com;
location / {
proxy_pass http://python;
}
location ~ /basket/* {
proxy_pass http://php;
}
}
Nginx Example
gareth rushgrove | morethanseven.net
30. from django.core.cache import cache
key = "/about/"
content = cache.get(key)
if not content:
# expensive query to get content
cache.set(key, content, 300)
Memcached Example
gareth rushgrove | morethanseven.net
31. - Squid - http://www.squid-cache.org
- Varnish - http://varnish-cache.org
Also See
gareth rushgrove | morethanseven.net
44. CREATE TABLE u_data (
userid INT,
movieid INT,
rating INT,
unixtime STRING)
ROW FORMAT DELIMITED
FIELDS TERMINATED BY 't'
STORED AS TEXTFILE;
Hive Create Example
Cucumber DSL Example
gareth rushgrove | morethanseven.net
45. LOAD DATA LOCAL INPATH 'data.txt' OVERWRITE
INTO TABLE u_data;
SELECT COUNT(1) FROM u_data;
Hive Load DSL Example
Cucumber Example
gareth rushgrove | morethanseven.net
46. add FILE weekday_mapper.py;
INSERT OVERWRITE TABLE u_data_new
SELECT
TRANSFORM (userid, movieid, rating, unixtime)
USING 'python weekday_mapper.py'
AS (userid, movieid, rating, weekday)
FROM u_data;
SELECT weekday, COUNT(1)
FROM u_data_new
GROUP BY weekday;
Hive Map Reduce Example
Cucumber DSL Example
gareth rushgrove | morethanseven.net
47. - Hadoop - http://hadoop.apache.org
- Hive - http://wiki.apache.org/hadoop/Hive/
- Pig - http://hadoop.apache.org/pig/
- Dumbo - http://lastfm.com/dumbo/
- Disco - http://discoproject.org
Also See
gareth rushgrove | morethanseven.net
49. Feature: google.co.uk
To broaden their knowledge
A user should be able
To search for things
Scenario: Searching for things
Given I visit "http://www.google.co.uk"
When I fill in "q" with "wikipedia"
And I press "Google Search"
Then I should see "www.wikipedia.org"
Cucumber DSL Example
gareth rushgrove | morethanseven.net
50. Feature: google.co.uk
To broaden their knowledge
A user should be able
To search for things
Scenario: Searching for things
Given I visit "http://www.google.co.uk"
When I fill in "q" with "wikipedia"
And I press "Google Search"
Then I should see "www.wikipedia.org"
1 scenario (1 failed)
4 steps (1 failed, 2 skipped, 1 passed)
0m0.332s
Cucumber Results Example
gareth rushgrove | morethanseven.net