15 ms·
The real meat of this story: > A web application with 50,000 map loads using the Google Maps API will cost $350 per month. > A similar amount of traffic runni
by TotempaaltJ 4y ago
The real meat of this story:
> A web application with 50,000 map loads using the Google Maps API will cost $350 per month.
> A similar amount of traffic running through a Protomaps CDN install on Cloudflare, with an average of 20 tiles per session, costs fifty cents in Cloudflare Workers request fees.
$350 versus $0.50! Who's going to be the first to build a (maybe Google Maps-compatible?) API on top of this and sell it for a fraction of the cost?
Edit: Looked around a bit and Protomaps already offers a hosted map through Github Sponsors here: https://github.com/sponsors/protomaps https://github.com/sponsors/protomaps
- bdon 4y agoAs mentioned in the post there's a _free_ API for non-commercial use that I maintain, and you can make commercial use of it by becoming a GitHub Sponsor: http://github.com/sponsors/protomaps http://github.com/sponsors/protomaps But being "Google Maps compatible" will never be possible as long as the Google Maps client library and data are proprietary.
- TotempaaltJ 4y agoThat's awesome, just saw that myself! This is a super cool project. Fwiw with "Google Maps compatible" I didn't mean showing Google's Maps, I was thinking more a drop-in replacement to (some subset of) Google's client library.
- bdon 4y agoHmm, I haven't heard of any open source projects re-implementing Google's client library, and I imagine it would be difficult to keep parity with a closed-source project. Most open source efforts have consolidated around MapLibre GL https://maplibre.org https://maplibre.org which is a maintained fork of Mapbox GL before their switch to a source-available license.
- londons_explore 4y agoMost Google Maps client library users use only a few basic features - "display slippy map here with a pin centered on here" type thing. Then just stub out any other API call with "alert('Not implemented, but PR's welcome!')" And as far as webmasters are concerned, switching from google maps to your maps involves just switching out the <script> tag for a different one.
- deleted 4y ago[deleted]
- manv1 4y agoAn API is an API. The code behind it being closed is irrelevant.
- gniv 4y ago> $350 versus $0.50! It's not as impressive as you make it sound. The real value of the Maps API is in 1) routing and 2) local business details. These are both hard for anybody else to provide, so Google prices them accordingly. The price for the tiles is just an extension to the overall pricing.
- yunohn 4y agoExactly this. Google Maps isn’t charging for raw bandwidth/storage. They spend massive amounts on R&D to make Maps the most useful and competitive global mapping solution. This comes at a cost, which is completely different than using community-maintained partially-complete OSM maps.
- Doctor_Fegg 4y agoA little naughty to describe OSM as "partially complete" but not Google. Last time I looked, Google didn't have a fraction of the footpaths or cycleways around here that OSM has.
- ClumsyPilot 4y ago> These are both hard for anybody else to provide, so Google prices them accordingly. I used to provide data to Google, mark missing postboxes, etc. Then I realised I am just helping them make money. Also they used to be quick, and got sloppy - 7 years ago my submission would get processed in 1 week. Recently i submitted nearby postbox, with GPS coordinates and pictures - 6 months, no responce. This is lile with social networks - the content is what matters, and people give it away for free
- bjelkeman-again 4y agoBetter spend that time on Open Street Map then.
- m4rtink 4y agoI would argue its easier and quite fun to do via StreetComplete: https://streetcomplete.app/ https://streetcomplete.app/ (Mobile app where you can fix and enhance OpenStreetMap data on the go.)
- tantalor 4y agoI don't know about "20 tiles per session" That's like, 1 pan or 1 zoom. It might as well be a static map if the users don't actually interact with it.
- benburleson 4y agoI would be that's actually a majority of usage in the wild. Sometimes I'll zoom out if I need more context, but I'm not wandering around most embedded gmaps.
- tantalor 4y agoMy point was if that's truly the dominant use case then the map should be a static image initially and replaced with tiles lazily.
- bdon 4y agoIt is the dominant use case, and a static server-rendered image is more computationally expensive to generate than a tile-based system; a static image has effectively infinite variation in center, bounds and map scale, so requires dynamic computation from a server to send a JPEG/PNG. A tile-based system can just pre-generate a couple million tiles which is exactly the strategy Protomaps uses.
- nsteel 4y ago> Tested in production at scale: On AWS, response times average 100 ms for cache hits, 200 ms for misses. Cloudflare is significantly slower, but is improving as Cloudflare's R2 offering matures. They are comparing the price using Cloudflare, which although cheap, has poor performance. I don't know anything about these services or their pricing. Maybe AWS costs about the same as Cloudflare, but it's cheeky to have inconsistent comparisons like this. Ideally, this post/advert would provide the equivalent AWS price also (or provide Cloudflare performance numbers).
- bdon 4y agoAuthor here. AWS is quite a bit more expensive than cloudflare, mostly because of egress charges from Cloudfront. Cloudflare R2 latency is tricky to predict and can be anywhere from a few hundred milliseconds to 1s+ in my experience. This is for cache misses, only, of course; cache hits are comparable to AWS. Cloudflare really has every incentive to improve their product so I expect this to be much more competitive in the near future.
- orf 4y agoI haven’t really seen many R2 performance benchmarks, but 1s+ for retrieval is nuts. Is that time to first byte or total time? On what average object size?
- tiffanyh 4y ago> Who's going to be the first to build a (maybe Google Maps-compatible?) API There would be some irony if a 3rd-party monetize off of Google shoulders a compatible-API to their Map service. Given that's what they did to Java.
- KRAKRISMOTT 4y agoEmbrace and extend :)
- jasmer 4y agoTCO = Total Cost of Ownership. The cost will likely be in developmetn and maintanance, not service fees. Use whichever API is clean, simple, stable and you don't have to think about. This might be a solution for larger operations that have some intrinsic relationships with maps.
- deleted 4y ago[deleted]
- lakomen 4y agoIt claims that it's self hostable, maybe it's because I'm on the phone right now, but I couldn't find any self hosting instructions.
- maxerickson 4y agoThe thing being discussed is designed for cloud, so I think self managed is a better description? https://protomaps.com/docs/cdn https://protomaps.com/docs/cdn Self hosting pmtiles is straightforward also, make a file available to a server that supports range requests: https://protomaps.com/docs/pmtiles#2.-serve-your-file-locally https://protomaps.com/docs/pmtiles#2.-serve-your-file-locall...