frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Open in hackernews

Show HN: Fast Elevation API with memory mapped tiles

https://www.terraintap.com
2•anaj123•3h ago
I recently wrote and launched a high-performance Elevation API, built from the ground up, in C. I was highly inspired by the handmade community and I was intrigued by the idea of handling fairly large datasets and optimizing caching and smart prefetching, and to cream out maximum performance in terms of latency and handling large loads.

The whole thing is built from scratch. I wanted to roll my own high performance server that could handle a lot, mostly for the technical challenge but also because it brings down hosting costs.

At the core is a hand made TCP server where a single thread handles all I/O via epoll, distributing the events to a pool of worker threads. The server is fully non-blocking and edge-triggered, with a minimal syscall footprint during steady-state operation.

Worker threads handle request parsing and perform either direct elevation lookups for single- or multi-points, or compute sample points along polyline paths.

The elevation data is stored as memory mapped geotiff raster tiles, The tiles are indexed in an R-tree for fast lookup. Given a coordinate, the correct tile is located with a bounding-box search algorithm through the tree, and the elevation value is extracted directly from the mapped memory. If the tile is missing the data, underlying tiles act as fallback.

I also implemented a prefetching mechanism. That is, to avoid repeated page faults in popular areas, I employ a strategy where each tile is divided into smaller sub-tiles. Then, I have a running popularity count per sub-tile. This information is then used to guide prefetching. More popular sub-tiles trigger larger-radius prefetches around the lookup point, with the logic that if a specific region is seeing frequent access, it’s worth pulling in more of it into RAM. Over time, this makes the memory layout adapt to real usage patterns, keeping hot areas resident and minimizing I/O latency. Prefetching is done using linux madvise, in a separate prefetch thread to not affect request latency.

There’s a free option to try it out!

Easy Audio Loopback in Electron

https://alec.is/posts/bringing-system-audio-loopback-to-electron/
1•arm32•1m ago•0 comments

PresEngage Files Patent for Groundbreaking AI Co-Presenter

https://presengage.com/blog/presengage-files-patent-for-groundbreaking-ai-co-presenter/
1•presengage•6m ago•1 comments

Teams admins will now be able to see telemetry for screen sharing

https://www.neowin.net/news/teams-admins-will-now-be-able-to-see-telemetry-for-screen-sharing/
1•josephcsible•7m ago•0 comments

Galton Board

https://en.wikipedia.org/wiki/Galton_board
1•RyanShook•18m ago•0 comments

Ask HN: CS Course

1•h_tbob•21m ago•0 comments

Men know they should wear sunscreen, so why aren't they? [video]

https://www.youtube.com/watch?v=qkHlizfuWsw
1•mgh2•22m ago•0 comments

The mountain retreat – upholding an Italian tradition (football)

https://www.bbc.co.uk/sport/football/articles/czxylywwxgko
1•a_w•29m ago•0 comments

I built a Roblox Grow a Garden calculator to estimate fruit value and pet XP

https://growagarden-calculator.io
1•maysunyoung•30m ago•1 comments

AI's Pogo-Stick Grift

https://pluralistic.net/2025/08/02/inventing-the-pedestrian/
1•labrador•36m ago•0 comments

PatchworkOS: A 64bit non-POSIX OS where everything is a file

https://www.osnews.com/story/142960/patchworkos-a-64bit-non-posix-os-where-everything-is-a-file/
1•rguiscard•37m ago•0 comments

MIT Professor Fano on Computing as a Public Utility (1960s) [video]

https://www.youtube.com/watch?v=sjnmcKVnLi0
2•so-cal-schemer•38m ago•1 comments

Can't get AI to accurately analyze a spreadsheet – help needed

1•zyruh•39m ago•3 comments

Show HN: Realtime Magic-Eye Mirror

https://namuol.github.io/magic-eye-mirror/
1•namuol•39m ago•0 comments

Bassoon Tracker

https://www.stef.be/bassoontracker/
1•davepeck•40m ago•0 comments

Show HN: Voltpeek – A Vim inspired oscilloscope software

https://github.com/schuyler4/voltpeek
1•schuyler4•42m ago•0 comments

A novel nematode species from the Siberian permafrost

https://journals.plos.org/plosgenetics/article?id=10.1371/journal.pgen.1010798
1•mrintegrity•43m ago•1 comments

ILN

https://github.com/Tryboy869/iln-nexus
1•anzizdaouda0•44m ago•2 comments

Effect of Non-Nutritive Sweeteners on the Gut Microbiota

https://pmc.ncbi.nlm.nih.gov/articles/PMC10144565/
3•mgh2•48m ago•0 comments

A Doubly-MMapped Contiguous Shared-Memory Lock-Free Queue

https://www.reachablecode.com/2022/11/22/a-doubly-mmapped-contiguous-shared-memory-lock-free-queue/
2•ibobev•59m ago•0 comments

C++26 Reflections adventures and compile time UML

https://www.reachablecode.com/2025/07/31/c26-reflections-adventures-compile-time-uml/
3•ibobev•1h ago•0 comments

Quasi-Monte Carlo

https://thenumb.at/QMC/
2•ibobev•1h ago•0 comments

Show HN: InsForge – Open-source agent-native alternative to Supabase

https://github.com/InsForge/InsForge
6•honoyomu•1h ago•0 comments

You Have Too Many Metrics

https://staysaasy.com/management/2025/08/02/metrics.html
1•donutshop•1h ago•0 comments

Show HN: Xtwitt.com – X/Twitter Video Downloader

https://xtwitt.com/
2•nadermx•1h ago•2 comments

Wag Files for Bankruptcy

https://www.sfgate.com/tech/article/sf-tech-company-wag-files-for-bankruptcy-20790355.php
3•kaycebasques•1h ago•3 comments

Got tired of bad PDF WebApp so we made a Free, Open-Sourced, Private Alternative

https://luxpdf.com
6•PseudoComputer•1h ago•2 comments

Satellites Track Poppy Production in Afghanistan

https://www.alcis.org/poppy
4•andrewrn•1h ago•0 comments

Hospital food proven bad scientifically – and may undermine health

https://newatlas.com/health-wellbeing/healthcare-setting-food-quality-sustainability/
6•geox•1h ago•6 comments

Spotted lanternflies love grapevines that's bad for Pennsylvania's wine industry

https://theconversation.com/spotted-lanternflies-love-grapevines-and-thats-bad-for-pennsylvanias-wine-industry-260374
4•PaulHoule•1h ago•2 comments

Rare aerial imagery shows displacement and destruction in Gaza

https://www.washingtonpost.com/world/interactive/2025/gaza-war-destruction-aerial-airdrop/
8•jbegley•1h ago•0 comments