Build the Google Stock Wizard.
MediumImagine you're building a "Stock Wizard" application for Google Finance. This wizard allows users to create complex, multi-step stock analysis workflows. The user can define a series of operations to perform on a stock, in a specific order. Each operation takes the stock data as input and produces an output (which could be another stock data point or a boolean signal for trading). A workflow can include operations like calculating moving averages, relative strength index (RSI), applying filters based on price or volume, and even executing trades (simulated, of course!).
The core challenge here is designing a flexible and extensible system that can accommodate a growing number of operations and complex workflows, while also ensuring thread safety and efficient execution. We need to think about how to represent stocks, operations, workflows, and the execution engine that ties it all together. The design should be adaptable to new analysis techniques and integration with different data sources.
Requirements
Think like an Architect
Before revealing the requirements, imagine you're in the interview right now."How would you clarify the scope with your interviewer?"