I’m developing a CS:GO backend website that involves multiple bots handling trades with users. How can I efficiently manage and store the active trades for each bot-user pair to enable fast retrieval and processing? For example when a user initiate a trade then my back-end should select a bot that will process this user trade. Each bot is limited for 30 active trades per total and 5 active trade per user. How do I sotre correctly this data? If using a database for example, it will overload it.
Now I made a Map and I am storing this data in memory, but if app crashes data will be lost. I can make a method that will populate this data at the start of program just getting all offers from steam.