Category: JavaScript

  • Who Says Distributed Monoliths are Bad?

    I’m going down the rabbit hole of reading about microservices for an upcoming talk. As a UI guy, I’m always playing catchup, more so on the back-end. I’m intentionally targeting my survival bias trying to find _anything_ that cites Distributed Monoliths as good (most assume bad). This was originally posted on Twitter.

    (more…)
  • Async/Await vs Promise.then Style

    I see a lot of new, veteran, and non-JavaScript developers confused about the 2 styles of writing Promises in JavaScript. I wanted to cover what both style offers, why you’d use one or the other, and why you typically should choose one and not mix both together. Promises are a deep topic, so this isn’t a guide on the various ways Promises work, but it does include the basics.

    (more…)
  • 3 Bugs This Week

    Ensuring tech blogs don’t become the Instagram for Coders where we portray everything in our coding lives as perfect…

    I had 3 bugs this week.

    (more…)
  • Large Step Function Data – Dealing With Eventual Consistency in S3

    Large Step Function Data – Dealing With Eventual Consistency in S3

    Introduction

    Step Functions have a 32kb limit of data. I thought “just use S3” was simple, but there are some important details you need to know if you intend to update the data, and/or delete the data and read it many times. Below, we’ll cover how you can use S3 to solve this problem, and what bugs will occur if you’re not careful, and how to prevent those bugs from happening.

    TL;DR; Updating an existing file on S3 and then reading it won’t always return what you just wrote; it may take a few seconds. Generate an MD5 hash of your file contents, and ensure any downstream services (Lambda, Batch, etc) utilize that MD5 hash. This will confirm if they have the latest version of the file; if not, simple fail with a specific error and have the Step Function wait a second and retry.

    (more…)