Developing Error Handling Strategies for Asynchronous Messaging

Building a Panel out of e-ink Electronic Shelf Labels

How to Monitor and Optimize Your Database Performance: A Practical Guide

Write-ahead logging and the ARIES crash recovery algorithm

Issue #269



Swiss chocolate is the best chocolate. Hands down. The gauntlet has been thrown, step into the arena if you dare. This is THE hill I'll die on.

I came across this interesting read on Time Till Open Source Alternative (TTOSA). Although this is by no means a rigorous study, the ideas it illuminates are quite interesting. Personally I think it's great. Like herding hounds of yore, open source projects nip at the heels of proprietary software project managers to keep them focused on distinguishing features that make their product worth paying for. Well, that's the dream. I'm probably biased though, since I don't sell any proprietary software myself. I also dislike inputting my credit card details anywhere (don't have my current main card memorized and too many "company X has data breach, releasing personal information on millions of users"). What about you? What do you think the future looks like in terms of proprietary and open source software?

msmetko asked: "Do you have any examples of git lib rewrite attemtps, which aren't wrappers around the cli?". I don't! Do any of you?

Also here are some comments on Monday's issue.

Anyway, here's the issue.


Today's Sponsor: AppSignal

AppSignal doesn’t just offer performance monitoring and error tracking. We have a full set of features to monitor your application from A to Z packed in a clear and intuitive interface. All features are included in all plans.


Developing Error Handling Strategies for Asynchronous Messaging

Published: 6 September 2022
Tags: dotnet, microservices

Jeremy D. Miller discusses error handling strategies for enterprise applications that need to communicate with other systems asynchronously.
Some highlights:

  • The goals for error handling should be to seldom require manual intervention to recover work, build in resiliency to transient errors, limit temporal coupling to external systems, and prevent inconsistent state
  • Jasper can be used to handle exceptions and has built in strategies for retrying, requeueing, scheduling, moving to an error queue, discarding, and pausing processing
  • Circuit breakers can be used to pause message handling when a high number of exceptions are happening across incoming messages
  • Invalid messages can be discarded or moved to an error queue


Building a Panel out of e-ink Electronic Shelf Labels

Published: 26 August 2022
Tags: hardware

Raphael repurposes some electronic shelf labels (ESL) to build a cool little panel.
Some highlights:

  • An individual ESL has a similar brain to a fitness tracker
  • They are controlled with a purpose-built device that talks to them via RF or NFC
  • The main trick these chips use is to spend most of the time in a very low-power state, known as deep sleep
  • To wake up the CPU back to life, usual choices are a timer or a change in the logic state on one of its input pins
  • Low-power BLE devices have an extra power usage concern of broadcasting their existence

How do you guys feel about these building-type articles?


How to Monitor and Optimize Your Database Performance: A Practical Guide

Published: 30 June 2021
Tags: database, optimization, sponsored

In this post, we'll provide a step-by-step approach on what to focus on when you're looking to monitor and optimize database performance. Most of the principles from this post apply regardless of your stack.


Write-ahead logging and the ARIES crash recovery algorithm

Published: 26 August 2022
Tags: database

Kevin Sookocheff dives deep into how database changes survive crashes using write-ahead logging and the ARIES crash recovery algorithm.
Some highlights:

  • Write-ahead logging is a fundamental primitive that ensures all changes to data are first written safely to stable storage before being applied
  • Databases execute transactions in main-memory, which is facilitated by the buffer pool
  • The buffer pool holds an in-memory representation of the state of the database and periodically writes that state to permanent storage on disk
  • Both file systems and databases use a buffer residing in main memory to cache frequently or recently used data
  • Buffers provide excellent performance advantages when accessing data, but they introduce reliability concerns when true crash recovery is required
  • A STEAL policy states whether or not the database allows an uncommitted transaction to overwrite the most recent committed value of object in non-volatile storage
  • A FORCE policy requires that all updates made by a transaction are reflected on non-volatile storage before the transaction is allowed to be committed
  • A database log is a file on disk that stores a sequential list of operations on the database
  • The WAL protocol ensures that all log records updating a page are written to non-volatile storage before the page itself is over-written in non-volatile storage and a transaction is not considered committed until all of its log records have been written to non-volatile storage
  • The database uses the log sequence numbers to facilitate recovery by tracking the state of database pages, transactions, and flushed data during normal database operation
  • The most widely known and emulated implementation of crash recovery is ARIES — Algorithms for Recovery and Isolation Exploiting Semantics, which has three phases; analysis, redo, and undo
  • Analysis: The analysis phase reads the log from the last recorded checkpoint to identify any dirty pages and active transactions at the time of the crash. Redo: The redo phase repeats all changes to the database from a point in the log forward. This includes transactions that will abort. This retrace brings the database back to the exact state it was in before the crash. Undo: Reverse the changes made by transactions that did not commit before the system crashed.

How did I do?

1 2 3 4 5


Want to help and get cool stuff?

Thank you for reading! If you enjoy the newsletter, I would really appreciate you helping me spread the word by forwarding this to your friends and colleagues or sharing it on social media! Get cool stuff for your referrals using your link or the buttons below.

Your referrals:

If you want to discuss or comment on this issue, head on over to this page at A Byte of Coding. You can also subscribe there if you're new!

Have comments or feedback? Just reply to this email or hit me up on Twitter @AByteOfCoding.

Email landed in your promotions tab? Please move it over to primary so you don't miss the latest issues in the future.
Thanks for your Support! 

Thanks to sponsors and supporters like Євген Грицай, Scott Munro, zturak, pek, Emil Hannesbo, Joe Hill, Astrid Sapphire, Gregory Mazzola, moki scott, Michael, Matt Braun, Tim Nash, Christoffer, and Mike Rhodes this newsletter is provided to you for free. If you'd like to also show your support and buy me a monthly meal, you can donate on the Patreon page. It's not necessary, but it lets me know that I'm doing a good job and that you're finding value in the content.

Stats (updated daily)

Sent: 2957

Opens: 1410

Clicks: 571

Link Clicks Clicks % Unique Clicks Unique Clicks %
Developing Error Handling Strategies for Asynchronous Messaging 96 39.51% 103 38.72
Building a Panel out of e-ink Electronic Shelf Labels 83 34.16% 94 35.34
How to Monitor and Optimize Your Database Performance: A Practical Guide Awaiting Update Awaiting Update Awaiting Update Awaiting Update
Write-ahead logging and the ARIES crash recovery algorithm 64 26.34% 69 25.94


Back to Issues