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

Firstly, disclosure: I work on XTDB, where we are in the process of building out a new columnar SQL engine that also (still) supports edn-flavoured Datalog, see https://xtdb.com/v2

Perhaps the most fundamental aspect here is the inherent tension between (A) typical columnar relational schemas which primarily target efficient OLAP across very wide & sparse tables, and (B) the nature of 'graph' systems (whether OLAP or OLTP) which tend towards handling a huge number of tables and/or recursive self-joins + incremental view maintenance. I believe Michael Stonebraker's conjecture continues to be that a "one size fits all" database engine is essentially unachievable, and therefore you can't expect a single database system to be competitive across both domains simultaneously. However some databases (SQL Server springs to mind) are apparently pretty good at running multiple engines in parallel.

With the v2 XTDB engine design we are sacrificing some of our graph capabilities in the short term (WCOJ and self-join optimisations) for what we feel are more pressing advantages of the columnar model (low-cost retention of history and vectorized processing). We are also aiming to retain reasonable OLTP performance as well, in a similar vein to SingleStore etc., since the target audience is still application developers rather than data analysts.

If you are looking for a way of using Datalog on existing columnar storage engines today, you should definitely look at https://logica.dev/

Also, this Stonebraker talk on "Big Data is (at least) Four Different Problems" is pretty good: https://www.youtube.com/watch?v=KRcecxdGxvQ

EDIT: regarding "I attempted to import a file of several hundred megabytes and execute queries on triple store Datalog systems" - if you have that benchmark available somewhere I would love to take a look. You can see some information on XTDB's approach to triple store benchmarking with 'WatDiv' here: https://docs.xtdb.com/resources/performance/#watdiv

comment 3y ago · link · parent

Thanks :) The surprises don't stop though - it's abstract turtles all the way down...meaning plenty of fat to trim between UPDATE and what's happening in the MOSFETs. Might be of interest: https://arxiv.org/pdf/2307.11866.pdf

comment 3y ago · link · parent

CRDT synthesis feels like a promising direction, e.g. see "Katara: Synthesizing CRDTs with Verified Lifting"/ https://arxiv.org/abs/2205.12425 / previous discussion https://news.ycombinator.com/item?id=32977887

comment 3y ago · link · parent

In a similar vein, this was news to me recently:

> here’s a chart comparing the throughputs of typical memory, I/O and networking technologies used in servers in 2020 against those technologies in 2023

> Everything got faster, but the relative ratios also completely flipped

> memory located remotely across a network link can now be accessed with no penalty in throughput

The graphs demonstrate it very clearly: https://blog.enfabrica.net/the-next-step-in-high-performance...

comment 3y ago · link · parent

Thanks for sharing that - TIL! These blog posts elaborate with more detail:

https://www.cockroachlabs.com/blog/vectorized-hash-joiner/

https://www.cockroachlabs.com/blog/vectorizing-the-merge-joi...

...it seems the distinction here is that the vectorization is only present in the execution layer and not the storage layer also. I would guess that from a storage perspective, even with column families in play, everything is being streamed out of sorted a LSM engine regardless. So there isn't additionally some highly-tuned buffer pool serving up batches of compressed column files etc.

comment 3y ago · link · parent

It's perhaps also worth a mention that embracing the internal characteristics of SSD throughout the software stack looks like the inevitable direction we're headed (short of another major breakthrough in storage tech) - e.g. see "A Survey on the Integration of NAND Flash Storage in the Design of File Systems and the Host Storage Software Stack" https://arxiv.org/pdf/2307.11866.pdf

comment 3y ago · link · parent

Direct block storage is good, but note that SSDs are essentially just doing CoW internally too.

comment 3y ago · link · parent

Except updating in place is almost never what is actually happens outside of RAM - there are usually various layers of Copy on Write happening anyway. So unless your database (or the high-churn subset) cleanly fits in RAM I would generally expect that the significance of any time saved is debatable. Denying yourself the possibility of adding transactions later down the line is a huge risk in most situations.

comment 3y ago · link · parent

> Update is the same as Delete+Create

I gave a talk titled "UPDATE Considered Harmful" featuring exactly this idea a few months back. The etymology still makes no sense to me...they should have named it REPLACE instead of UPDATE: https://www.youtube.com/watch?v=JxMz-tyicgo

comment 3y ago · link · parent

Just noting that the documentation found at your first link is much easier to skim by clicking on the parent section - i.e. https://www.swi-prolog.org/pldoc/doc_for?object=section(%27p...

comment 3y ago · link · parent

Indeed, Postgres may be wildly popular these days thanks to being $free, but it's far from being the most intelligent relational database engine on offer.

comment 3y ago · link · parent

From the extension readme:

> Currently, Temporal Tables Extension supports the system-period temporal tables only.

For anyone looking for full application-period support and bitemporal tables on Postgres, I think the only actively maintained library/extension available is https://github.com/hettie-d/pg_bitemporal (it's also not SQL:2011 compliant though).

comment 3y ago · link · parent

The latest JUXT Cast episode on bitemporality, XP, the state of Agile, and developer safety. Available across various podcast platforms: https://pnc.st/s/juxt-cast/736d5a29/juxt-cast-special-with-k...

344.

JUXT Cast Special with Kent Beck(juxt.pro ↗)

1 points · by refset · 3y ago · 1 comment

comment 3y ago · link · parent

If you're looking for something novel that combines crypto and ~Clojure, look no further: https://convex.world/

comment 3y ago · link · parent

Not disagreeing, and it's only one aspect of Phoenix, but it might be of interest to someone reading that this LiveView-like Clojure library exists: https://github.com/tatut/ripley

Also this is a neat list of LiveView-like technologies across various languages: https://github.com/liveviews/liveviews

comment 3y ago · link · parent

GitHub link: https://github.com/redplanetlabs/twitter-scale-mastodon

Their announcement email reads...

> We've open-sourced our Twitter-scale Mastodon implementation on our Github. The implementation is 10k lines of code, which is 100x less code than Twitter wrote to build and scale their original consumer product, which was extremely similar. This repository can easily be adapted to make any Twitter-like social network.

> The project README includes instructions for running an instance locally on your machine, which is easy to do. To help with understanding the codebase, we've left many comments throughout the code.

> Finally, our blog post from two weeks ago is a deep-dive exploration of how this codebase works

https://blog.redplanetlabs.com/2023/08/15/how-we-reduced-the...

Previous discussion: https://news.ycombinator.com/item?id=37137110

There's also this "Introducing Rama" video: https://www.youtube.com/watch?v=jcvxGvzjLHg

348.

Rama 10k LOC Twitter-scale Mastodon implementation(twitter.com ↗)

6 points · by refset · 3y ago · 1 comment

comment 3y ago · link · parent

The presence and use of column families is only half of the puzzle - it doesn't strictly imply that the execution engine is capable of working in a vectorized columnar style (which is necessary for competitive OLAP).

comment 3y ago · link · parent

This feels like a promising angle for pursuing alternatives: https://substrait.io/ - "Cross-Language Serialization for Relational Algebra"

351.

Bitemporality and the Art of Maintaining Accurate Databases [video](juxt.pro ↗)

1 points · by refset · 3y ago · discuss

comment 3y ago · link · parent

When John's co-founder Chuck Geschke died a couple of years ago there was a similar thread posted here [0] and someone in the comments mentioned this 2011 CMU lecture by Chuck, "The Adobe Story", which was a pretty great overview of their work and mission: https://youtu.be/apHqb0V3VAM

> It's incredibly insightful, full of personal stories from his time at Xerox PARC, under the leadership of Robert Taylor, working with Butler Lampson and so much more about the founding of Adobe and Silicon Valley in general.

[0] https://news.ycombinator.com/item?id=26849131

comment 3y ago · link · parent

I'm not convinced about that comparison. MongoDB entirely disregarded the relational model whereas bitemporality—as envisioned by Snodgrass et al. and standardised in SQL:2011—is merely an extension/evolution of it.

> it would be cool if e.g. Postgres had fast native support for bitemporal fields in a way that makes them accessible without changing the whole paradigm

100% agreed with you there. And there has been various work on patches & extensions in this area previously. Unfortunately I'm not sure Postgres' internals will ever be able to flex hard enough to deliver a decent "default choice" experience. At least not until some other system has proven the UX is really worth the effort (which I guess MongoDB did similarly achieve with native JSON handling).

comment 3y ago · link · parent

I mostly agree, but it's the same as the argument for immutability in systems more generally: if you can afford the RAM / GC / storage costs then great. Eventually though costs will decrease and new systems will routinely capitalize on the productivity benefits in spite of reduced peak efficiency. HTAP database systems illustrate this trend.

But it's not clear to me that existing, popular database engines will ever be able to evolve to make bitemporality an efficient or easy default choice. And in the meantime countless person-years of effort are wasted rediscovering and solving the same time-related problems over and over.

A world where bitemporality was (somehow) a realistic default choice would be a simpler world, I reckon.

comment 3y ago · link · parent

Makes sense, payroll are usually the last people to find out when somebody's salary has changed :) Which databases have you used for it? Any tips?

comment 3y ago · link · parent

Except making n-dimensional indexes both fast and scalable is hard. Often its safest to build your way up, one index at a time, until you fully understand the workload requirements.

comment 3y ago · link · parent

Probably this post: https://vvvvalvalval.github.io/posts/2017-07-08-Datomic-this...

> If you're new to Datomic, you probably have the same misconceptions as I did regarding the use of Datomic's historical features.

> bad news: you've probably over-estimated the usefulness of these features for implementing your own specific time travel. Unless you really know what you're doing, I recommend you don't use db.asOf(), db.history(), and :db/txInstant in your business logic code.

> good news: you've probably under-estimated the usefulness of these features for managing your entire system as a programmer.

>I believe the key to getting past this confusion is the distinction between event time (when things happened) and recording time (when your system learns they happened).

comment 3y ago · link · parent

People here may also be interested to see this analysis of the state of SQL:2011 "temporal table" feature adoption: https://illuminatedcomputing.com/posts/2019/08/sql2011-surve...

I don't think much has really changed since, and I'm not sure Postgres is any closer to addressing this natively (although there have been extensions, e.g. https://github.com/scalegenius/pg_bitemporal).

comment 3y ago · link · parent

[Re-posting my comment from yesterday https://news.ycombinator.com/item?id=37000572]

> Part of the reason it hasn’t taken off is because of the additional complexity it imposes on programmers.

My take is that it's specifically the additional complexity it imposes on _database_ programmers - the impacts across storage design, foreign keys and schema evolution when all data is bitemporal are profound. SQL:2011 introduced "temporal tables" but the design was arguably incomplete and implementing it ubiquitously requires a real re-think of database internals, so we're now over a decade on and these capabilities are still far from commonplace.

> However, I think part of the reason it hasn’t become more popular, given the benefits it brings, is just the name.

No disagreement from me there!

Disclosure: I work on xtdb.com, building a new database engine where bitemporality is the default. I also spoke with Kent about this last week and am running a webinar about bitemporality more generally on Thursday: https://attendee.gotowebinar.com/register/296060701290006793...

comment 3y ago · link · parent

> Part of the reason it hasn’t taken off is because of the additional complexity it imposes on programmers.

My take is that it's specifically the additional complexity it imposes on _database_ programmers - the impacts across storage design, foreign keys and schema evolution when all data is bitemporal are profound. SQL:2011 introduced "temporal tables" but the design was arguably incomplete and implementing it ubiquitously requires a real re-think of database internals, so we're now over a decade on and these capabilities are still far from commonplace.

> However, I think part of the reason it hasn’t become more popular, given the benefits it brings, is just the name.

No disagreement from me there!

Disclosure: I work on xtdb.com, building a new database engine where bitemporality is the default. I also spoke with Kent about this last week :)

1
111213
18