Question
What is a good storage layer, coding paradigm, and query language for computing over realtime data?
Use-case
For example, stock and options prices are (essentially) realtime data streams. I want to load that data into my storage layer every N ms, compute a set of strategies from the data, and surface strategies that meet some criteria (price, transactions, delta, any attribute, etc.) so that I can manually inspect and validate. The transformation of data into strategies and strategy filtering should happen each time the underlying data changes so that my view doesn't become stale--almost like a dashboard.
I'm looking for generic tools and not something bespoke to financial data. Potentially another use-case would be for evaluating next moves in a board game with discrete actions (not an RTS). For example, imagine you're playing a game of chess and it's your opponent's turn. During your opponent's turn, assume they continuously signal to you the move they're currently considering / calculating over. In this case, the move is stored/written somewhere, once written a process computes the world of possible next moves you could take, calculates a heuristic function for each, filters for highly valued moves, and presents the top X. Each time the opponent's considered move changes (which you can see / receive the data for), the process reacts (reactive paradigm) and updates the candidate move heuristic and selection function (declarative query language).
Thoughts
Naively I think I can have some process that regularly polls for the data, writes to a relational db, and I run a query against the db with SQL. However, although I'm not deeply familiar with all of SQL's capabilities, I don't think SQL results will update in reaction to the next db write--so the results will become stale. Nonetheless, I'm looking for something like SQL because I want to declaratively specify my criteria. I want to be able to say, "select all the aggregations of the data such that X". I don't want to imperatively and explicitly for-loop through all the data. (As an aside, what I'm looking for reminds me of something like a logic programming language in which I only need to describe the output in terms of constraints.)
Re: paradigm, I'm imagining something like reactive programming that will execute the transformation function on the data each time the data changes. Something that abstracts away any polling against the database.
Re: storage layer, I assumed that a relational database would be best because I was imagining a query language like SQL (or some other declarative lang) but perhaps there's another database type that I'm not familiar with.
Recap
To reiterate, what are the right generic tools that compose a system design to retrieve live query results over realtime data?