Hey everyone,
It’s been about a month since my last update, and a lot has happened in the meantime. Here’s a rundown of the latest additions to reitti.
Travel-mode detection gets a lot smarter
Out of Project Thousand Papercuts came the idea to improve transportation mode detection: instead of a single max-speed per mode, reitti now supports speed bands and priorities for the different transportation modes. This is now part of reitti, and it makes mode detection way more accurate.
Explore where you’ve been with spatial coverage
The spatial coverage feature now has a new UI that lets you drill down through your world: continents → countries → cities and so on. For each region you get:
- when you first visited it,
- when you were last there,
- the top places in that region.
Notifications
Oh, and reitti now supports notifications. Not much to say here since you all shall know how this works.
It can notify you about:
- login failures,
- failed jobs,
- finished jobs,
- device inactivity for x hours, so you know if a tracker has gone quiet,
- new versions being available.
You can read them all in the built-in notification center, or have them pushed to your phone via Apprise or ntfy.sh.
Project J5: reitti on a 2016 phone
In one of my last release notes I mentioned I’d get an old phone that can run Linux. So I went ahead and grabbed a Samsung J5 (2016) with 2 GB of RAM. After some tweaking, I can report that reitti runs on it with the full stack, PostGIS, Redis, and the tiles cache.
It’s slower to ingest large imports (in a test, a year’s worth of data took an hour), but it works. After the first ingestion it’s quite usable, and it displays a whole year of data without a sweat. I call this Project J5. In my local tests I run reitti limited to 512 MB of memory and it works fine.
I’m still not quite decided whether installing postmarketOS, or nura as it’s now called, was fun. It’s gotten a lot easier since the last time I did this about ten years ago, but you still end up with three tabs open trying to figure out what went wrong, with the lingering threat of hitting a non-recoverable error. It worked out in the end, which is good, and seeing Linux on a phone still brings me joy.
It is not a shiny feature, but it forces me to keep lower-end hardware in mind, and that benefits everyone in the end.
Halving the database
Looking for low-hanging fruit after all that, I found an artefact from the past. Reitti creates synthetic points between your reported GPS data when necessary. Historically these were used both for calculating visits and for being drawn on the map. That second use case went away several releases ago, so I no longer need to store them in the database at all.
The numbers below are from my own server, which holds eight years of data. And lo and behold, dropping those points cuts the database size in half:
| Metric | Before | After | Change |
|---|---|---|---|
| Database size | 4,864 MB | 2,155 MB | -56% |
raw_location_points total |
3,527 MB | 886 MB | -75% |
Rows in raw_location_points |
10,453,961 | 3,152,748 | -70% |
It also speeds up calculating visits and trips by 3x, and querying large data ranges by up to 8x.
paikka gets leaner and better results
Speaking of performance and storage: paikka, my own dedicated reverse-geocoder, now stores its data much more efficiently and returns more interesting results than before.
How much more efficient? The whole planet used to be around 120 GB and took 12 h to import. It is now down to 10h, and the whole planet bundle is just 51.13 GB. That’s 70 GB saved, which I’ll use in the future for a new feature that will elevate reitti’s accuracy even further. But that’s a story for another day.
I have to say, I’m very happy I took the plunge and started building paikka with reitti users in mind. It has now served nearly 900,000 requests, without any cost or limits for you.
One note on the map below: paikka does not log individual requests. It buckets them into 50km x 50km cells and stores only the count per bucket, so what you’re seeing is request density rather than any specific location being tracked.
Security fixes
Finally, no update post would be complete without some security housekeeping in the current times:
- The tiles-cache service is a glorified nginx server, so it’s been updated to the latest version to protect against NGINX2root.
- The Java images got the mitigation for Java4Shell. I’ll remove the mitigation as soon as a new base image is ready and tested.
That’s it for this round. A huge thank you to everyone who tests, reports bugs, and throws ideas around. The speed bands came straight out of community discussion, so keep them coming.
Links & Community
- Source Code: github.com/dedicatedcode/reitti
- Release Notes: GitHub Releases
- Documentation: dedicatedcode.com/projects/reitti/latest/
- IRC: Drop by
#reittion Libera Chat if you want to chat, ask questions, or hang out. - Support the Project: If you find Reitti useful and want to help support development, you can find me on Patreon and Ko-fi.
Feedback, questions, and ideas are always welcome!
Daniel
AI Project Disclosure
- Implementation (Assisted): I use AI to write repetitive boilerplate code that is tedious to write manually. The majority of the codebase is written directly by me, and all generated code is reviewed and tested by me.
- Testing (Pair): Approximately an even split between human-authored tests and AI-assisted generation for test scenarios and edge cases.
- Documentation (Assisted): I use AI as an editing tool to help refine phrasing, documentation, and release notes into clean English.