We’re (re-)designing our event driven architecture, and would like to hear some feedback/ideas from you!
Our company provides B2B BNPL in the CEE region (soon through whole EU), so we have handle webshop orders, invoices, complains, communication, etc.
So we’ll have around 100-150 technical events (ex. order placed, debtor paid inside period, 10 days passed since due date, etc.) and we plan to attach different logic to each event. These handlers will work differently based on some factors (currency, country of origin, time during the day, record statuses, etc.) and will trigger actions (email sending, Slack message, API call, etc.) or other events.
Technical note: We’ll use Terraform to setup the solution, and our whole solution runs on different serverless GCP solutions. (GCF, Cloud Run)
First approach: use GCP Workflows and Tasks to map handlers
- low-code solution, when all details are passed
- easy to extend (for a while)
- great Terraform support
- we have concerns about complexity would make it un-readable by time.
- really far from programming → team needs to learn it
- it may have boundaries, which require complex workarounds
- not sure how can we test locally and on CI.
Second approach: pub/sub based solution
- We have parts of it already, we only need to extend our solution, but not the tech stack.
- Also we’re sure about how to run it locally
- more-code way:
- TypeScript support,
- easy testing
- more-code: more time to develop
- queueing is complicated. We need an execute ‘exactly once’ solution. (something what AWS SQS does well, as I read)
What are your thoughts? If you have ideas for anything else, I’m all ears!
(Thanks in advance!)
Best answer by seijimanoanView original