oopc++11data-drivendata-oriented-design

What's the difference between Data Oriented and Data Driven Programs?


I know a bit about data oriented design, like rather than having a class for a single object, you have a class which contains multiple objects, like instead of:

struct Circle { int x, y; int radius;  };

You would have:

struct Circles { std::vector<int> xpos; std::vector<int> ypos; std::vector radii };

(I hope that this is a correct interpretation of data oriented design) However, is there like a data driven way of doing this or what?


Solution

  • The two are not related. Data-driven programming is about processes that consume and produce streams of info. Think: Unix commands that you link together in pipelines. DDP covers more than single-line pipelines; graph networks of inputs and output; and even output routing conditional on inputs. Within a process, a network of coroutines could be an example of data-driven programming. The wikipedia article covers this well.

    Data-oriented design pays attention to how complex data is stored; for cache effectiveness, or for eliminating lock contention by generating copies. Column- vs row- stores of data are a database application of DoD. As a side effect, DoD seems to cross swords with OOD; where the latter tries to hide object base data. DoD exposes data, so the user can choose to process structured collections in a way that best works with actual storage. The wikipedia article is a kind of thin.