Better HN
topnewbestaskshowjobs
Log inSign up

olivermrbl

27 karma · joined Dec 14, 2022 (3y ago) · 12 submissions

co-author of medusajs
Submissions

1.

ACID transaction orchestration in composable architectures(medusajs.com ↗)

5 points · by olivermrbl · 3y ago · discuss

2.

We designed an API with a Git-like control flow(medusajs.com ↗)

10 points · by olivermrbl · 3y ago · discuss

comment 3y ago · link · parent

> What would happen if the orchestrator was unable to update the remote shared cache outbox after a local exception/rolled back transaction

To be sure, I understand your question, you are referring to the following scenario:

- Start global transaction

- Create shared cache entry

- Add events to the shared cache

- Local transaction fails

- Orchestrators starts rolling back local transaction

- Attempts to delete shared cache entry <-- THIS ONE FAILS

To ensure we don't have stale events in the cache, I would add a TTL, which is configurable for each job (such that you can have long-living events). So in case the orchestrator fails to delete the cache entry, they would be invalidated at some point by exceeding its TTL.

comment 3y ago · link · parent

Thanks for chiming in!

Although I appreciate your detailed walkthrough of Inngest (sounds amazing), I wonder if it is the right fit for us.

One of our guiding product principles is to always build framework agnostic solutions, allowing our users to choose the best tools and providers for their needs. We do this by creating abstractions for each functional area of our domain and element of the stack.

In the context of events infrastructure, developers should be able to use Redis, RabbitMQ, Kafka, and even Inngest interchangeably.

I would love to hear more about your experience with CDC. As far as I understand, this is an alternative to simply polling the outboxes. Will shoot you an email :)

comment 3y ago · link · parent

On the alternative solution, it's worth stressing, that it does not have to be a cache service. Any key/value store would do.

comment 3y ago · link · parent

Yes indeed. Attaching below a couple of references from my exploration:

Transactional outbox pattern:

- https://microservices.io/patterns/data/transactional-outbox....

- https://softwaremill.com/microservices-101

- https://brandur.org/job-drain

A pattern similar to the one I mention using cache:

- https://masstransit-project.com/articles/outbox.html

7.

Ask HN: What are best patterns for events in distributed transactions?

42 points · by olivermrbl · 3y ago · 12 comments

comment 3y ago · link · parent

Don't hesitate to reach out. We are amid extending our B2B capabilities, so it would be super interesting to learn about your client's requirements. And your own.

comment 3y ago · link · parent

Medusa is a headless API, so you are free to consume it from wherever you want whether it be a React-based storefront, a C# backend, or something third - there's really no limitations.

But the source code of the open-source project is written in Node.js, so if you looking to contribute, you are forced to write JS.

Re SDKs, there's an official JS SDK and a community-led Flutter SDK - that I know of. The former can be found in the GitHub repository here: https://github.com/medusajs/medusa/tree/master/packages/medu...

Disclaimer, I am co-author of the project.

10.

Ask HN: What are essentials elements in an enterprise commerce stack?

1 points · by olivermrbl · 3y ago · 1 comment