[HN Gopher] Mantle - Serverless Maps Using Lambda or Cloudflare ...
       ___________________________________________________________________
        
       Mantle - Serverless Maps Using Lambda or Cloudflare Workers
        
       Author : bdon
       Score  : 56 points
       Date   : 2022-04-07 18:11 UTC (4 hours ago)
        
 (HTM) web link (protomaps.com)
 (TXT) w3m dump (protomaps.com)
        
       | linsomniac wrote:
       | The thing that's holding us back on switching fully to OSM maps
       | is geocoder data. Any lines on the OSM of geocoding?
        
         | bdon wrote:
         | The stack I describe in the post is only for map tiles - Map
         | tiles are a good fit for CDNs because the input space is small
         | (just Z/X/Y coordinates on a square grid) and thus very
         | cacheable.
         | 
         | Geocoding is a very different problem because the input space -
         | human language - is much, much larger, and answering queries
         | quickly to support features like autocomplete really requires a
         | server with hot data in memory.
         | 
         | One of my favorite projects in this space is Pelias
         | https://pelias.io which is an open source auto-completing
         | geocoder based on OSM plus other open data. It's backed by a
         | great team that also runs a business: Geocode Earth
         | https://geocode.earth
        
           | juliansimioni wrote:
           | (Co-maintainer of Pelias and co-founder Geocode Earth here)
           | 
           | Thanks Brandon for yet another one of your shout outs.
           | 
           | I'd just like to underline one thing you said, Pelias/Geocode
           | Earth are based on OSM _plus other data_: that last part is
           | pulling a lot of weight.
           | 
           | OSM data is great, in fact the POI data in OSM is best-in-
           | class in many parts of the world. But OSM in general doesn't
           | have great address coverage. It's very difficult to manually
           | map low density rural or suburban areas, as is the preferred
           | method with OSM. Bulk address imports are possible, but rare.
           | However there are a huge number of local governments that
           | publish up to date, relatively complete and accurate address
           | lists, and we heavily lean on those for good address
           | coverage.
           | 
           | So to anyone looking for a geocoder who has been put off from
           | Pelias or Geocode Earth because you saw it uses OSM, give it
           | a try anyway. OSM data is a crucial piece of the puzzle, but
           | not the only one.
        
       | hampelm wrote:
       | > To illustrate the cost savings, every additional 1,000 users
       | that load a map on Google Maps costs 7 USD. An additional million
       | hits to Cloudflare Workers costs fifteen cents.
       | 
       | That's certainly a selling point!
       | 
       | The whole ecosystem of tools is powerful, this tileserver is a
       | great capstone and an interesting commercial model. What is your
       | definition of End Product here? Eg if we have an app and website
       | under one brand is that two end products or one?
       | 
       | How do updates work? Eg with mapbox or google you just get the
       | "latest" data (modulo time it takes them to integrate data), does
       | this hook automatically into the latest source?
        
         | bdon wrote:
         | > What is your definition of End Product here? Eg if we have an
         | app and website under one brand is that two end products or
         | one?
         | 
         | One brand with web + mobile app would be one product. To be
         | more explicit, a software development consultancy with multiple
         | clients would need one license per client.
         | 
         | For updates, you are 100% in control of the data once it is on
         | your S3. This means that it won't change from under you, change
         | pricing, or disappear. This also means you'll have to
         | explicitly copy updates from upstream, and I'm figuring out the
         | right cadence for that (likely ~quarterly)
        
           | toomuchtodo wrote:
           | Can Backblaze B2 be paired with Cloudflare for similar effect
           | at a lower storage cost? Backblaze does support an S3
           | compatible target [1].
           | 
           | [1]
           | https://www.backblaze.com/blog/backblaze-b2-s3-compatible-
           | ap...
           | 
           | EDIT: Thank you for the reply!
        
             | bdon wrote:
             | I've tested Backblaze B2 as a storage option, and I found
             | that with the level of traffic a typical map backend
             | incurs, there were enough 503 errors to cause problems.
             | This is an intentional trade-off of the B2 design that
             | allows them to set an aggressive price point:
             | https://www.backblaze.com/blog/b2-503-500-server-error/
             | 
             | I'm constantly evaluating all of the different deployment
             | combinations and new features on cloud providers, so part
             | of the service I'm offering is advice for your specific
             | provider and this workload.
        
       | dmrotar wrote:
       | Looks like a nice offering. For those interested in an even more
       | self-service style option -- check out
       | https://github.com/onthegomap/planetiler. Spin up a high-memory
       | spot instance on your favorite cloud provider, run a command, let
       | it run a few hours, and now you've got a complete tileset for the
       | planet at the cost of a couple of bucks. I'm not affiliated but
       | I've been using it for my own project
       | (http://www.lumathon.com/map) and I've been very happy.
        
         | bdon wrote:
         | Author of post here. One of the cool possibilities here is that
         | Planetiler output is just another dataset, provided it's been
         | converted to the S3-friendly PMTiles archive format (utility
         | here: http://github.com/protomaps/PMTiles)
         | 
         | While Google Maps and MapBox let you customize the appearance
         | of vector maps, you can only modify and remove data that
         | already exists at a zoom level. A self-hosted solution allow
         | products like yours to have 100% custom basemap datasets
         | specific to the application, and serve overlay datasets (like
         | those made with tippecanoe) through the same system.
        
       ___________________________________________________________________
       (page generated 2022-04-07 23:01 UTC)