building maps for apps in the cloud - a softlayer use case

84

Upload: timan-rebel

Post on 27-Jan-2015

107 views

Category:

Technology


0 download

DESCRIPTION

Together with Softlayer Snowciety gave a presentation at GOTO Amsterdam 2013 about building custom maps using OpenStreetMap and SRTM data, POstgis/PostgreSQL as a datsbase, Mapnik as a renderer, Tilestance and Apache as the http servers and Leaflet as the javascript client.

TRANSCRIPT

Page 1: Building maps for  apps in the cloud - a Softlayer Use Case
Page 2: Building maps for  apps in the cloud - a Softlayer Use Case
Page 3: Building maps for  apps in the cloud - a Softlayer Use Case
Page 4: Building maps for  apps in the cloud - a Softlayer Use Case
Page 5: Building maps for  apps in the cloud - a Softlayer Use Case
Page 6: Building maps for  apps in the cloud - a Softlayer Use Case

Building maps for apps in the cloud

Page 7: Building maps for  apps in the cloud - a Softlayer Use Case
Page 8: Building maps for  apps in the cloud - a Softlayer Use Case

Share your skiing with the world.

Join the Snowciety

Page 9: Building maps for  apps in the cloud - a Softlayer Use Case

Ski tracker

Page 10: Building maps for  apps in the cloud - a Softlayer Use Case

Friend finder

Page 11: Building maps for  apps in the cloud - a Softlayer Use Case

Share your skiing

Page 12: Building maps for  apps in the cloud - a Softlayer Use Case

Google Maps alternativebecause they charge heavy users nowadays

Page 13: Building maps for  apps in the cloud - a Softlayer Use Case
Page 14: Building maps for  apps in the cloud - a Softlayer Use Case
Page 15: Building maps for  apps in the cloud - a Softlayer Use Case
Page 16: Building maps for  apps in the cloud - a Softlayer Use Case
Page 17: Building maps for  apps in the cloud - a Softlayer Use Case

Freedomcreate radical designs

Page 18: Building maps for  apps in the cloud - a Softlayer Use Case
Page 19: Building maps for  apps in the cloud - a Softlayer Use Case
Page 20: Building maps for  apps in the cloud - a Softlayer Use Case

It is all Open Sourceeven the data from NASA

Page 21: Building maps for  apps in the cloud - a Softlayer Use Case

data database renderer http server

Page 22: Building maps for  apps in the cloud - a Softlayer Use Case

client

Page 23: Building maps for  apps in the cloud - a Softlayer Use Case

OpenStreetMapwikipedia for maps

Page 24: Building maps for  apps in the cloud - a Softlayer Use Case

SRTMShuttle Radar Topography Mission

Page 25: Building maps for  apps in the cloud - a Softlayer Use Case

Lots of dataour cluster contains roughly 3,5 terabyte of unrendered data

Page 26: Building maps for  apps in the cloud - a Softlayer Use Case

350 GB of OSMPostgreSQL with PostGIS plugin

Page 27: Building maps for  apps in the cloud - a Softlayer Use Case

3 TB of GEOTIFF

Page 28: Building maps for  apps in the cloud - a Softlayer Use Case
Page 29: Building maps for  apps in the cloud - a Softlayer Use Case

Mapnikrenderer

Page 30: Building maps for  apps in the cloud - a Softlayer Use Case
Page 31: Building maps for  apps in the cloud - a Softlayer Use Case

§

Page 32: Building maps for  apps in the cloud - a Softlayer Use Case
Page 33: Building maps for  apps in the cloud - a Softlayer Use Case
Page 34: Building maps for  apps in the cloud - a Softlayer Use Case
Page 35: Building maps for  apps in the cloud - a Softlayer Use Case
Page 36: Building maps for  apps in the cloud - a Softlayer Use Case
Page 37: Building maps for  apps in the cloud - a Softlayer Use Case
Page 38: Building maps for  apps in the cloud - a Softlayer Use Case
Page 39: Building maps for  apps in the cloud - a Softlayer Use Case
Page 40: Building maps for  apps in the cloud - a Softlayer Use Case
Page 41: Building maps for  apps in the cloud - a Softlayer Use Case
Page 42: Building maps for  apps in the cloud - a Softlayer Use Case
Page 43: Building maps for  apps in the cloud - a Softlayer Use Case
Page 44: Building maps for  apps in the cloud - a Softlayer Use Case

Journey to get here

Page 45: Building maps for  apps in the cloud - a Softlayer Use Case
Page 46: Building maps for  apps in the cloud - a Softlayer Use Case
Page 47: Building maps for  apps in the cloud - a Softlayer Use Case

Journey to get here

Page 48: Building maps for  apps in the cloud - a Softlayer Use Case

§

Page 49: Building maps for  apps in the cloud - a Softlayer Use Case

png

png

png

png

png

png

png

png

png

png

png

png

png

png

png

png

png

png

png

png

png

png

png

png

png

png

png

png

png

png

png

png

png

png

png

png

png

png

png

png

png

png

png

png

png

png

png

png

png

png

256x256

png png png png png png png png png png

Page 50: Building maps for  apps in the cloud - a Softlayer Use Case

Not only server-sidealso client-side library to interact with map

Page 51: Building maps for  apps in the cloud - a Softlayer Use Case

An Open-Source JavaScript Library for Mobile-Friendly Interactive Maps

Page 52: Building maps for  apps in the cloud - a Softlayer Use Case

Apache httpdNo, not really the chopper

Page 53: Building maps for  apps in the cloud - a Softlayer Use Case

Tile StacheTranslating Apache requests into Mapnik render commands

Page 54: Building maps for  apps in the cloud - a Softlayer Use Case

Mapnikthe renderer from before

Page 55: Building maps for  apps in the cloud - a Softlayer Use Case

CachingMemcache, Disk, S3

Page 56: Building maps for  apps in the cloud - a Softlayer Use Case

CachingMemcache, Disk, S3

Page 57: Building maps for  apps in the cloud - a Softlayer Use Case
Page 58: Building maps for  apps in the cloud - a Softlayer Use Case

Importing datatakes a loooooooooooooooooooooooooooooooooooong time

Page 59: Building maps for  apps in the cloud - a Softlayer Use Case

25GBgzipped xml file

Page 60: Building maps for  apps in the cloud - a Softlayer Use Case

and you know how well plain text can be gzipped

file is roughly 250GB unzipped

Page 61: Building maps for  apps in the cloud - a Softlayer Use Case

3 weeks and counting :-|

M1 Large Instance7.5 GiB of memory, 4 EC2 Compute Units

Page 62: Building maps for  apps in the cloud - a Softlayer Use Case

High-Memory Quadruple Extra Large Instance

68.4 GB of memory, 26 EC2 Compute Units, 24 EBS blocks RAID 1$1.640 per Hour = $ 1180 / month

29 hours!

Page 63: Building maps for  apps in the cloud - a Softlayer Use Case

Dedicated hardware68 GB of memory, 8 Cores, 1 SATA disk

$ 700 / month

10 hours

Page 64: Building maps for  apps in the cloud - a Softlayer Use Case

Macbook Pro16 GB of Memory, SSD

Page 65: Building maps for  apps in the cloud - a Softlayer Use Case

8.5 hoursit is all about lots of memory and lots and lots of IO speed

Page 66: Building maps for  apps in the cloud - a Softlayer Use Case

and that was just OSM!

Page 67: Building maps for  apps in the cloud - a Softlayer Use Case

SRTMShuttle Radar Topography Mission

Page 68: Building maps for  apps in the cloud - a Softlayer Use Case
Page 69: Building maps for  apps in the cloud - a Softlayer Use Case

about a minuteper 1” x 1” file

Page 70: Building maps for  apps in the cloud - a Softlayer Use Case

from -180,0 to 180,9028.800 files

Page 71: Building maps for  apps in the cloud - a Softlayer Use Case

20 days laterwe were done importing

Page 72: Building maps for  apps in the cloud - a Softlayer Use Case
Page 73: Building maps for  apps in the cloud - a Softlayer Use Case

So now you knowhow it is made

Page 74: Building maps for  apps in the cloud - a Softlayer Use Case

Future?More sources, better maps, and..

Page 75: Building maps for  apps in the cloud - a Softlayer Use Case

Vector maps!

Page 76: Building maps for  apps in the cloud - a Softlayer Use Case
Page 77: Building maps for  apps in the cloud - a Softlayer Use Case
Page 78: Building maps for  apps in the cloud - a Softlayer Use Case
Page 79: Building maps for  apps in the cloud - a Softlayer Use Case
Page 80: Building maps for  apps in the cloud - a Softlayer Use Case
Page 81: Building maps for  apps in the cloud - a Softlayer Use Case

How do I get started?Mapbox.com

download TileMill

Page 82: Building maps for  apps in the cloud - a Softlayer Use Case

Building your on OSM server (incl all build commands)http://weait.com/content/build-your-own-openstreetmap-server-lucid

Working with terrain data (hillshading, slopeshading, color-relief)http://www.mapbox.com/tilemill/docs/guides/terrain-data/

for when viewing this presentation on Slideshare

Tutorials

Page 83: Building maps for  apps in the cloud - a Softlayer Use Case

THANK YOU@timanrebel

Page 84: Building maps for  apps in the cloud - a Softlayer Use Case

Rate me!GOTO Guide App

!