jacob2161
Chrony is also much better software than any of the PTP daemons I tested a few years ago (for an onboard autonomous vehicle system).
Cycling connections may cover for certain classes of bugs but I dislike doing things for this reason, but maybe there are others. I'll put some thinking/testing into it at some point.
Thanks!
Some longish Bash scripts are very maintainable and reliable, because they're still quite regular and simple.
Yeah, I think "PRAGMA optimize" here on startup is basically a no-op and only costs microseconds but I should just remove it.
Seems like the ideal thing is to spawn a goroutine and run optimize periodically. Many Go daemons I run will have uptime measured in months so running on shutdown isn't super useful there.
Another one I might add is running `PRAGMA wal_checkpoint(PASSIVE)` periodically from a goroutine, which is something I've done in some of my daemons. Because otherwise a random write suffers from increased latency due to having to checkpoint.
Probably makes sense to open a dedicated read/write connection just for running `PRAGMA wal_checkpoint(PASSIVE)` at some regular interval to keep ahead of any autocheckpointing?
And for many no/low concurrency situations there's no/little benefit.
Added this example to the README.
rwdb, err := sqlitebp.OpenReadWriteCreate("app.db")
if err != nil {
log.Fatal(err)
}
rwdb.SetMaxOpenConns(1)
rwdb.SetMaxIdleConns(1)
// Read-only with default adaptive pool size (2-8 based on GOMAXPROCS)
rodb, err := sqlitebp.OpenReadOnly("app.db")
if err != nil {
log.Fatal(err)
}Bash scripts are great if you've been doing it for a very long time or you're doing something simple and small (<50 LOC). If it's complicated or large, you should just write it in a proper programming language anyway.
There are real environments where it's at /bin/env.
Running a script with
bash script.sh
Works on any system with bash in the path, doesn't require that it be executable, and is usually the ideal way to execute them.I don't really believe in trying to write portable Bash scripts. There's a lot more to it than just getting the shebang right. Systems and commands tend to have subtle differences and flags are often incompatible. Lots of branching logic makes them hideous quickly.
I prefer to write a script for each platform or just write a small portable Go program and compile it for each platform.
I'm almost always writing Bash scripts for Linux that run in Debian-based containers, where using /bin/bash is entirely correct and safe.
Regarding verbosity, most people come to appreciate a little verbosity in exchange for clarity with more experience. Clever and compact code is almost never what you want in production code.
#!/bin/bash
set -o errexit
set -o nounset
set -o pipefail
It reminds me when I wrote a lot of Perl: #!/usr/bin/perl
use strict;
use warnings;
I also prefer --long --args everywhere possible and a comment on any short flag unless it's incredibly common.I've been writing all my Bash scripts like this for ~15 years and it's definitely the way to go.
And it's the only open network built on an open protocol to ever do so.
But certain things like full-network relays/app views just have inherent bandwidth/storage/compute costs associated with them but it's definitely something a non-profit (like Internet Archive) could easily afford to do.
The PLC service could likely be hosted for ~$40/mo.
An atproto PDS is like a structured-data blog hosted on a web server. Anyone is free to index, relay, and render the data.
2. I really don't care if the investors/shareholders are disappointed as long as the PBC's mission is fulfilled. Also their control is relatively limited.
Maybe I should have written added this:
Disclaimer: I am a shareholder in Bluesky Social, PBC (former employee)
VCs funded Netscape which did more than any other company to launch the web and they made a lot of money without having to destroy the ideals of the web.
For example, Wikipedia generates >$180M/yr just by running ads for itself requesting donations. Requesting donations is the least effective monetizing strategy and yet it still works because of scale.
Donations would probably work but Bluesky has additional options. They could create a premium app for power users that just adds nice-to-have features (which may cost real money to provide and maintain), they can resell domain names, they can sell merch, etc.
Bluesky doesn't need to generate billions of dollars to be highly sustainable and profitable. It was built and scaled with fewer than 20 full time employees.
The most important and most difficult part is getting to sufficient scale, and that's mostly a matter of just making the app even better than it is today.
I posted a bit about this here: https://bsky.app/profile/jacob.gold/post/3lr5j6o7emk2t
> Yeah, but, unless `plow` actually follows that redirect, it's not really measuring the actual end-to-end latency...
Not in this case, since the purpose here was to measure the POST (write) not the subsequent GET (read) that a browser would do after the redirect.
plow may not be the best tool that exists but it does make concurrent HTTP requests and generate metrics for them successfully.
The writes returned 3xx because the handler returns a redirect, so this is expected.
https://github.com/Jacob2161/cgi-bin/blob/main/gohttpd/main....
See as "Benchmarking (writes|reads) using Go net/http"
It was faster but not by very much. Running CGI programs is just forking processes, so Apache's forking model works just about as well as anything else.