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

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
 
MySQL_MariaDB-성능개선-202201.pptx
MySQL_MariaDB-성능개선-202201.pptxMySQL_MariaDB-성능개선-202201.pptx
MySQL_MariaDB-성능개선-202201.pptxNeoClova
 
My sql failover test using orchestrator
My sql failover test  using orchestratorMy sql failover test  using orchestrator
My sql failover test using orchestratorYoungHeon (Roy) Kim
 
Container orchestration overview
Container orchestration overviewContainer orchestration overview
Container orchestration overviewWyn B. Van Devanter
 
Redo log improvements MYSQL 8.0
Redo log improvements MYSQL 8.0Redo log improvements MYSQL 8.0
Redo log improvements MYSQL 8.0Mydbops
 
What we've learned from running a PostgreSQL managed service on Kubernetes
What we've learned from running a PostgreSQL managed service on KubernetesWhat we've learned from running a PostgreSQL managed service on Kubernetes
What we've learned from running a PostgreSQL managed service on KubernetesDoKC
 
Deep dive into Kubernetes Networking
Deep dive into Kubernetes NetworkingDeep dive into Kubernetes Networking
Deep dive into Kubernetes NetworkingSreenivas Makam
 
Best practices for Terraform with Vault
Best practices for Terraform with VaultBest practices for Terraform with Vault
Best practices for Terraform with VaultMitchell Pronschinske
 
Rate limits and Performance
Rate limits and PerformanceRate limits and Performance
Rate limits and Performancesupergigas
 
Creating new service name for oracle database
Creating new service name for oracle databaseCreating new service name for oracle database
Creating new service name for oracle databaseRavi Kumar Lanke
 
MySQL Database Architectures - InnoDB ReplicaSet & Cluster
MySQL Database Architectures - InnoDB ReplicaSet & ClusterMySQL Database Architectures - InnoDB ReplicaSet & Cluster
MySQL Database Architectures - InnoDB ReplicaSet & ClusterKenny Gryp
 
MongoDB.local Sydney 2019: Data Modeling for MongoDB
MongoDB.local Sydney 2019: Data Modeling for MongoDBMongoDB.local Sydney 2019: Data Modeling for MongoDB
MongoDB.local Sydney 2019: Data Modeling for MongoDBMongoDB
 
Qlik Replicateでのテーブル設定詳細(変換・フィルターなど)
Qlik Replicateでのテーブル設定詳細(変換・フィルターなど)Qlik Replicateでのテーブル設定詳細(変換・フィルターなど)
Qlik Replicateでのテーブル設定詳細(変換・フィルターなど)QlikPresalesJapan
 
Kubernetes Webinar - Using ConfigMaps & Secrets
Kubernetes Webinar - Using ConfigMaps & Secrets Kubernetes Webinar - Using ConfigMaps & Secrets
Kubernetes Webinar - Using ConfigMaps & Secrets Janakiram MSV
 
[MeetUp][3rd] Prometheus 와 함께하는 모니터링 및 시각화
[MeetUp][3rd] Prometheus 와 함께하는 모니터링 및 시각화[MeetUp][3rd] Prometheus 와 함께하는 모니터링 및 시각화
[MeetUp][3rd] Prometheus 와 함께하는 모니터링 및 시각화InfraEngineer
 
TECHTALK 20210406 Qlik Sense Enterprise SaaS 管理者向けセッション
TECHTALK 20210406 Qlik Sense Enterprise SaaS 管理者向けセッションTECHTALK 20210406 Qlik Sense Enterprise SaaS 管理者向けセッション
TECHTALK 20210406 Qlik Sense Enterprise SaaS 管理者向けセッションQlikPresalesJapan
 
Kubernetes Internals
Kubernetes InternalsKubernetes Internals
Kubernetes InternalsShimi Bandiel
 
Oracle advanced queuing
Oracle advanced queuingOracle advanced queuing
Oracle advanced queuingGurpreet singh
 

What's hot (20)

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...
 
MySQL_MariaDB-성능개선-202201.pptx
MySQL_MariaDB-성능개선-202201.pptxMySQL_MariaDB-성능개선-202201.pptx
MySQL_MariaDB-성능개선-202201.pptx
 
My sql failover test using orchestrator
My sql failover test  using orchestratorMy sql failover test  using orchestrator
My sql failover test using orchestrator
 
What is Docker
What is Docker What is Docker
What is Docker
 
Container orchestration overview
Container orchestration overviewContainer orchestration overview
Container orchestration overview
 
Redo log improvements MYSQL 8.0
Redo log improvements MYSQL 8.0Redo log improvements MYSQL 8.0
Redo log improvements MYSQL 8.0
 
What we've learned from running a PostgreSQL managed service on Kubernetes
What we've learned from running a PostgreSQL managed service on KubernetesWhat we've learned from running a PostgreSQL managed service on Kubernetes
What we've learned from running a PostgreSQL managed service on Kubernetes
 
Deep dive into Kubernetes Networking
Deep dive into Kubernetes NetworkingDeep dive into Kubernetes Networking
Deep dive into Kubernetes Networking
 
Best practices for Terraform with Vault
Best practices for Terraform with VaultBest practices for Terraform with Vault
Best practices for Terraform with Vault
 
Rate limits and Performance
Rate limits and PerformanceRate limits and Performance
Rate limits and Performance
 
Creating new service name for oracle database
Creating new service name for oracle databaseCreating new service name for oracle database
Creating new service name for oracle database
 
MySQL Database Architectures - InnoDB ReplicaSet & Cluster
MySQL Database Architectures - InnoDB ReplicaSet & ClusterMySQL Database Architectures - InnoDB ReplicaSet & Cluster
MySQL Database Architectures - InnoDB ReplicaSet & Cluster
 
MongoDB.local Sydney 2019: Data Modeling for MongoDB
MongoDB.local Sydney 2019: Data Modeling for MongoDBMongoDB.local Sydney 2019: Data Modeling for MongoDB
MongoDB.local Sydney 2019: Data Modeling for MongoDB
 
Qlik Replicateでのテーブル設定詳細(変換・フィルターなど)
Qlik Replicateでのテーブル設定詳細(変換・フィルターなど)Qlik Replicateでのテーブル設定詳細(変換・フィルターなど)
Qlik Replicateでのテーブル設定詳細(変換・フィルターなど)
 
Kubernetes Webinar - Using ConfigMaps & Secrets
Kubernetes Webinar - Using ConfigMaps & Secrets Kubernetes Webinar - Using ConfigMaps & Secrets
Kubernetes Webinar - Using ConfigMaps & Secrets
 
[MeetUp][3rd] Prometheus 와 함께하는 모니터링 및 시각화
[MeetUp][3rd] Prometheus 와 함께하는 모니터링 및 시각화[MeetUp][3rd] Prometheus 와 함께하는 모니터링 및 시각화
[MeetUp][3rd] Prometheus 와 함께하는 모니터링 및 시각화
 
Docker Container Introduction
Docker Container IntroductionDocker Container Introduction
Docker Container Introduction
 
TECHTALK 20210406 Qlik Sense Enterprise SaaS 管理者向けセッション
TECHTALK 20210406 Qlik Sense Enterprise SaaS 管理者向けセッションTECHTALK 20210406 Qlik Sense Enterprise SaaS 管理者向けセッション
TECHTALK 20210406 Qlik Sense Enterprise SaaS 管理者向けセッション
 
Kubernetes Internals
Kubernetes InternalsKubernetes Internals
Kubernetes Internals
 
Oracle advanced queuing
Oracle advanced queuingOracle advanced queuing
Oracle advanced queuing
 

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

Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
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
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 

Recently uploaded (20)

Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
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...
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 

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