Giter Site home page Giter Site logo

philipp-meier / tile-server Goto Github PK

View Code? Open in Web Editor NEW
5.0 1.0 0.0 23 KB

:earth_africa: Simple tile server for .mbtiles-files with docker support, written in C# with minimal APIs.

License: MIT License

C# 39.30% Dockerfile 18.96% HTML 25.34% JavaScript 16.40%
csharp docker docker-compose dotnet dotnet-core map-tile-server map-tiles mbtiles tile-server tileserver

tile-server's Introduction

tile-server

CI MIT License
Simple tile server for .mbtiles-files written in C# with minimal APIs.

Quickstart

Development environment

Run dotnet run in the src folder to start the application.

Standalone (Release)

Download the latest standalone.zip from the release page, place your .mbtiles-file in the "data"-folder, rename it to map_data.mbtiles and start the .NET application. The tiles are available at https://localhost:5001/{z}/{x}/{y}.png.

Docker setup

  1. Place your .mbtiles file in the ./data directory (mkdir data) and rename it to map_data.mbtiles.
  2. Generate a (trusted) https certificate and place it in the https folder:
    dotnet dev-certs https -ep ./https/aspnetapp.pfx -p <password>
    dotnet dev-certs https --trust
  3. Enter your chosen https certificate password in the docker-compose.yml environment variable.
  4. Build the tile server with docker compose build.
  5. Run the server with docker compose up.
  6. Open the ./test/index.html to see a leaflet-demo.
  7. [Optional] Enter the container with docker exec -it tile-server-app-1 bash.

Operations

dotnet-counters and dotnet-dump are available in the /tools-folder of the tile-server. /tools/dotnet-counters monitor -p 1 can provide a high-level overview of the applications health (CPU usage, GC- and thread pool information,...).

/tools/dotnet-dump collect -p 1 can be used to create (and also analyze) dumps.

Stress testing

Install k6 by Grafana Labs and run the following command: k6 run test/k6.js

Statistics

Statistics from a local bombardier benchmark:

./bombardier https://localhost/5/15/19.png -d 120s --insecure

Bombarding https://localhost:443/5/15/19.png for 2m0s using 125 connection(s)
Done!
Statistics        Avg      Stdev        Max
  Reqs/sec     36734.64    4022.55   47849.41
  Latency        3.40ms     1.08ms   122.90ms
  HTTP codes:
    1xx - 0, 2xx - 4407445, 3xx - 0, 4xx - 0, 5xx - 0
    others - 0
  Throughput:   716.23MB/s

Used mbtiles file

https://ftp.gwdg.de/pub/misc/openstreetmap/openandromaps/world/OAM-World-1-8-min-J80.mbtiles

tile-server's People

Contributors

philipp-meier avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.