olivermrbl
Joined 3 years ago
Joined 3 years ago
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.
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 :)
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:
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.