r/mit6824clojure • • Feb 28 '21

Materialized view questions

2 Upvotes

6 comments sorted by

1

u/TheLastSock Feb 28 '21 edited Feb 28 '21

Frank Mcherry suggests that Timely (dataflow is novel in that it relies on the presence of data rather than its absence in order to facilitate loops.

https://youtu.be/yOnPmVf4YWo?t=666

I assume he means that they rely on time (clock or system) in order to know when to admit events. This feather (as of 2015 and likely earlier) is provided by several systems off the to of my head flink, google dataflow, onxy, etc..

more apples to apples, i believe this is possible to do with coreasync or manifold, though not common.

The morning paperon Naiad seems to highlight this feature

https://blog.acolyer.org/2015/06/12/naiad-a-timely-dataflow-system/

structured loops allowing feedback in the dataflow

The paper seems to be more clear (despite it being nearly a decade hold):

Timely dataflow is based on a directed graph with vertices at the nodes and logically timestamped messages flowing along edges. The graph may contain cycles. Input vertices receive sequences of messages from external producers, and output vertices send a sequence of messages out to external consumers. Producers label each message with an integer epoch, and notify the input vertex when they will send no more messages within the given epoch. A producer can also close an input vertex which means that it will send no more messages at all (in any epoch). Output messages are likewise labelled with the epoch, and output vertex signals to a consumer when it will not send any more messages in an epoch.

In short. Down stream producers can notify upstream consumers of things (duh) such as, "I choose to send no more information" or I assume "my creators have told me based on their understanding its unlikely ill get more data, please move on"

I'm curious how we (as a group understand this bit)

1

u/TheLastSock Feb 28 '21

In the summary on the morning paper

https://blog.acolyer.org/2015/06/12/naiad-a-timely-dataflow-system/

The author suggests it supports higher-level incremental LINQ-like operators. It seem LINQU is a form of set theory akin to SQL, and incremental is just as you might expect, again, I'm not sure here what is novel compared to other streaming frameworks in the same class.

1

u/TheLastSock Feb 28 '21 edited Feb 28 '21

This bit from the Naiad paper is confusing. Specifically,

Timely dataflow graphs are directed graphs with the constraint that the vertices are organized into possibly nested loop contexts, with three associated system-provided vertices. Edges entering a loop context must pass through an ingress vertex and edges leaving a loop context must pass through an egress vertex. Additionally, every cycle in the graph must be contained entirely within some loop context, and include at least one feedback vertex that is not nested within any inner loop contexts.

The wording itself is hard to parse, it's a constraint that it might be organized? Edges entering a loop? How does an edge enter a loop. oh, i can imagine what there suggesting, but edges are connections between vertices/nodes, they don't "enter things". They stay where they are, they don't move around. It's like saying the 5 entered equestion to get added to 6.

Regardless,

the next sentence makes the meaning clear:

The structure supports logical timestamps that include the epoch number and a loop iteration counter for each encountered loop

tldr, time ist just like any other piece of data. You can group by a time frame, just like you can group by sections of the alphabet.

1

u/TheLastSock Feb 28 '21

Nikolas (who is part of the Clojure community) seems the clearest on the whole topic. He discusses both the iterative loop aspect of a dataflow model, its constraints and the ideal high-level query language (datalog imo) here

https://youtu.be/ZN7nOwJTSZ0?t=1075

timely as a programming model displayed here:

https://youtu.be/ZN7nOwJTSZ0?t=1631