Better HN
topnewbestaskshowjobs
Log inSign up

refset

1,514 karma · joined Aug 24, 2015 (11y ago) · 537 submissions

https://github.com/refset

[ my public key: https://keybase.io/refset; my proof: https://keybase.io/refset/sigs/pyTK0thu8g5O4Zs7EA3HrQYKkYZjeEz_TUr8nZV2hlY ] c0ba44896414421c9009bc8a77a86ceb

meet.hn/city/51.0612766,-1.3131692/Winchester

Socials: - github.com/refset

---

Submissions

comment 3y ago · link · parent

Hi, I am running a webinar on the concept of bitemporal data management next week, as in https://en.wikipedia.org/wiki/Bitemporal_modeling - please sign up up here if you are at all interested: https://attendee.gotowebinar.com/register/296060701290006793...

I work on https://xtdb.com which is a novel database system that attempts to make bitemporal modeling more trivial (all data is bitemporal automatically!) - but this webinar is more generally about the concept, rather than our own work.

I've spent the last 4 years getting to grips with bitemporality in all its shapes & guises, and am more convinced than ever that this fundamental concept of cleanly separating the-timeline-of-the-system from the-timeline-of-the-data deserves wider attention.

There will be a Q&A discussion at the end of the webinar where it would be great to share stories and tips live, if you have any! And in the meantime I would be very glad to swap thoughts in the comments below. Thanks.

comment 3y ago · link · parent

Likely of interest: https://neilmadden.blog/2022/02/19/is-datalog-a-good-languag... (Feb 2022 discussion: https://news.ycombinator.com/item?id=30400886)

comment 3y ago · link · parent

> Databases often provide a time travel feature where we can query AS OF a certain date.

This is a good overview of SQL:2011 temporal functionality support across the major players: https://illuminatedcomputing.com/posts/2019/08/sql2011-surve...

comment 3y ago · link · parent

Old but relevant discussion about pulling out the MVCC data from Postgres to mimic Datomic: https://news.ycombinator.com/item?id=4448189

365.

Simon Wardley: Crossing the River by Feeling the Stones (2018) [video](youtube.com ↗)

1 points · by refset · 3y ago · discuss

comment 3y ago · link · parent

Great talk! An earlier glimpse of this Decision Matrix process was discussed during the 'Lessons Learned' talk by Alex Miller (2019), specifically "Enumerate Alternatives and Tradeoffs" - https://youtu.be/KeZNRypKVa4?t=2231

comment 3y ago · link · parent

1, 2 and 4 are not to be trusted ;)

comment 3y ago · link · parent

XTDB is a deterministic, single-writer system that leans on existing tech to handle all the hard distributed & durability aspects (e.g. piggy-backing on Kafka for ACID + HA), so Jepsen would have relatively limited applicability but it couldn't hurt to sanity check that!

I generally sympathise with your cynicism though that distributed consistency is much harder to get correct than most people realise. My own attraction to niche databases is the promise of better abstractions - the world desperately need those.

comment 3y ago · link · parent

Datomic's "immutable database + Datalog" was definitely the biggest source of inspiration but XTDB has a lot of differences - I wrote this FAQ entry up a few years back: https://docs.xtdb.com/resources/faq/#comparisons (note this comparison is for XTDB 1.x and Datomic On-Prem only, so needs revisiting!)

Arguably the biggest difference is that XTDB has a schemaless, dynamic core. Having a sane schema is of course important when building complex things, but we believe that the flexibility to experiment with schema (fully) in userspace is essential for moving the state of the art forwards. For instance a lots Clojure users these days prefer relying on https://github.com/metosin/malli for _all_ their schema needs.

comment 3y ago · link · parent

XTDB 2 will compute and maintain incremental indexes on-the-fly based on the raw data, so index updates will present far less operational impact. This also means the transaction log is now ~ephemeral in the new architecture (no more event-sourcing-style replays required, ever).

comment 3y ago · link · parent

True! Life finds a way. I wonder whether real-life athletes etc. benefit from a more realistic dream legs simulation experience.

comment 3y ago · link · parent

Omnigres, "Postgres as a platform", is very much in the same vein: https://github.com/omnigres/omnigres

comment 3y ago · link · parent

I can relate heavily. The recurring ability to hover by kicking my legs around is profoundly liberating and a deeply familiar sensation at this point. Dreams feel like living a parallel life :)

comment 3y ago · link · parent

Interesting read! I would like to add:

* databases need to get better yet at schema management and workload isolation to enable multiple applications to properly integrate through the database (as traditionally envisioned)

* HTAP seems inevitable but needs built-in support for row-level history/versioning to get maximum benefit

* databases should abstract over raw compute infrastructure efficiently enough that you don't need k8s to run your application logic and APIs elsewhere. The database should be a decent all-in-one place to build & ship stuff

comment 3y ago · link · parent

Thanks for sharing the summary. There's also this Strange Loop 2017 talk "Datafun: a functional query language" with an early overview of this research: https://www.youtube.com/watch?v=gC295d3V9gE

comment 3y ago · link · parent

To be clear I'm not experienced enough to judge all these tradeoffs properly either, and I've never worked with Datomic. I suppose my main point is that an ideal database UX would avoid having to write processing/transformation code that needs to run outside the database (Clojure is pretty great, but still). This vision probably runs counter to the 'deconstructed' design of Datomic which heavily emphasises the usage of Clojure around it, but that could possibly be reconciled. It may well even barely register as a significant gap for current users in practice - I have no real idea :)

> provide a set of logical views to isolate the application from the physical structural decisions

To me this feels like the holy grail for what people really want from databases (beyond the basics of transactions/durability), and triples definitely still hold promise as a helpful abstraction. However I suspect Incremental View Maintenance (as Relic discusses) has a potentially even bigger role to play here.

comment 3y ago · link · parent

I'm not the OP, but thinking well beyond the original topic of in-memory reactive programming (where my answer would be quite different) to the world of long-lived durable databases... one perspective to consider is that any system built around N-ary relations can automatically benefit from the full range of relational algebra for transforming and composing both base data and derived relations. The flexibility of N-ary relations is largely what has kept SQL databases relevant despite the flaws of SQL itself.

In contrast, a system that only handles base data in terms of triples assumes that you have a perfect attribute-oriented information model figured out upfront. But given this is rarely the case users will want tools that help them to easily transform/migrate their data and schema over time. Ideally this takes the form of a declarative language that minimises the amount of code that needs to be written. However, without a compelling end-to-end transformation language figured out I think any alternative database systems with their alternative information models (triple-based or otherwise) will struggle to compare favourably with mainstream databases, where declarative data munging with SQL is considered valuable and routine.

Triples may well prove to be the best way to handle information in software over the long-term, but I'm not sure that the systems which currently work with triples are good enough or widespread enough to test that theory.

378.

How to beat social media's network effects(tfos.co ↗)

1 points · by refset · 3y ago · discuss

comment 3y ago · link · parent

> practically it's simply tough to draw the line between assuring that historical data is still handled and rendered correctly and getting rid of overhead and complexity of a growing and evolving application

Agreed, the issue of maintaining accurate data (bitemporal or otherwise) in the context of evolving schema and code feels like a real puzzle to solve with commonplace tools like git and SQL.

comment 3y ago · link · parent

Agreed, my understanding is that Datalog has a distinct (though related) lineage that directly emerged from Prolog (i.e. logic programming, not relational algebra / database theory) - skimming the introduction of "Horn Clauses and the Fixpoint Query Hierarchy (1982)" seems to confirm this: https://dl.acm.org/doi/pdf/10.1145/588111.588137

Edit: this presentation describes things differently but it doesn't sound quite right to me "Chandra and Harel - 1982 Studied the expressive power of logic programs without function symbols on relational databases" https://www.dbai.tuwien.ac.at/datalog2.0/slides/Kolaitis.pdf

comment 3y ago · link · parent

> Datalog implementations can use different (or multiple, switchable) strategies

Including distributed strategies, as seen in Bloom http://boom.cs.berkeley.edu/

comment 3y ago · link · parent

The topic of dealing with history in databases seems to go most of the way back to the beginning of the field. I'm still hoping a copy of "Bubenko (1977) The Temporal Dimension in Information Modelling" turns up on the web eventually as I'd love to read it.

The 1980 paper you linked is touched on briefly at the beginning of this Strange Loop talk on "Light and Adaptive Indexing for Immutable Databases (2022)": https://www.youtube.com/watch?v=Px-7TlceM5A

comment 3y ago · link · parent

Hmm, it seems there's some SVG rendering issue when viewing directly. It should say "LMDB" in that empty spot. It renders okay for me on the GitHub readme: https://github.com/xtdb/xtdb (and here https://docs.xtdb.com/concepts/what-is-xtdb/)

comment 3y ago · link · parent

> Datalog has great compositionality, which is one of SQL's big weaknesses

There's a good write-up on this aspect (amongst others) here: https://www.scattered-thoughts.net/writing/against-sql/

> recursive queries are completely natural in Datalog, whereas in SQL they are bolted on with recursive common table expressions

And similarly: https://github.com/frankmcsherry/blog/blob/master/posts/2022...

comment 3y ago · link · parent

Thanks for the insights and clarifications - I agree with all that completely :)

I mainly responded because "Datomic ∈ Datalog" is worthy of discussion in itself ...but I now realise this is probably the wrong subthread for that.

comment 3y ago · link · parent

Flix definitely looks interesting! For comparison, I ported the "Datalog Enriched with Lattice Semantics" example from that homepage to XTDB's (Clojure) Datalog after I saw it posted on HN originally: https://gist.github.com/refset/21b3fc1dec9a6928943073809e133...

comment 3y ago · link · parent

It's true that this SPARQL-inspired view of Datalog as a triplestore query language is quite a narrow interpretation compared to something closer to the academic Prolog roots like https://souffle-lang.github.io/ - what do you feel are the most important differences?

comment 3y ago · link · parent

XTDB, which is mentioned in the post, is subtly different from the other Clojure-based Datalog systems in this respect, because its Datalog engine executes in terms of multi-way joins using a "Worst-Case Optimal Join" implementation that is ideal for graph processing (vs. a tree of binary hash joins). Therefore, based on statistics and query planning heuristics, it will often perform graph pattern matching before resolving the logic/horn clauses. (source: I work on the XTDB team)

comment 3y ago · link · parent

Just noting that Crux has been rebranded to https://xtdb.com/ (as per https://xtdb.com/blog/crux-to-xtdb-rename/)
1
121314
18