Dealing With Optimistic Concurrency Control Collisions

Optimistic Concurrency Control (OCC) is a well-established solution for a rather old problem - handling two (or more) concurrent writes to a single object/resource/entity without losing writes. OCC works (typically) by including a timestamp as part of the record, and during a write, we read the timestamp: Begin: Record timestamp Modify: Read data and make tentative changes Validate: Check to see if the timestamp has changed Commit/Rollback: [Read More]

Swagger, the REST Kryptonite

Swagger, a tool to help design, build, document, and consume RESTful APIs is ironically kryptonite for building actual RESTful APIs. The battle over the term "REST" is lost, where "RESTful" simply means "an API over HTTP" but these days is 99% of the time referring to "RPC over HTTP". In a post covering the problems with Swagger, the author outlines some familiar issues I've seen with it (and its progenitors [Read More]

Refactoring Towards Resilience: Process Manager Solution

Other posts in this series: A primer Evaluating Stripe Options Evaluating SendGrid Options Evaluating RabbitMQ Options Evaluating Coupling Async Workflow Options Process Manager Solution In the last post, we examined all of our coordination options as well as our process coupling to design a solution for our order processor. In my experience, it's this part of design async workflows that's by far the hardest. The code behind building these workflows [Read More]

Refactoring Towards Resilience: Async Workflow Options

Other posts in this series: A primer Evaluating Stripe Options Evaluating SendGrid Options Evaluating RabbitMQ Options Evaluating Coupling Async Workflow Options Process Manager Solution In the last post, we looked at coupling options in our 3rd-party resources we use as part of "button-click" place order, and whether or not we truly needed that coupling or not. As a reminder, coupling is neither good nor bad, it's the side-effects of coupling [Read More]

Refactoring Towards Resilience: Evaluating Coupling

Other posts in this series: A primer Evaluating Stripe Options Evaluating SendGrid Options Evaluating RabbitMQ Options Evaluating Coupling Async Workflow Options Process Manager Solution So far, we've been looking at our options on how to coordinate various services, using Hohpe as our guide: Ignore Retry Undo Coordinate These options, valid as they are, make an assumption that we need to coordinate our actions at a single point in time. One [Read More]