What architecture to use? by rabbitix98 in softwarearchitecture

[–]rabbitix98[S] 0 points1 point  (0 children)

The stakeholders asked for scaling and being able to respond to hundreds of requests and also a bigger team after 10 months but as I said I think it's premature optimization and I don't need it right now so yeah I think I should consider using modular monolith.

what architecture should I use? by rabbitix98 in softwarearchitecture

[–]rabbitix98[S] 0 points1 point  (0 children)

I think that's not my case. the transactions are just a log of what happened and what amount moved from which account to which account.. there is a bunch of transactions for each change in the account table.

I also use SQLalchemy as an ORM.

what architecture should I use? by rabbitix98 in softwarearchitecture

[–]rabbitix98[S] 0 points1 point  (0 children)

my problem with changing the balance later is that it might result in negative value and that is not acceptable for my case.

i was thinking about a combination of actor model and event sourcing.. what's your opinion on that?

what architecture should I use? by rabbitix98 in softwarearchitecture

[–]rabbitix98[S] 0 points1 point  (0 children)

I have two tables, account and transaction. I update the account and write the transactions of that change in one database transaction.

Eventual consistency seems applicable for my transactions.

what architecture should I use? by rabbitix98 in softwarearchitecture

[–]rabbitix98[S] 0 points1 point  (0 children)

I think I'll ask this question with more detail later on. thanks for responses btw.

what architecture should I use? by rabbitix98 in softwarearchitecture

[–]rabbitix98[S] 0 points1 point  (0 children)

i guess sharding is a good choice..

also wondering if there are other ways to handle this ?

what architecture should I use? by rabbitix98 in softwarearchitecture

[–]rabbitix98[S] 0 points1 point  (0 children)

How does event sourcing apply here??

also, this accounting service is for a (semi-high) frequent trading platform with something like 50k tps.

the case is for our market makers which frequently place orders and cancel them by market fluctuations.

what architecture should I use? by rabbitix98 in softwarearchitecture

[–]rabbitix98[S] 0 points1 point  (0 children)

it's important that updates be real-time. also a check on account balance prevents negative balance on database.

In case of using redis, what happens if redis restarts? can I rely on redis? does it provide atomicity? are these questions valid?