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 (20)

Front end web development
Front end web developmentFront end web development
Front end web development
 
Android application structure
Android application structureAndroid application structure
Android application structure
 
Quick flask an intro to flask
Quick flask   an intro to flaskQuick flask   an intro to flask
Quick flask an intro to flask
 
Common Gateway Interface
Common Gateway InterfaceCommon Gateway Interface
Common Gateway Interface
 
Networking & Socket Programming In Java
Networking & Socket Programming In JavaNetworking & Socket Programming In Java
Networking & Socket Programming In Java
 
Uploading a file with php
Uploading a file with phpUploading a file with php
Uploading a file with php
 
Beyond syllabus for web technology
Beyond syllabus for web technologyBeyond syllabus for web technology
Beyond syllabus for web technology
 
Web fundamentals - part 1
Web fundamentals - part 1Web fundamentals - part 1
Web fundamentals - part 1
 
Bootstrap
BootstrapBootstrap
Bootstrap
 
Loaders
LoadersLoaders
Loaders
 
PHP - Introduction to File Handling with PHP
PHP -  Introduction to  File Handling with PHPPHP -  Introduction to  File Handling with PHP
PHP - Introduction to File Handling with PHP
 
Introduction to php
Introduction to phpIntroduction to php
Introduction to php
 
Ajax ppt
Ajax pptAjax ppt
Ajax ppt
 
JDBC: java DataBase connectivity
JDBC: java DataBase connectivityJDBC: java DataBase connectivity
JDBC: java DataBase connectivity
 
Js ppt
Js pptJs ppt
Js ppt
 
Server side scripting
Server side scriptingServer side scripting
Server side scripting
 
Introduction of Html/css/js
Introduction of Html/css/jsIntroduction of Html/css/js
Introduction of Html/css/js
 
ADB(Android Debug Bridge): How it works?
ADB(Android Debug Bridge): How it works?ADB(Android Debug Bridge): How it works?
ADB(Android Debug Bridge): How it works?
 
HTTP request and response
HTTP request and responseHTTP request and response
HTTP request and response
 
Synchronization.37
Synchronization.37Synchronization.37
Synchronization.37
 

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

Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 

Recently uploaded (20)

Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 

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