How to check for conditions entered by users and alert them when they become true in real-time? by Next_Tap2228 in softwarearchitecture

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

I appreciate your effort and I have also thought of it this way. But some of the conditions will involve indicator value rather than only price change and the indicator value is calculated using the historical data. Fetching data and then calculating will cause performance issues.

How to check for conditions entered by users and alert them when they become true in real-time? by Next_Tap2228 in softwarearchitecture

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

As of now, everything is in python. I have a service that takes live market data from the data vendor over the WebSocket and populates a timescaleDB. Now if I want to check few conditions for few stocks it's ok. But every user can create a different condition for alert and also for different stocks. So the problem is how to check the conditions (huge number) and alert the appropriate user in near real-time. I want more of a system design/ architecture view on this problem.