SlideShare a Scribd company logo
1 of 26
Download to read offline
MapServer MapCache
                                          (f.k.a mod-geocache)
                                  A Fast Tile-Caching Solution for the
                                          Apache HTTP Server




14 / 09 / 2011     Thomas Bonfort (Terriscope)
                 Stephen Woodbridge (iMaptools)
What’s a tile cache?
                            Source
    Services

                  Tileset


                  Grids
  requests

                            Cache
Yet Another Tile Cache ?
•  Mature / feature-full solutions already out
•  High performance needed
•  Started out as a small project, to validate the
   concept
•  Integrated into the MapServer stack for next
   release
Apache module
•  Module = code run by the apache processes
   that treat requests
•  Native code
•  No overhead (e.g. CGI, FastCGI)
•  Does not require spawning an interpreter per
   concurrent request
•  Caveats:
    –  Thread/process synchronization
    –  Memory management
    –  Security
Features
•  Metatiling
    –  Cross process/thread locking ensures you
       can enable metatiling on an unseeded
       tileset
•  Image recompression / optimization
    –  JPEG quality
    –  PNG compression level
    –  PNG quantization
    –  “Mixed” format: PNG+JPEG
Features (cont)
•  Expiration handling
    –  HTTP cache controlling headers
    –  Last-Modified, If-Modified-Since
    –  Automatically regenerate stale tiles
•  Custom error reporting
    –  Message
    –  Empty image
    –  Status code (+optional HTTP header)
•  Watermarking
Features (cont)
•  Dimensions
    –  Single values
    –  Intervals
    –  Regular Expressions
•  FeatureInfo forwarding
•  FastCGI / CGI option for use outside of apache
Services
•    TMS
•    WMTS
•    WMS / WMS-C
•    Google Maps XYZ
•    VirtualEarth Quadkeys
•    KML SuperOverlays
“Demo” Interface
•    Lists all active services
•    Easy way to check configured caches
•    Simple OpenLayers slippy-map
•    Cut-and-paste definitions for Layers
•    http://localhost:8081/mapcache/demo
Grids
•    Extent
•    Projection
•    Resolution per level
•    Tile size

•  Comes preconfigured with popular grids
•  Supports grid aliases
•  For limited areas, use grid subsets, not your
   own grid!
Data Sources
•  Extensible, anything able to provide an image
   for given:
    –  Width, Height
    –  Extent
    –  SRS
    –  Optionally dimension
•  WMS is the only implemented source
    –  Custom query parameters
    –  Custom headers
Caches
•  Extensible mechanism, backend must provide
   api to get/set a tile for a given grid, x, y, z
   (+dimension)
•  Higher level locking mechanism allows on-
   demand cache generation
•  Backends provide different performance /
   manageability tradeoffs
•  Currently implemented: filesystem, sqlite,
   memcached
Disk based caches
•  Tilecache hierarchy:
   –  /tmp/osm/g/17/000/027/304/000/081/334.png
•  Custom hierarchy:
   –  /tmp/{tileset}/{grid}/{x}-{y}-{z}.{ext}


•  Support for symlinking blank tiles
•  Watch out for filesystem limitations !
   –  Max files per directory
   –  Max number of inodes
   –  Blocksize
Sqlite caches
•  Store tile data as blobs in sqlite db
•  Slower than disk caches, but prevents
   filesytem headaches
•  Flexible storage options:
  –  Provided custom schema
  –  MBTiles schema
  –  Custom schema, provide your own queries:
     •  select tile_data from tiles where tile_column=:x and
        tile_row=:y and zoom_level=:z");
     •  insert or replace into
        tiles(tile_column,tile_row,zoom_level,tile_data) values
        (:x,:y,:z,:data)"
Vertical Assembling
  Save bandwidth, request a single tiled layer !




&LAYERS=OSM&…    &LAYERS=NEXRAD&…   &LAYERS=OSM,NEXRAD&…
Horizontal Assembling
Support non-tiled clients
Tile Assembling
•  CPU bound operation: image format (PNG/
   JPEG) encoding and decoding
•  CPU acceleration (MMX,SSE,…) of pixel
   manipulation operations (scaling, blending)
•  Configurable resampling
•  No reprojection support
•  Missing spec for TMS and WMTS support
Proxying support
•  Transparently add tiling / fast WMS support to
   existing services
•  Intercepts GetTile / GetMap requests
•  Configurable forwarding to other services
   based on request parameters
Seeder
•  Use multiple threads to load the source WMS
•  Reseed tiles older than a specified date
•  Seed only tiles inside given geometry
    –  OGR for data access: filter based on SQL
       queries, e.g. FIPS_A1=’USA’ ,
       pop_density>1000
    –  GEOS Prepared Geometries for fast
       intersection calculation
•  Delete mode
•  Specify dimension values
Benchmarks
•    Server: 4-core, 8GB ram, SSD storage
•    ab tool used over Gigabit Ethernet
•    “warm” filesystem
•    All requests on exact same image data
TMS requests / sec
Throughput very dependent on image size

     Concurrent                 MapProxy
                  Geowebcache              MapCache
      requests                    wsgi

         1           1 280        800       1 780

        10          17 000       9 000      30 000
        20          18 000       8 000      40 000

        100         17 000       7 100      40 000

        250         16 500       6 800      40 000
SQLite backend, TMS
•  MBTiles backend
•  10 threads:
    –  TileStream: 900
    –  MapCache: 8300
Horizontal assembling
•  Workload: ~20 png decompressions + 1 jpg
   compression
•  10 threads
•  With bilinear resampling
  –  MapProxy: 29
  –  MapCache: 43
•  With nearest neighbor resampling
  –  Geowebcache: 35
  –  MapProxy: 40
  –  MapCache: 48
Vertical assembling
•  Workload: 2 png decompressions, 1 jpeg
   compression
•  10 threads:
    –  Geowebcache: unsupported
    –  MapProxy: 435
    –  MapCache: 640
What’s next?
•  MapServer Stack integration
   –  Docs
   –  Code sharing (image I/O, build tools)
•  Ideas:
   –  Source assembling at the tileset level
   –  OGC ServiceExceptions
   –  HTTP options:
       •  HTTPS
       •  Authentication
       •  POST
Want More?
•  Soon up to date project page:
  http://www.mapserver.org/trunk/mapcache/index.html
•  Soon defunct project page:
  http://code.google.com/p/mod-geocache/
•  Get the code:
    –  Mapserver trunk svn
    –  Mapserver 6.2
•  Contribute !
•  Twitter: @tbonfort

More Related Content

What's hot

Apache Airflow Introduction
Apache Airflow IntroductionApache Airflow Introduction
Apache Airflow IntroductionLiangjun Jiang
 
Hadoop Architecture and HDFS
Hadoop Architecture and HDFSHadoop Architecture and HDFS
Hadoop Architecture and HDFSEdureka!
 
Load Balancing and Scaling with NGINX
Load Balancing and Scaling with NGINXLoad Balancing and Scaling with NGINX
Load Balancing and Scaling with NGINXNGINX, Inc.
 
ClickHouse on Kubernetes, by Alexander Zaitsev, Altinity CTO
ClickHouse on Kubernetes, by Alexander Zaitsev, Altinity CTOClickHouse on Kubernetes, by Alexander Zaitsev, Altinity CTO
ClickHouse on Kubernetes, by Alexander Zaitsev, Altinity CTOAltinity Ltd
 
Google Cloud Composer
Google Cloud ComposerGoogle Cloud Composer
Google Cloud ComposerPierre Coste
 
AWS Batch: Simplifying Batch Computing in the Cloud
AWS Batch: Simplifying Batch Computing in the CloudAWS Batch: Simplifying Batch Computing in the Cloud
AWS Batch: Simplifying Batch Computing in the CloudAmazon Web Services
 
Hadoop MapReduce Fundamentals
Hadoop MapReduce FundamentalsHadoop MapReduce Fundamentals
Hadoop MapReduce FundamentalsLynn Langit
 
Building large scale transactional data lake using apache hudi
Building large scale transactional data lake using apache hudiBuilding large scale transactional data lake using apache hudi
Building large scale transactional data lake using apache hudiBill Liu
 
Introduction to Activiti BPM
Introduction to Activiti BPMIntroduction to Activiti BPM
Introduction to Activiti BPMAlfresco Software
 
Apache Sqoop Tutorial | Sqoop: Import & Export Data From MySQL To HDFS | Hado...
Apache Sqoop Tutorial | Sqoop: Import & Export Data From MySQL To HDFS | Hado...Apache Sqoop Tutorial | Sqoop: Import & Export Data From MySQL To HDFS | Hado...
Apache Sqoop Tutorial | Sqoop: Import & Export Data From MySQL To HDFS | Hado...Edureka!
 
Hive 3 - a new horizon
Hive 3 - a new horizonHive 3 - a new horizon
Hive 3 - a new horizonThejas Nair
 
OLAP for Big Data (Druid vs Apache Kylin vs Apache Lens)
OLAP for Big Data (Druid vs Apache Kylin vs Apache Lens)OLAP for Big Data (Druid vs Apache Kylin vs Apache Lens)
OLAP for Big Data (Druid vs Apache Kylin vs Apache Lens)SANG WON PARK
 
Migrating Apache Hive Workload to Apache Spark: Bridge the Gap with Zhan Zhan...
Migrating Apache Hive Workload to Apache Spark: Bridge the Gap with Zhan Zhan...Migrating Apache Hive Workload to Apache Spark: Bridge the Gap with Zhan Zhan...
Migrating Apache Hive Workload to Apache Spark: Bridge the Gap with Zhan Zhan...Databricks
 
Local Apache NiFi Processor Debug
Local Apache NiFi Processor DebugLocal Apache NiFi Processor Debug
Local Apache NiFi Processor DebugDeon Huang
 
Introduction to pig & pig latin
Introduction to pig & pig latinIntroduction to pig & pig latin
Introduction to pig & pig latinknowbigdata
 
Cloud Native ClickHouse at Scale--Using the Altinity Kubernetes Operator-2022...
Cloud Native ClickHouse at Scale--Using the Altinity Kubernetes Operator-2022...Cloud Native ClickHouse at Scale--Using the Altinity Kubernetes Operator-2022...
Cloud Native ClickHouse at Scale--Using the Altinity Kubernetes Operator-2022...Altinity Ltd
 

What's hot (20)

Apache Airflow Introduction
Apache Airflow IntroductionApache Airflow Introduction
Apache Airflow Introduction
 
Hadoop Architecture and HDFS
Hadoop Architecture and HDFSHadoop Architecture and HDFS
Hadoop Architecture and HDFS
 
Load Balancing and Scaling with NGINX
Load Balancing and Scaling with NGINXLoad Balancing and Scaling with NGINX
Load Balancing and Scaling with NGINX
 
Apache airflow
Apache airflowApache airflow
Apache airflow
 
ClickHouse on Kubernetes, by Alexander Zaitsev, Altinity CTO
ClickHouse on Kubernetes, by Alexander Zaitsev, Altinity CTOClickHouse on Kubernetes, by Alexander Zaitsev, Altinity CTO
ClickHouse on Kubernetes, by Alexander Zaitsev, Altinity CTO
 
Google Cloud Composer
Google Cloud ComposerGoogle Cloud Composer
Google Cloud Composer
 
AWS Batch: Simplifying Batch Computing in the Cloud
AWS Batch: Simplifying Batch Computing in the CloudAWS Batch: Simplifying Batch Computing in the Cloud
AWS Batch: Simplifying Batch Computing in the Cloud
 
Hadoop MapReduce Fundamentals
Hadoop MapReduce FundamentalsHadoop MapReduce Fundamentals
Hadoop MapReduce Fundamentals
 
Building large scale transactional data lake using apache hudi
Building large scale transactional data lake using apache hudiBuilding large scale transactional data lake using apache hudi
Building large scale transactional data lake using apache hudi
 
Introduction to Activiti BPM
Introduction to Activiti BPMIntroduction to Activiti BPM
Introduction to Activiti BPM
 
What's New in Apache Hive
What's New in Apache HiveWhat's New in Apache Hive
What's New in Apache Hive
 
Apache Sqoop Tutorial | Sqoop: Import & Export Data From MySQL To HDFS | Hado...
Apache Sqoop Tutorial | Sqoop: Import & Export Data From MySQL To HDFS | Hado...Apache Sqoop Tutorial | Sqoop: Import & Export Data From MySQL To HDFS | Hado...
Apache Sqoop Tutorial | Sqoop: Import & Export Data From MySQL To HDFS | Hado...
 
Hive 3 - a new horizon
Hive 3 - a new horizonHive 3 - a new horizon
Hive 3 - a new horizon
 
OLAP for Big Data (Druid vs Apache Kylin vs Apache Lens)
OLAP for Big Data (Druid vs Apache Kylin vs Apache Lens)OLAP for Big Data (Druid vs Apache Kylin vs Apache Lens)
OLAP for Big Data (Druid vs Apache Kylin vs Apache Lens)
 
Migrating Apache Hive Workload to Apache Spark: Bridge the Gap with Zhan Zhan...
Migrating Apache Hive Workload to Apache Spark: Bridge the Gap with Zhan Zhan...Migrating Apache Hive Workload to Apache Spark: Bridge the Gap with Zhan Zhan...
Migrating Apache Hive Workload to Apache Spark: Bridge the Gap with Zhan Zhan...
 
HDFS Selective Wire Encryption
HDFS Selective Wire EncryptionHDFS Selective Wire Encryption
HDFS Selective Wire Encryption
 
Local Apache NiFi Processor Debug
Local Apache NiFi Processor DebugLocal Apache NiFi Processor Debug
Local Apache NiFi Processor Debug
 
Introduction to pig & pig latin
Introduction to pig & pig latinIntroduction to pig & pig latin
Introduction to pig & pig latin
 
Apache Airflow
Apache AirflowApache Airflow
Apache Airflow
 
Cloud Native ClickHouse at Scale--Using the Altinity Kubernetes Operator-2022...
Cloud Native ClickHouse at Scale--Using the Altinity Kubernetes Operator-2022...Cloud Native ClickHouse at Scale--Using the Altinity Kubernetes Operator-2022...
Cloud Native ClickHouse at Scale--Using the Altinity Kubernetes Operator-2022...
 

Viewers also liked

FieldtripGB - data capture simplified
FieldtripGB - data capture simplifiedFieldtripGB - data capture simplified
FieldtripGB - data capture simplifiedAddy Pope
 
WMS Performance Shootout 2009
WMS Performance Shootout 2009WMS Performance Shootout 2009
WMS Performance Shootout 2009Jeff McKenna
 
Mapserver vs. geoserver
Mapserver vs. geoserverMapserver vs. geoserver
Mapserver vs. geoserver鸣 饶
 
Digimap Data and a Non-traditionalist Perspective - Shelley Mosco
Digimap Data and a Non-traditionalist Perspective - Shelley MoscoDigimap Data and a Non-traditionalist Perspective - Shelley Mosco
Digimap Data and a Non-traditionalist Perspective - Shelley MoscoEDINA, University of Edinburgh
 
WMS Performance Shootout 2010
WMS Performance Shootout 2010WMS Performance Shootout 2010
WMS Performance Shootout 2010Jeff McKenna
 
Maps and Apps
Maps and AppsMaps and Apps
Maps and AppsAddy Pope
 
Wms Performance Tests Map Server Vs Geo Server
Wms Performance Tests Map Server Vs Geo ServerWms Performance Tests Map Server Vs Geo Server
Wms Performance Tests Map Server Vs Geo ServerDonnyV
 
MapServer #ProTips 2015
MapServer #ProTips 2015MapServer #ProTips 2015
MapServer #ProTips 2015Jeff McKenna
 
WMS Performance Shootout 2011
WMS Performance Shootout 2011WMS Performance Shootout 2011
WMS Performance Shootout 2011Jeff McKenna
 
Is An Agile Standard Possible For Java?
Is An Agile Standard Possible For Java?Is An Agile Standard Possible For Java?
Is An Agile Standard Possible For Java?Simon Ritter
 
55 New Features in JDK 9
55 New Features in JDK 955 New Features in JDK 9
55 New Features in JDK 9Simon Ritter
 

Viewers also liked (11)

FieldtripGB - data capture simplified
FieldtripGB - data capture simplifiedFieldtripGB - data capture simplified
FieldtripGB - data capture simplified
 
WMS Performance Shootout 2009
WMS Performance Shootout 2009WMS Performance Shootout 2009
WMS Performance Shootout 2009
 
Mapserver vs. geoserver
Mapserver vs. geoserverMapserver vs. geoserver
Mapserver vs. geoserver
 
Digimap Data and a Non-traditionalist Perspective - Shelley Mosco
Digimap Data and a Non-traditionalist Perspective - Shelley MoscoDigimap Data and a Non-traditionalist Perspective - Shelley Mosco
Digimap Data and a Non-traditionalist Perspective - Shelley Mosco
 
WMS Performance Shootout 2010
WMS Performance Shootout 2010WMS Performance Shootout 2010
WMS Performance Shootout 2010
 
Maps and Apps
Maps and AppsMaps and Apps
Maps and Apps
 
Wms Performance Tests Map Server Vs Geo Server
Wms Performance Tests Map Server Vs Geo ServerWms Performance Tests Map Server Vs Geo Server
Wms Performance Tests Map Server Vs Geo Server
 
MapServer #ProTips 2015
MapServer #ProTips 2015MapServer #ProTips 2015
MapServer #ProTips 2015
 
WMS Performance Shootout 2011
WMS Performance Shootout 2011WMS Performance Shootout 2011
WMS Performance Shootout 2011
 
Is An Agile Standard Possible For Java?
Is An Agile Standard Possible For Java?Is An Agile Standard Possible For Java?
Is An Agile Standard Possible For Java?
 
55 New Features in JDK 9
55 New Features in JDK 955 New Features in JDK 9
55 New Features in JDK 9
 

Similar to mod-geocache / mapcache - A fast tiling solution for the apache web server

How does Apache Pegasus (incubating) community develop at SensorsData
How does Apache Pegasus (incubating) community develop at SensorsDataHow does Apache Pegasus (incubating) community develop at SensorsData
How does Apache Pegasus (incubating) community develop at SensorsDataacelyc1112009
 
In memory grids IMDG
In memory grids IMDGIn memory grids IMDG
In memory grids IMDGPrateek Jain
 
Advanced Map Caching Topics
Advanced Map Caching TopicsAdvanced Map Caching Topics
Advanced Map Caching TopicsEsri
 
Bryan Thompson, Chief Scientist and Founder, SYSTAP, LLC at MLconf ATL
Bryan Thompson, Chief Scientist and Founder, SYSTAP, LLC at MLconf ATLBryan Thompson, Chief Scientist and Founder, SYSTAP, LLC at MLconf ATL
Bryan Thompson, Chief Scientist and Founder, SYSTAP, LLC at MLconf ATLMLconf
 
On-boarding with JanusGraph Performance
On-boarding with JanusGraph PerformanceOn-boarding with JanusGraph Performance
On-boarding with JanusGraph PerformanceChin Huang
 
SF Big Analytics & SF Machine Learning Meetup: Machine Learning at the Limit ...
SF Big Analytics & SF Machine Learning Meetup: Machine Learning at the Limit ...SF Big Analytics & SF Machine Learning Meetup: Machine Learning at the Limit ...
SF Big Analytics & SF Machine Learning Meetup: Machine Learning at the Limit ...Chester Chen
 
Apache Spark AI Use Case in Telco: Network Quality Analysis and Prediction wi...
Apache Spark AI Use Case in Telco: Network Quality Analysis and Prediction wi...Apache Spark AI Use Case in Telco: Network Quality Analysis and Prediction wi...
Apache Spark AI Use Case in Telco: Network Quality Analysis and Prediction wi...Databricks
 
High performace network of Cloud Native Taiwan User Group
High performace network of Cloud Native Taiwan User GroupHigh performace network of Cloud Native Taiwan User Group
High performace network of Cloud Native Taiwan User GroupHungWei Chiu
 
Java one2015 - Work With Hundreds of Hot Terabytes in JVMs
Java one2015 - Work With Hundreds of Hot Terabytes in JVMsJava one2015 - Work With Hundreds of Hot Terabytes in JVMs
Java one2015 - Work With Hundreds of Hot Terabytes in JVMsSpeedment, Inc.
 
Building maps for apps in the cloud - a Softlayer Use Case
Building maps for  apps in the cloud - a Softlayer Use CaseBuilding maps for  apps in the cloud - a Softlayer Use Case
Building maps for apps in the cloud - a Softlayer Use CaseTiman Rebel
 
Introduction to memcached
Introduction to memcachedIntroduction to memcached
Introduction to memcachedJurriaan Persyn
 
High-Performance Storage Services with HailDB and Java
High-Performance Storage Services with HailDB and JavaHigh-Performance Storage Services with HailDB and Java
High-Performance Storage Services with HailDB and Javasunnygleason
 
Extending Hadoop for Fun & Profit
Extending Hadoop for Fun & ProfitExtending Hadoop for Fun & Profit
Extending Hadoop for Fun & ProfitMilind Bhandarkar
 
JavaOne2016 - Microservices: Terabytes in Microseconds [CON4516]
JavaOne2016 - Microservices: Terabytes in Microseconds [CON4516]JavaOne2016 - Microservices: Terabytes in Microseconds [CON4516]
JavaOne2016 - Microservices: Terabytes in Microseconds [CON4516]Speedment, Inc.
 
JavaOne2016 - Microservices: Terabytes in Microseconds [CON4516]
JavaOne2016 - Microservices: Terabytes in Microseconds [CON4516]JavaOne2016 - Microservices: Terabytes in Microseconds [CON4516]
JavaOne2016 - Microservices: Terabytes in Microseconds [CON4516]Malin Weiss
 
Distributed caching-computing v3.8
Distributed caching-computing v3.8Distributed caching-computing v3.8
Distributed caching-computing v3.8Rahul Gupta
 
AWS (Hadoop) Meetup 30.04.09
AWS (Hadoop) Meetup 30.04.09AWS (Hadoop) Meetup 30.04.09
AWS (Hadoop) Meetup 30.04.09Chris Purrington
 
In-memory Data Management Trends & Techniques
In-memory Data Management Trends & TechniquesIn-memory Data Management Trends & Techniques
In-memory Data Management Trends & TechniquesHazelcast
 

Similar to mod-geocache / mapcache - A fast tiling solution for the apache web server (20)

How does Apache Pegasus (incubating) community develop at SensorsData
How does Apache Pegasus (incubating) community develop at SensorsDataHow does Apache Pegasus (incubating) community develop at SensorsData
How does Apache Pegasus (incubating) community develop at SensorsData
 
Kinetic basho public
Kinetic basho publicKinetic basho public
Kinetic basho public
 
Tile Caching Options
Tile Caching OptionsTile Caching Options
Tile Caching Options
 
In memory grids IMDG
In memory grids IMDGIn memory grids IMDG
In memory grids IMDG
 
Advanced Map Caching Topics
Advanced Map Caching TopicsAdvanced Map Caching Topics
Advanced Map Caching Topics
 
Bryan Thompson, Chief Scientist and Founder, SYSTAP, LLC at MLconf ATL
Bryan Thompson, Chief Scientist and Founder, SYSTAP, LLC at MLconf ATLBryan Thompson, Chief Scientist and Founder, SYSTAP, LLC at MLconf ATL
Bryan Thompson, Chief Scientist and Founder, SYSTAP, LLC at MLconf ATL
 
On-boarding with JanusGraph Performance
On-boarding with JanusGraph PerformanceOn-boarding with JanusGraph Performance
On-boarding with JanusGraph Performance
 
SF Big Analytics & SF Machine Learning Meetup: Machine Learning at the Limit ...
SF Big Analytics & SF Machine Learning Meetup: Machine Learning at the Limit ...SF Big Analytics & SF Machine Learning Meetup: Machine Learning at the Limit ...
SF Big Analytics & SF Machine Learning Meetup: Machine Learning at the Limit ...
 
Apache Spark AI Use Case in Telco: Network Quality Analysis and Prediction wi...
Apache Spark AI Use Case in Telco: Network Quality Analysis and Prediction wi...Apache Spark AI Use Case in Telco: Network Quality Analysis and Prediction wi...
Apache Spark AI Use Case in Telco: Network Quality Analysis and Prediction wi...
 
High performace network of Cloud Native Taiwan User Group
High performace network of Cloud Native Taiwan User GroupHigh performace network of Cloud Native Taiwan User Group
High performace network of Cloud Native Taiwan User Group
 
Java one2015 - Work With Hundreds of Hot Terabytes in JVMs
Java one2015 - Work With Hundreds of Hot Terabytes in JVMsJava one2015 - Work With Hundreds of Hot Terabytes in JVMs
Java one2015 - Work With Hundreds of Hot Terabytes in JVMs
 
Building maps for apps in the cloud - a Softlayer Use Case
Building maps for  apps in the cloud - a Softlayer Use CaseBuilding maps for  apps in the cloud - a Softlayer Use Case
Building maps for apps in the cloud - a Softlayer Use Case
 
Introduction to memcached
Introduction to memcachedIntroduction to memcached
Introduction to memcached
 
High-Performance Storage Services with HailDB and Java
High-Performance Storage Services with HailDB and JavaHigh-Performance Storage Services with HailDB and Java
High-Performance Storage Services with HailDB and Java
 
Extending Hadoop for Fun & Profit
Extending Hadoop for Fun & ProfitExtending Hadoop for Fun & Profit
Extending Hadoop for Fun & Profit
 
JavaOne2016 - Microservices: Terabytes in Microseconds [CON4516]
JavaOne2016 - Microservices: Terabytes in Microseconds [CON4516]JavaOne2016 - Microservices: Terabytes in Microseconds [CON4516]
JavaOne2016 - Microservices: Terabytes in Microseconds [CON4516]
 
JavaOne2016 - Microservices: Terabytes in Microseconds [CON4516]
JavaOne2016 - Microservices: Terabytes in Microseconds [CON4516]JavaOne2016 - Microservices: Terabytes in Microseconds [CON4516]
JavaOne2016 - Microservices: Terabytes in Microseconds [CON4516]
 
Distributed caching-computing v3.8
Distributed caching-computing v3.8Distributed caching-computing v3.8
Distributed caching-computing v3.8
 
AWS (Hadoop) Meetup 30.04.09
AWS (Hadoop) Meetup 30.04.09AWS (Hadoop) Meetup 30.04.09
AWS (Hadoop) Meetup 30.04.09
 
In-memory Data Management Trends & Techniques
In-memory Data Management Trends & TechniquesIn-memory Data Management Trends & Techniques
In-memory Data Management Trends & Techniques
 

Recently uploaded

Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfOverkill Security
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfOverkill Security
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024The Digital Insurer
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 

Recently uploaded (20)

Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 

mod-geocache / mapcache - A fast tiling solution for the apache web server

  • 1. MapServer MapCache (f.k.a mod-geocache) A Fast Tile-Caching Solution for the Apache HTTP Server 14 / 09 / 2011 Thomas Bonfort (Terriscope) Stephen Woodbridge (iMaptools)
  • 2. What’s a tile cache? Source Services Tileset Grids requests Cache
  • 3. Yet Another Tile Cache ? •  Mature / feature-full solutions already out •  High performance needed •  Started out as a small project, to validate the concept •  Integrated into the MapServer stack for next release
  • 4. Apache module •  Module = code run by the apache processes that treat requests •  Native code •  No overhead (e.g. CGI, FastCGI) •  Does not require spawning an interpreter per concurrent request •  Caveats: –  Thread/process synchronization –  Memory management –  Security
  • 5. Features •  Metatiling –  Cross process/thread locking ensures you can enable metatiling on an unseeded tileset •  Image recompression / optimization –  JPEG quality –  PNG compression level –  PNG quantization –  “Mixed” format: PNG+JPEG
  • 6. Features (cont) •  Expiration handling –  HTTP cache controlling headers –  Last-Modified, If-Modified-Since –  Automatically regenerate stale tiles •  Custom error reporting –  Message –  Empty image –  Status code (+optional HTTP header) •  Watermarking
  • 7. Features (cont) •  Dimensions –  Single values –  Intervals –  Regular Expressions •  FeatureInfo forwarding •  FastCGI / CGI option for use outside of apache
  • 8. Services •  TMS •  WMTS •  WMS / WMS-C •  Google Maps XYZ •  VirtualEarth Quadkeys •  KML SuperOverlays
  • 9. “Demo” Interface •  Lists all active services •  Easy way to check configured caches •  Simple OpenLayers slippy-map •  Cut-and-paste definitions for Layers •  http://localhost:8081/mapcache/demo
  • 10. Grids •  Extent •  Projection •  Resolution per level •  Tile size •  Comes preconfigured with popular grids •  Supports grid aliases •  For limited areas, use grid subsets, not your own grid!
  • 11. Data Sources •  Extensible, anything able to provide an image for given: –  Width, Height –  Extent –  SRS –  Optionally dimension •  WMS is the only implemented source –  Custom query parameters –  Custom headers
  • 12. Caches •  Extensible mechanism, backend must provide api to get/set a tile for a given grid, x, y, z (+dimension) •  Higher level locking mechanism allows on- demand cache generation •  Backends provide different performance / manageability tradeoffs •  Currently implemented: filesystem, sqlite, memcached
  • 13. Disk based caches •  Tilecache hierarchy: –  /tmp/osm/g/17/000/027/304/000/081/334.png •  Custom hierarchy: –  /tmp/{tileset}/{grid}/{x}-{y}-{z}.{ext} •  Support for symlinking blank tiles •  Watch out for filesystem limitations ! –  Max files per directory –  Max number of inodes –  Blocksize
  • 14. Sqlite caches •  Store tile data as blobs in sqlite db •  Slower than disk caches, but prevents filesytem headaches •  Flexible storage options: –  Provided custom schema –  MBTiles schema –  Custom schema, provide your own queries: •  select tile_data from tiles where tile_column=:x and tile_row=:y and zoom_level=:z"); •  insert or replace into tiles(tile_column,tile_row,zoom_level,tile_data) values (:x,:y,:z,:data)"
  • 15. Vertical Assembling Save bandwidth, request a single tiled layer ! &LAYERS=OSM&… &LAYERS=NEXRAD&… &LAYERS=OSM,NEXRAD&…
  • 17. Tile Assembling •  CPU bound operation: image format (PNG/ JPEG) encoding and decoding •  CPU acceleration (MMX,SSE,…) of pixel manipulation operations (scaling, blending) •  Configurable resampling •  No reprojection support •  Missing spec for TMS and WMTS support
  • 18. Proxying support •  Transparently add tiling / fast WMS support to existing services •  Intercepts GetTile / GetMap requests •  Configurable forwarding to other services based on request parameters
  • 19. Seeder •  Use multiple threads to load the source WMS •  Reseed tiles older than a specified date •  Seed only tiles inside given geometry –  OGR for data access: filter based on SQL queries, e.g. FIPS_A1=’USA’ , pop_density>1000 –  GEOS Prepared Geometries for fast intersection calculation •  Delete mode •  Specify dimension values
  • 20. Benchmarks •  Server: 4-core, 8GB ram, SSD storage •  ab tool used over Gigabit Ethernet •  “warm” filesystem •  All requests on exact same image data
  • 21. TMS requests / sec Throughput very dependent on image size Concurrent MapProxy Geowebcache MapCache requests wsgi 1 1 280 800 1 780 10 17 000 9 000 30 000 20 18 000 8 000 40 000 100 17 000 7 100 40 000 250 16 500 6 800 40 000
  • 22. SQLite backend, TMS •  MBTiles backend •  10 threads: –  TileStream: 900 –  MapCache: 8300
  • 23. Horizontal assembling •  Workload: ~20 png decompressions + 1 jpg compression •  10 threads •  With bilinear resampling –  MapProxy: 29 –  MapCache: 43 •  With nearest neighbor resampling –  Geowebcache: 35 –  MapProxy: 40 –  MapCache: 48
  • 24. Vertical assembling •  Workload: 2 png decompressions, 1 jpeg compression •  10 threads: –  Geowebcache: unsupported –  MapProxy: 435 –  MapCache: 640
  • 25. What’s next? •  MapServer Stack integration –  Docs –  Code sharing (image I/O, build tools) •  Ideas: –  Source assembling at the tileset level –  OGC ServiceExceptions –  HTTP options: •  HTTPS •  Authentication •  POST
  • 26. Want More? •  Soon up to date project page: http://www.mapserver.org/trunk/mapcache/index.html •  Soon defunct project page: http://code.google.com/p/mod-geocache/ •  Get the code: –  Mapserver trunk svn –  Mapserver 6.2 •  Contribute ! •  Twitter: @tbonfort