Hacker News new | past | comments | ask | show | jobs | submit login
Reactive Relational Algebra (taylor.town)
172 points by surprisetalk 53 days ago | hide | past | favorite | 33 comments



Check out the paper "Dedalus: Datalog in Time and Space". It formalizes a Datalog to include time, specifically to handle async behavior. It explores exactly what you seem to be doing here.


Peter Alvaro gave a great presentation on Dedalus at Strange Loop 2015.

https://www.youtube.com/watch?v=R2Aa4PivG0g


If you enjoy FRP-related stuff, Missionary[0] (in Clojure) is doing some really great work.

Most people discover it through Electric Clojure.[1]

The Missionary author has some really good talks he's done up on YouTube about it.

[0] https://github.com/leonoel/missionary

[1] https://github.com/hyperfiddle/electric


And someone built a spreadsheet with Electric Clojure

https://github.com/lumberdev/tesserae


Also in Clojure, and reactive, and relational: https://github.com/wotbrew/relic

> Functional relational programming for Clojure(Script).


Last I tried to look on Github I couldn't actually find any projects that use Missionary. Compared it to something like Javelin - it's all very baroque. That said, it does seems to solve a much larger problem space particularly when it comes to error state handling (and propagation)

I think this space also overlaps with rules engines and it's all still in flux - in an exciting way :))


What are the YouTube talks? Did you have a specific one in mind?



LOVE this. If anyone knows similar blogs that run through engineering decisions in real time, please share! Way more useful than a polished long post built for SEO and hackernews domination.

Substantively, I don’t have much to say other than building math into the core of innovative programs should be a more common practice than it is. Not necessarily as a part of the code, but rather the design, documentation, and sometimes even the user copy. Math has stood the test of time (200y +/- 10,000y) for good reason!


Have you read up on differential data flow? Might be what you want?


Probably not. Data flow is declartive in data transformations and "differential" refers to be incremental. But what the link tries to model seems to relate to asynchronous transformations. Not on the same level.


The blog has random dots as a background. Now I see them on every screen.


    document.body.insertAdjacentHTML('afterbegin', '<style>body::before {background-image: none;}</style>');


turns out those are an svg supplied in the css as a data: url full of stuff like <circle xmlns="http://www.w3.org/2000/svg" cx="0.12034208719122994" cy="5.6339410595659976" r="0.0067620488345083545"/>


Same thing happened to me! Did you manage to fix it?


reader mode is your friend.


This is RBAR by any other name.


Why are the resulting views in the future by exactly 1 time step?


The events happen 1 in the future. It doesn’t matter if it’s 50ms or 500ms, what matters are the events and the state changes. These /are/ time. So, one event leading to a state change is time passing by 1. They’re known as Lamport Timestamps [0] and are leveraged in Vector Clocks [1]

[0] https://en.m.wikipedia.org/wiki/Lamport_timestamp

[1] https://en.m.wikipedia.org/wiki/Vector_clock


Like big O notation probably? So some constant time that does not depend on the size of the tables.


There's exactly one async operation between them.


What kind of jackass modifies the mouse cursor when you visit his website?


His homepage is 10,000 times worse:

https://taylor.town/


HTTP requests, SQL queries is not async, for that matter not even sync.


The author seems to miss that relational algebra was developed for the needs of the databases of the time, i.e. in an effort to optimize reads off spinning iron. Any effort for async is destroyed by blocking fs syscalls.


Relational algebra has nothing to do with spinning disks or even for the needs of the databases of the time.

Check out E.F. Codd's paper in CACM from June 1970. https://www.seas.upenn.edu/~zives/03f/cis550/codd.pdf

It starts with "Future users of large data banks must be protected from having to know how the data is organized in the machine (the internal representation)".

It goes on to say, "(The relational model) provides a means of describing data with its natural structure only - that is, without superimposing any additional structure for machine representation purposes".


For some more backstory[1] see Sowa, who was also an IBM researcher at the time:

  George Boole (1847, 1854) applied his algebra to propositions, sets, and monadic predicates. The expression p×q, for example, could represent the conjunction of two propositions, the intersection of two sets, or the conjunction of two monadic predicates. With his algebra of dyadic relations, Peirce (1870) made the first major breakthrough in extending symbolic logic to predicates with two arguments (or subjects, as he called them). With that notation, he could represent expressions such as "lovers of women with bright green complexions". That version of the relational algebra was developed further by Ted Codd (1970, 1971), who earned his PhD under Arthur Burks, the editor of volumes 7 and 8 of Peirce’s Collected Papers. At IBM, Codd promoted relational algebra as the foundation for database systems, a version of which was adopted for the query language SQL, which is used in all relational database systems today. Like Peirce’s version, Codd’s relational algebra and the SQL language leave the existential quantifier implicit and require a double negation to express universal quantification.


[1] http://www.jfsowa.com/peirce/ms514.htm


You win!


This doesn't seem consistent with the history of relational algebra. It was introduced at a time when there were numerous competing storage technologies from cartridges, strips, drums, as well as disk drives all of which had different physical characteristics.

In fact disk drives were the least common storage system, they were the fastest but most expensive and had the least storage.


Relational algebra has nothing to do with disks.


Yes, it does.


The Wikipedia entry on relational algebra does not even mention disks. Given this (together with what I recall from Codd's seminal papers on the concept), I am not inclined to believe it has anything to do with disks specifically, just on your say-so. If you have something more to say in support of your position, I will give it all due consideration.


lol, no.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: