Just booted my computer into Haiku for what is apparently the first time since July. Habitat's database had been corrupted shortly before then. The computer is currently both resyncing with the Tilde Friends room (which supports EBT although IIRC the rooms spec says it shouldn't) and it's also updating Haiku and all the other installed packages.
Glad it's working.
I didn't see anything that said rooms couldn't also replicate: https://hackmd.io/@andrestaltz/r1S4eHZJH https://ssbc.github.io/rooms2/
Though I'm interested in doing the "right" thing (which may or may not be what the spec says). Tilde Friends had settings to turn on and off room behavior, replication, and peer exchange (wip), and I have them all on for tildefriends.net.
First new commit to the Habitat git repos in a while: fixed a bug where if there were multiple EBT connections it would just sync everything from whichever had been connected the longest. I'm actually doing this a bit differently from the reference implementation and the spec: instead of choosing the one with the most messages of a given feed and using apparent latency to break ties I use a very slightly more complex tie-breaking heuristic - if a peer is already the selected source for a given feed then time since the last received message after the first 5 seconds is counted against it.
Today I merged and deleted the internet
git branch into main
which means these things have happened already this week:
- I got the list of peers in the "Network settings" GUI window to stay in sync with the one in the internal application object.
- I got the application object to persist the list of peers to disk and read it again when starting up.
- I got Habitat to automatically connect to peers on the list.
- I got it to detect when a connection has failed and reconnect.
Now I no longer have to use the Haiku IPC mechanism to get Habitat connecting to peers outside my LAN!. Tomorrow I'll be back into multiple active branches mode: on one branch I'll be adding timestamps to the list of criteria the Habitat can use in database queries, and in another branch I'll be adding support for room server tunnels.
Ooh. Not sure what kind of validation errors you're seeing, but it looks like this is the code that calculates message ids in Habitat and Tilde Friends, and my brain is mush right now, but they don't look equivalent to me:
I seem to have fixed the validation errors. Note to self: just because some official looking documentation for JSON.stringify
says \t
means vertical tab does not mean that's actually the case!