wisicoc
wisicoc

Reputation: 123

Fintech approaches to balance count optimisation

There s a problem in fintech project. We count balance by summarising orders and this approach is too slow. We have an idea:

  1. to use structure like hash map of stacks to store users balance. As key we use user_id in our system and stack is filled with transactions and their affection on balance
  2. Each transaction we count new users balance and add it in hash map we declared at 1st step

However there’s some problems. If we store data like this in SQL DB we have query like where user_id = ?1 and take last index which is not effective. Of course we can store our log table in NoSQL DB but it seems to be bad practice in fintech projects. Please give us some ideas or alternative approaches

Upvotes: 1

Views: 35

Answers (0)

Related Questions