z The Flat Field Z
[ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ]

Armaria

armaria sqlite go

I've come to realize the solution I want for managing bookmarks doesn't exist. The existing solutions suffer from vendor lock in. I want a solution where I own the data, and it works across all the browsers and platforms that I use. Since this solution doesn't exist I decided to build it.

Postgres Logical Replication

postgres wal replication

A write ahead log (WAL) is a strictly ordered durable log of the changes that have been made to a database. The changes in a WAL can be applied sequentially to recreate a database from scratch.

Postgres allows clients to consume a stream of these changes using logical replication. By hooking into logical replication you can easily and reliably spin up derived data stores for your Postgres database.

Tree Sitter

tree-sitter emacs

Syntax highlighting in editors has been done with regular expressions for a long time, but with the introduction of tree sitter there is a better way. Rather than directly targeting the source code we can target an abstract syntax tree (AST). This results in more consistent syntax highlighting, more consistent indentation, and better performance.

Dataloader

cache performance typescript graphql

Request scoped caching is an incredibly common practice in back-end services. Dataloader is a way to implement request scoped caching, but it has a trick up its sleeve that makes it particularly useful for GraphQL.

Authorization

identity security authz

Any back-end service with users will end up implementing some form of authorization (authz). While this is often done intuitively, there are more formal models for authz. Furthermore there are off the shelf libraries you can use to help implement those models.

This post will not discuss identifying the caller (authentication), only what the caller can do (authz).

Avro

stack architecture typescript

Binary encoding formats offer many advantages such as compact storage, fast encoding/decoding, and well thought out ways to evolve your schema. But they often require a great deal of developer buy in with DSLs and distinct compilation steps. Avro has the same advantages as other binary encoding formats but has a superior developer experience.

Dependency Injection

testing typescript

Dependency injection is a pattern where a chunk of code doesn't directly reference its dependencies. Instead its caller provides the dependencies. This is made possible by the caller and the callee agreeing on contracts for the dependencies.

Doing this allows implementation of the dependencies to be easily swapped out, which is useful for writing unit tests.

Traces

observability traces typescript

Understanding why a distributed system is slow is a hard problem. A single request might trigger dozens of requests behind the scenes across a large number of discrete components.

Traces are an extraordinarily useful tool for this problem, and now with OpenTelemetry they are easy to implement in a vendor agnostic way.

Structured Logging

observability typescript

Back-end services are almost always configured to write out logs, and the people who operate those services will need to look at them to debug issues.

By writing those logs out in a machine readable format you can get far more value out of those logs.

Schema Validators

stack validation typescript

Most back end services will accept input by way of JSON. After verifying that the JSON is well formed there is a large amount of validation that will need to performed such as:

A class of libraries called schema validators solve this problem in an elegant and declarative way.

Prev T Next