Live data from Hacker News

Orthogonal Persistence

github.com

21–30 of 38 posts

Re: Orthogonal Persistence

#21

> Transactions are not modular because every function needs to know whether it’s already in a transaction or not, to be conscious of what global entry point in a completely different module owns the transaction. I fail to understand the section about why transactions are unmodular. I've never encountered transaction code where the initiator of the transaction would affect the computation; could anyone elucidate this?

This is probably about the nesting of transactions.

If you start a transaction when the calling code already started a transaction, then either you get an error because nested transactions are forbidden, or a reference counter is incremented for the transaction, so that when you close your inner transaction, no commit is done at that point, and instead the commit is only done when outermost transaction closes.

This latter case means that you don’t know when your inner transaction really commits, and also if you perform multiple inner transactions and the later one fails, the earlier one will implicitly also be rolled back, because they are all really just one shared outer transaction.

Of course, you could use separate database connections with independent transactions, but then you get into deadlocks or other problems when you really work on the same data.

So you can’t have modules that build on each other, while each being able to use transactions independently from each other. Transactions don’t compose in that way.

You would basically have to “color” every function based on wether it may perform a transaction or not, and within a transaction block you would only be allowed to call functions that don’t themselves perform a transaction. It becomes more complicated when you have transactions that are not lexically scoped, but for example live in an object.

Re: Orthogonal Persistence

#23
post #4

Earlier quoted context omitted.

Reminds me of the discussions on hn when Intel Optane wasn't quite dead yet. Those always seemed to end with the conclusion that if separation between volatile and persistent memory had not been forced on us by technological reality, it would be a concept we'd better have invented at some point.

I am not sure about this? Volatile memory is at this time merely an outgrowth of the uptime of the system. Back when people routinely turned their machines "off and on again", it became part of that convention. But now uptime can be measured in years, and even personal laptops can enter and exit suspended state for weeks on end without clearing volatile memory. What we have developed in software systems to accommodat…

Back in the days when minicomputers (which required a walk to the air-conditioned machine room to reboot) and microcomputers (which had a case or keyboard switch) coexisted, the former were way less flaky than the latter.

Re: Orthogonal Persistence

#24
post #17

> Persistence is Orthogonal to the Data Model, ... I have some experience with a custom data runtime where the persistence is orthogonal to the data model, with silhouettes reminiscent of the described solutions in many of the features of my system, including multiple orthogonal/model-agnostic persistence backends, automatic data synchronisation, persistable executions, automatable schema changes, automatic reactivit…

Or, to put it another like, like visual programming, like "programming languages should be able to wear syntaxes like themes", like "there ought to be some sort of nocode type solution with all the power of conventional programming but easy enough for anyone to pick up", there are reasons why this is not how all programming works already. Good ones and big ones. And none of those reasons are that nobody has had the i…

Offtopic perhaps, but I am interested in reading an explanation of the good, big reasons why not "programming languages should be able to wear syntaxes like themes". Racket seems quite an interesting counterpoint, and I've never heard it argued as fundamentally flawed.

Re: Orthogonal Persistence

#25
> Atomic sections must be short: long atomic sections will break liveness, i.e. may cause the system to become unresponsive.

> ...

> Based on disk latency, we may target say a millisecond as duration before which to commit the current transaction. When the timer is reached, the transaction is delayed until all current atomic sections are completed; and (possibly after a grace period) new atomic sections are blocked from even being started, until after the transaction is committed.

Maybe I'm reading this wrong, but the limitations on transaction duration seem to be disqualifying for real usage? If it's not possible to run an atomic transaction for longer than a few milliseconds without bringing the system down?

Re: Orthogonal Persistence

#26

That phrase certainly brings back memories, from when I worked at an object-oriented database startup. The object-orientation was actually pretty unimportant, (except for those products that brought in persistence via inheritance -- so not really orthogonal). No, the point was adding a new storage class to programming languages. I worked at Object Design, and we had (IMHO) an incredibly elegant approach. In our appro…

That sounds fascinating! Does anything like this exist now in the open source world?

Re: Orthogonal Persistence

#27

That phrase certainly brings back memories, from when I worked at an object-oriented database startup. The object-orientation was actually pretty unimportant, (except for those products that brought in persistence via inheritance -- so not really orthogonal). No, the point was adding a new storage class to programming languages. I worked at Object Design, and we had (IMHO) an incredibly elegant approach. In our appro…

That sounds fascinating! Does anything like this exist now in the open source world?

Not that I know of.

Re: Orthogonal Persistence

#28

That phrase certainly brings back memories, from when I worked at an object-oriented database startup. The object-orientation was actually pretty unimportant, (except for those products that brought in persistence via inheritance -- so not really orthogonal). No, the point was adding a new storage class to programming languages. I worked at Object Design, and we had (IMHO) an incredibly elegant approach. In our appro…

How would you compare it to Gemstone/S? I spent a large chunk of the 90s working on a maintenance management system witha GS back end.

Re: Orthogonal Persistence

#29
post #15

This was very fashionable 15-20 years ago, in both application and OS research. One such Java framework: https://prevayler.org/ Less ambitious than TFA overall, I grant you.

I'm not sure if counts as "orthogonal persistence", but there's the Aurora Operating System[0] from 2021. It's apparently based on FreeBSD, and can run most unmodified apps, as well as having an API to support its Store.

"We present the Aurora single level store (SLS), an OS that simplifies persistence by automatically per- sisting all traditionally ephemeral application state. With recent storage hardware like NVMe SSDs and NVDIMMs, Aurora is able to continuously checkpoint entire applications with millisecond granularity. Aurora is the first full POSIX single level store to han- dle complex applications ranging from databases to web browsers"

[0] https://rcs.uwaterloo.ca/pubs/hotos21-aurora.pdf

Post reply on HN