• Clearing Houz update...

    From deon@21:2/116 to All on Tue Jan 4 17:19:37 2022
    Howdy,

    So as some of you may be aware, I've been (slowly) creating a new mailer to manage FTN mail. I've been chipping away at this for the last few months or more, when I havent been distracted with work, parenting or other activities that have caught my attention.

    You'll have seen the fruits of my efforts, if you have ever seen a test message in FSX_TST or sent a ping message to the system that I've dubbed "Clearing Houz".

    I started this as a use case (or more correctly an excuse) to learn some (new to me) technologies that are available, or just to learn a different side of programming that I dont normally do. It's worked, I've learnt some new things that I've been able to apply outside of FTN.

    These Chrissy holidays have been great. We bought my kids a backyard pool (a temporary above ground pool), and with the awesome weather we've had since Christmas, the kids have been in it daily and for hours at a time. Normally, being the on duty lifeguard is boring, but I've been able to position myself at my daughter's arts desk (with a good view to the pool), and supervise and hack at the same time. Who said men cant do two things at once?

    So this last week, I decided to swap out MongoDB/postgres and switch over to CockroachDB. I started out using postgres (mostly for "config") because it gave me the option to switch to CockroachDB fairly easily if I chose to do so (and I have) - since CoackroachDB uses the postgres protocols.

    I also started with Mongo (to store the mail), because it was one of the technologies that I wanted to understand better. I work with clients and peers who talk about it, and this was a great way for me to get some hands on experience with it. I could have kept it, but I have stronger skills with RDBMS' and always had CockroachDB in the back of my mind. And I wanted to try out its geo dispersed setup.

    So, I've switched over to CockroachDB, to understand it better, and I'm planning on deploying it across multiple servers. One node will be at home, and hopefully another node will be on Avon's shiny new server, and a 3rd one could be somewhere else - I have a spot for it in mind.

    The reason I've gone CockroachDB (and why I was also playing with Mongo), is to build a highly available hub. Too many times I've seen a hub go offline (sometimes with no apparent reason) with the downstream nodes wondering why things are not working.

    With a highly available hub, the plan is (if I can get it to work), is provide a facility for downstream nodes to connect to an alternate hub with no disruption to mail. Also, i'm hoping it will enable a replacement to be promoted with little to no effort and no disruption to mail.

    So, with CockroachDB I should only need 51% of the nodes online for it to continue to answer queries and it seems adding/retiring nodes is pretty easy. I dont now how many nodes it can have in total - but starting with the 3 will hopefully be a good indication that it can deliver on my idea.

    It's secured by SSL (a plus), so in theory nobody should be able to connect to it unless they have a SSL cert signed by my CA (since it will be on the public internet). For end FTN nodes, my mailer code sits in front of it, and talks both BINKD (not fully 1.1) and EMSI.

    So Clearing Houz will be down for a little bit - I've written a migration tool to migrate the data out of Mongo into CoachroachDB (about 200,000 mail items - which does seem too many), and then I need to double check that my mailer/tosser is still working. In theory, any mail to it should queue up and if you see a burst of replies, hopefully that's only the responses to what was in the queue, and not to the test messages hidden in the 200,000 that get moved over.

    Once I've got it stable, I'm going to ask if anybody wants to break it - I'm sure there are things that I still need to fix...


    ...лоеп
    --- SBBSecho 3.14-Linux
    * Origin: I'm playing with ANSI+videotex - wanna play too? (21:2/116)
  • From Avon@21:1/101 to deon on Tue Jan 4 20:32:49 2022
    On 04 Jan 2022 at 05:19p, deon pondered and said...

    Howdy,

    Hey :)

    time. Normally, being the on duty lifeguard is boring, but I've been
    able to position myself at my daughter's arts desk (with a good view to the pool), and supervise and hack at the same time. Who said men cant do two things at once?

    Impressive... I think I'd fail at this, and kids that are not floating when they should be is never a good thing. I'm going to stick to uni-tasking... my wife approves :)

    So, I've switched over to CockroachDB, to understand it better, and I'm planning on deploying it across multiple servers. One node will be at home, and hopefully another node will be on Avon's shiny new server, and
    a 3rd one could be somewhere else - I have a spot for it in mind.

    Happy to support this as/when required :)

    Once I've got it stable, I'm going to ask if anybody wants to break it - I'm sure there are things that I still need to fix...

    One thing I noticed was the stats menu showed a massive spike of burst of spurious stuff posted in fsxNet by a rogue bot, it tended to screw over the usual daily stats because of the burp, wondering if there's a way to toggle such things on/off so as to avoid a distorted Y axis compared to usual traffic?

    Best, Paul

    --- Mystic BBS v1.12 A47 2021/11/06 (Linux/64)
    * Origin: Agency BBS | Dunedin, New Zealand | agency.bbs.nz (21:1/101)
  • From deon@21:2/116 to Avon on Tue Jan 4 21:39:49 2022
    Re: Re: Clearing Houz update...
    By: Avon to deon on Tue Jan 04 2022 08:32 pm

    Hey,

    Happy to support this as/when required :)

    Cool, I'll be in touch - get those docker skills flowing... :) (I'll give you destructions, so it should be a matter of a few config files - certificate and docker start, followed by "docker run" or "compose up", although I generally dont use compose (probably should sometimes)).

    The only downside to cockroach is that it'll probably use about 1GB of RAM (perhaps more) - I havent actually checked into it, so hopefully you have the memory. On my laptop it seems to sit around 256MB, although it was spiking at 750MB when I was importing. With docker you can limit how much memory it gets, but the OS will kill it if it tries to take more than what you give it.

    One thing I noticed was the stats menu showed a massive spike of burst of spurious stuff posted in fsxNet by a rogue bot, it tended to
    screw over the usual daily stats because of the burp, wondering if there's a way to toggle such things on/off so as to avoid a
    distorted Y axis compared to usual traffic?

    There is, you have two options:

    1) Click on the echoarea (in the legend) to toggle showing that echoarea in the graph. The offending area is FSX_BOT (IIRC). I was thinking of having a config on each area, toggling it between "normal" (ie: people traffic) and "bot" (ie: computer traffic) and thus by default turning off the non-human echos by default.

    That doesnt fix it when a system goes rogue later (in a people traffic echo) - although I'm no longer importing messages with the same CRC as a previous message (in the same echo by the same FTN address in the last week). So each message (within a week at least) will then be truely unique.

    2) Using your mouse, you can "drill" into a time period. Click and drag (either direction), and the graph will zoom into the selected time period and redraw.

    Oh, and I've fixed the graphic so that the legend takes up less space - that'll show when I do the next update.


    ...лоеп
    --- SBBSecho 3.14-Linux
    * Origin: I'm playing with ANSI+videotex - wanna play too? (21:2/116)