Readers can read all of it with no JS. Writers get an island that's pleasant to write in (Composer). When you want fast pages and rich editing at once, this wing is the floor plan to copy.
In this hall, the word "islands" is an architectural term. The JS that runs on the client is only the veranda for interaction; everything else is HTML assembled on the server. In a quiet reading room, small islands float only where they're needed.
Highlights
- In addition to Fresh's fsRoutes, main.ts has the GraphQL Yoga server and the upload proxy cohabit, and at the entrance it passes visitors through the ActorSuspendedError/isActorBanned gatekeeper
- The postgres pool in web/db.ts is max: 20—with a comment that unless it's wider than the delivery queue's concurrency of 10, connections starve when the federation gets crowded
- Even sitemaps.xml.ts and robots.txt.ts are placed as files, part of the corridor (routes)
A passage from the sutra
export const postgres = postgresJs(DATABASE_URL, {
// The pool size needs to exceed the ParallelMessageQueue concurrency (10)
// to leave headroom for HTTP handlers and KV store queries. The default
// of 10 can cause connection starvation under federation load.
max: 20,
});
export const db: Database = drizzle({
relations,
client: postgres,
logger: getDatabaseLogger(),
});