Hostsurvey is the tool that connects Bmd users. Experienced database users could consider it a specialized replication tool. Those familiar with web hosting can think of it as a semi-automatic mirroring system. Its goal is to copy any changes from one instance of a database to all the others. For a popular database, that could be a lot of instances on a lot of machines. I don't have a lot of bandwidth to play with here, so the task has to be very decentralized. Here's the model: everyone has a copy of the hostsurvey software and runs it regularly to monitor changes on several other users' instances, but no one has to monitor everyone. As long as there is a path from everyone to everyone (fully connected network) and the many hostsurveys run regularly, then the massive replication job should solve itself, albeit slowly.
Hostsurvey is just a big perl script that should run all the time. Right now, you probably should run it as your own user account name, but in the future it will run as "bmd". We'll create an application account like that later. Just remember it needs write access to all your database table files (.tbl's), sync files (.sync-date), the memberdirectory itself, and possibly more one day. It will spend most of its time sleeping in wait for the next nextchktime. The hostlist table in every Bmd database serves as a configuration table for hostsurvey. Here's a breakdown of the fields.
Hostsurvey will wait for the designated time to check hosts while watching your hostlist table files for changes every five minutes. It will download the host's sync files for all the days since the last modification time listed in the hostlist's lastmtime field and store them in /usr/bmd/tmp/(nickname). If the lastmtime field is blank, then hostsurvey must do a "full compare" which involves downloading the host's entire database. Obviously, we'd prefer to avoid that to save bandwidth.
Once all necessary sync files are stored on your harddrive, hostsurvey can begin adding the changes to your own database. This is the part where hostsurvey needs write access to your table files, sync files and to their member directories. This part is also going to change in the future. I would prefer to give each user some approval control over the content of his own instance before those changes can potentially spread to others. This means hostsurvey is going to split into several files so some of its capabilities can be included into Jester. Why don't you read about Jester next.