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 1y ago · link · parent

David Harel, the creator of statecharts, also developed the Behavioral Programming [0] 'b-thread' model motivated by a similar vision for append-only programming - it has been discussed on HN previously e.g. https://news.ycombinator.com/item?id=42060215

[0] https://cacm.acm.org/research/behavioral-programming/

comment 1y ago · link · parent

In XTDB you can now use (trailing-friendly) commas in this scenario too, instead of ANDs: https://github.com/xtdb/xtdb/pull/3985

63.

The Decline and Fall of In-Memory Database Systems (2024)(cedardb.com ↗)

2 points · by refset · 1y ago · discuss

comment 1y ago · link · parent

> It's relatively easy to implement your own temporal tables on most existing databases

It gets tricky when you need to change the schema without breaking historical data or queries. SQL databases could do a lot more to make immutability easier and widespread.

comment 1y ago · link · parent

> a log entry must be appended that says the log is closed

Related concepts: 'epoch' (distributed consensus), 'watermark' (out-of-order stream processing)

comment 1y ago · link · parent

Explicit query plan pinning helps a lot, alongside strong profiling and monitoring tools.

comment 1y ago · link · parent

> just unrolling several unnecessary nested subqueries, and adding a more selective predicate

And state of the art query optimizers can even do all this automatically!

comment 1y ago · link · parent

I wonder where things will stand in 10 years from now. Will many orgs still be consuming vanilla Postgres, or will most workloads have shifted to ~proprietary implementations behind cloud services like "Aurora PostgreSQL Limitless Database" and "Google AlloyDB for PostgreSQL" due to unrivalled price-performance? In other words, can progress in OSS Postgres keep up with cloud economics or will things devolve into an even messier ecosystem centred purely around the wire protocol and SQL dialect?

69.

Principles for a Diverging Desktop Future (2020)(divergent-desktop.org ↗)

2 points · by refset · 1y ago · discuss

comment 1y ago · link · parent

For anyone happy enough to consider dealing with the JVM instead of C, and Clojure instead of SQL, I think this CINQ project can deliver on much of what you're looking for here: https://github.com/wotbrew/cinq

> I just write a SQL query instead with joining with seeing the internal data representation of the software as an information system instead of bespoke code

This sounds very similar to how CINQ's macro-based implementation performs relational optimizations on top of regular looking Clojure code (whilst sticking to using a single language for everything).

comment 1y ago · link · parent

If you would like some exposure therapy: https://databasearchitects.blogspot.com/2024/12/advent-of-co... [0]

[0] Recent discussion https://news.ycombinator.com/item?id=42577736

72.

TodoMVC – Electric v3(electric.hyperfiddle.net ↗)

3 points · by refset · 1y ago · discuss

comment 1y ago · link · parent

More specifically, DBOS Inc. raised a $8.5 million seed round [0] and is backed by Michael Stonebraker (the creator of Postgres). I initially assumed Andy was alluding to this when he wrote "the most famous database octogenarian splashing cash" :)

[0] https://techcrunch.com/2024/03/12/new-startup-from-postgres-...

comment 1y ago · link · parent

Interesting! MVCC mechanics aside, it's also worth remembering that work_mem is only 4MB by default [0], so large intermediate results will likely spill to disk (e.g. external sorts for ORDER BY operations).

[0] https://www.postgresql.org/docs/current/runtime-config-resou...

75.

The missing SQL sub-queries(xtdb.com ↗)

2 points · by refset · 1y ago · discuss

comment 1y ago · link · parent

An EAV table is usually a symptom of a wider set of issues with schema management, and in contrast, most people I've spoken to who have implemented their own EAV tables on top of a regular SQL database have ended up regretting it because the approach is too hard to scale and maintain. In your experience, was the EAV model limited to a subset of the overall schema?

I agree a special database shouldn't be necessary at all, and instead, convenient syntax for immutable DML and temporal support should be built into Postgres already. But short of a miracle it will probably take a new ('special') database in order for Postgres to evolve in response. Therefore, in the meantime, we believe there's a gap in the market for organisations who value the 'safety' (foolproof complexity reduction) that native bitemporality in a database can offer above the raw query performance offered by existing update-in-place databases: https://xtdb.com/blog/but-bitemporality-always-introduces-co...

comment 1y ago · link · parent

Writing Clojure without spaghetti isn't too hard, and definitely more practical than waiting for a Jepsen alternative to come along.

The Jepsen author gave a great talk on all the performance engineering work that has gone into it, Jepsen is near enough an entire DBMS in its own right https://www.youtube.com/watch?v=EUdhyAdYfpA

comment 1y ago · link · parent

I meant 'scale' mostly in the sense of 'complexity' (sorry!). If you only have a small number of tables you need/want this versioning for then the DIY approach is workable, but if you want to apply this across an entire schema then things can get complicated fast.

comment 1y ago · link · parent

How do you find it when you scale it up to every table, every query?

comment 1y ago · link · parent

The upcoming XTDB v2 is a SQL-first engine. We also built an experimental Clojure/Datalog-like 'XTQL' language to go along with it, to provide some continuity for v1 users, but the primary API is now SQL over the Postgres wire protocol, where we implemented a variation on SQL:2011 - see https://docs.xtdb.com/quickstart/sql-overview.html

comment 1y ago · link · parent

Agreed, but it seems likely that people will casually pick this up instead of actual Postgres without fully appreciating the potential for consistency issues. I'd feel happier if AWS marketing applied your description of the value proposition - 'DynamoSQL'.

comment 1y ago · link · parent

> Aurora DSQL isolation level is equivalent to PostgreSQL Repeatable Read.

So it lacks Serializable isolation also, but I guess that's the secret to how it "offers the fastest distributed SQL reads and writes".

83.

Advent of SQL(adventofsql.com ↗)

5 points · by refset · 1y ago · discuss

comment 2y ago · link · parent

It doesn't help that SQL's recursive CTE model is a bit odd - Frank McSherry proposed a much nicer alternative (which Materialize has implemented): https://materialize.com/blog/recursion-in-materialize/

85.

Planning for Momentum (2021)(increment.com ↗)

1 points · by refset · 2y ago · discuss

86.

BoxLang(boxlang.io ↗)

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

comment 2y ago · link · parent

> The Kafka transaction protocol is fundamentally broken and must be revised.

Ouch. Great investigation work and write-up, as ever!

comment 2y ago · link · parent

Interesting, thanks for digging that answer out. HN is a treasure trove!

comment 2y ago · link · parent

Agreed, I would love to see a large scale implementation and experience report. I also wonder about combining the Bthreads model with the notion of 'durable execution', as demonstrated by the folks at DBOS: https://www.dbos.dev/blog/what-is-lightweight-durable-execut...

comment 2y ago · link · parent

Context from the previous post in the series:

> Behavioral Programming is a relatively new programming paradigm that excels at isolating and composing behaviors in event driven system.

> Behavioral programming was invented by David Harel[0], who also invented statecharts in 1987. It uses independent units of behavior, called bthreads, which are coordinated in a pub-sub protocol.

[0] https://cacm.acm.org/research/behavioral-programming/ (2012)

12345
18