Relative Content

Tag Archive for architectural-patterns

Feedback on custom “Orchestration” architecture

I’ve been doing some deep thinking on how to structure code and found myself coming up with a (for me) new pattern. The pattern is based on a highly modular approach with a large focus on indirection, reusability and enforcement of a singular “right way” of coding.

REST API with swappable backends

What would be the best way to have a single REST API but with multiple “backends” (Not sure if this is the correct terminology)? Currently we have a basket/cart API that handles product creation, adding and removing products to a customer’s basket, and handles all the checkout related stuff (Pricing, discount, instalments etc)

How to handle data when source of truth is through API

I am making a webapp that deals with money movement. All the financial actions are done through an API. For example, right now I can create an account for a user, add funds to their account, transfer funds to another account, etc. Currently I grab all the information on a user, their account balance, transactions etc. and store it on my local db.

Is a callback function with `this` as an argument a bad practice?

I have a class that has a callback function that gets triggered on some event. The user of the class instance is expected to do stuff on the instance itself, inside this callback function. So I am wondering if I should add the instance itself as an argument to the callback.

Deduplication, Grouping for events table at scale

I’m working with an events table where different source tables trigger writes into this table with columns: entity_id and payload. These events are then published to a Kafka topic using a message relay service. The table is partitioned hourly based on event_time, handling a high scale of ~5M+ rows per hour. After a row is processed and published, we mark it as processed=true and drop partitions after 24 hours to avoid performance issues from deleting individual rows.