D
D
Danil Kislov2021-05-27 18:35:57
Backend
Danil Kislov, 2021-05-27 18:35:57

What is the best way to implement the backend order counter architecture?

There is a database with a list of orders, you need to check it every (conditionally) minute and update customer accounts (reduce the amount of funds in the account depending on the type of orders and all sorts of such trifles). This system should work in parallel with the Django server and a couple of other daemons. What is the best way to implement such a program? What architecture and approach to use? Now I have a separate service running a script that while True checks the database, does all the updates and is idle for a minute time.sleep(60). How to do it right?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan Shumov, 2021-05-27
@inoise

Why do this on a schedule if you can make an event system using a message broker. You can take RabbitMQ to start. And if you have self-confidence, then Kafka is better so that you can go back in time

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question