๐พ Archived View for bbs.geminispace.org โบ u โบ clseibold โบ 11267 captured on 2023-11-04 at 15:10:10. Gemini links have been rewritten to link to archived content
โก๏ธ Next capture (2023-11-14)
-=-=-=-=-=-=-
The random token thing is actually a pretty good idea that I might have to steal for AuraGem :D
As always, great update!
2023-10-29 ยท 7 days ago
@skyjake For rate limiting, how do you keep track of the last time an IP connected to the server/route? And how do you keep the data from growing too big? Do you have a separate thread that every so often goes through the list and deletes the data of IPs that haven't connected after a certain period of time? Just wondering, because I'm going to be trying to implement Rate Limiting, and I'm not sure what the best way is to implement it. I'm mostly concerned with cleanup so I don't have a constantly growing map/list.
2023-10-29 ยท 6 days ago
I only keep track of registration attempts and when unapproved ("limited") users create a post, so there isn't a lot of logged actions happening. There's a database table where SHA-256 hashes of the IP addresses are stored together with a timestamp. (I don't want to keep a record of actual IP addresses.) My rate calculations are based on activity during the last hour. When checking the current rate (i.e., number of entries in the log), it also deletes entries older than one hour so the table doesn't keep growing. That's pretty much it, quite basic.
2023-10-30 ยท 5 days ago
@skyjake Ah, you're using a database. I see. I was thinking of doing a hashmap in memory, or maybe some trie structure, or something along those lines.
I did consider an in-memory log as well, but I prefer having a way to inspect the log manually (for potential IP blocking) and have it persist over restarts. Also importantly, the rate limiting is done by the CGI application, so it is being handled by multiple separate Python processes, which complicates shared memory access quite a bit.
Bubble v6.14 โ BBS has been updated to Bubble v6.14 with a number of bug fixes and minor improvements: Fixed publishing a draft comment in an issue tracker. Fixed error message when trying to create a subspace but the name is already in use. Fixed post summary if the content starts with a hash (accidental Gemtext heading). A subspace moderator can delete their subspace if it's empty. Poll author sees the results even if they haven't voted. Strip file/image attachment URL or link from the...
๐ฌ skyjake ยท 5 comments ยท 3 likes ยท 2023-10-29 ยท 7 days ago