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

391.

Emotional Management (2021)(scattered-thoughts.net ↗)

1 points · by refset · 3y ago · discuss

comment 3y ago · link · parent

> I'd really love to see some research into deriving CRDT merge semantics from a formal description of application behaviour.

I'm no expert, but I believe synthesis approaches are a strong step in that direction: https://arxiv.org/abs/2205.12425

comment 3y ago · link · parent

Well, at least we're getting through them eventually :)

comment 3y ago · link · parent

Various aspects of query optimization like join planning and predicate selectivity estimation, e.g. as discussed in https://arxiv.org/abs/2010.00728

comment 3y ago · link · parent

> Winternitz signatures are fascinating because they're secure while still being within the reach of most programmers and--as the article points out--they're quantum safe.

Absolutely agreed, Winternitz is very approachable!

At one point ~10 years ago I was particular enamoured by this "Dahmen-Krauß Hash-Chain Signature Scheme" (DKSS) built on top of Winternitz. It is a stateful scheme optimised for signing small messages...appropriate for things like lightweight sensor networks (e.g. 8-bit sensor readings), but I was imagining possibly also for quantum-proof p2p systems based on replicating event logs :)

https://web.archive.org/web/20110401080052/https://www.cdc.i...

...and from there I learned about "hash chain traversal" algorithms which are slightly trickier to reason about, but still within reach of a casual programmer.

At the time this really felt orders of magnitude less intimidating than any other options for adding post-quantum signatures to my JavaScript app :P

comment 4y ago · link · parent

Thank you! I guess the trick with this suggestion is to move the vertical line to directly beneath the text such that it doesn't need to be taller...which is probably a good enough workaround, even if not exactly what I was hoping for :)

comment 4y ago · link · parent

Very neat! Any ideas how to add correct vertical line heights with multi-line / variable-height items? e.g. the vertical line next to "Jupiter" here is too short https://gist.github.com/refset/c6f3ac05cacc12d547b4bc96bbeac...

comment 4y ago · link · parent

> I think some illustrations to accompany your ideas might go a long way as well

I'm not the OP, but I built this visual tool recently which might be of interest https://bitemporal-visualizer.github.io/

comment 4y ago · link · parent

One of these Postgres-based implementations of SQL:2011's temporal versioning might get you close enough:

- https://github.com/nearform/temporal_tables

- https://github.com/xocolatl/periods

- https://github.com/scalegenius/pg_bitemporal

- https://github.com/arkhipov/temporal_tables

I haven't used any of them but I work on https://xtdb.com which is also implementing SQL:2011's temporal features :)

comment 4y ago · link · parent

Maybe it's because Clojure has typically attracted a demographic who are more shy about self-promoting and marketing their new ideas and tools. Photon is an exciting (and relevant) example defying that trend though: https://www.hytradboi.com/2022/uis-are-streaming-dags

Also relevant as a Phoenix-like alternative for Clojure: https://github.com/tatut/ripley

comment 4y ago · link · parent

Agreed! For example in DataScript's Datalog: https://github.com/tonsky/datascript/blob/4f1af628d5650e0ca0...

comment 4y ago · link · parent

CORFU and Tango are interesting research implementations in this general area, with emphasis on a dedicated "sequencer" - see https://rebeccabilbro.github.io/the-shared-log-abstraction/

Facebook's LogDevice had a similar sequencer component too https://engineering.fb.com/2017/08/31/core-data/logdevice-a-...

comment 4y ago · link · parent

He described this distancing from the methodology, and consequently what he considered the salient message, in a preface for a later printing of the book [0]:

> Today, almost ten years after I wrote this book, one idea stands out clearly for me as the most important in the book: the idea of the diagrams. [...] I reject the whole idea of design methods as a subject of study, since I think it is absurd to separate the study of designing from the practice of design. [...] No one will become a better designer by blindly following this method, or indeed by following any method blindly. [...] In the process of trying to create such diagrams or patterns for yourself, you will reach the central idea which this book is all about.

I think this explains why Inkscape is my favourite piece of software :)

[0] https://monoskop.org/images/f/ff/Alexander_Christopher_Notes...

comment 4y ago · link · parent

Also reminiscent of Stephen Wolfram's recent thinking about the "Ruliad"[0], which I initially heard him discussing during the keynote at the recent re:Clojure conference: https://www.youtube.com/watch?v=FzbWAiu50MU&t=3200s

[0] https://writings.stephenwolfram.com/2021/11/the-concept-of-t...

comment 4y ago · link · parent

RDFox [0] is a commercial system with "Parallel Datalog Materialisation" [1]

[0] https://www.oxfordsemantic.tech/product [1] http://www.cs.ox.ac.uk/dan.olteanu/papers/mnpho-aaai14.pdf

comment 5y ago · link · parent

> Automatic versioning of data

More specifically, I would argue for the ability to run arbitrarily complex, non-locking, fully-consistent queries against all historic versions of the database, a.k.a. "the database as a value" (also "transaction time" or "system time" temporal queries)

407.

Clojure Radar 2021(juxt.pro ↗)

5 points · by refset · 5y ago · discuss

comment 5y ago · link · parent

> bitemporal indexes [...] Can't you find an open source library that implements this?

Undoubtedly too late for you, but https://github.com/juxt/crux/blob/master/crux-core/src/crux/... :)

comment 5y ago · link · parent

I somehow messed up the copy+paste and lost the last character, sorry :(

Thank you for your persistence though and for chiming in with the right answer!

comment 5y ago · link · parent

Pat also wrote a pretty great follow-up article that expands on the "Data on the Outside vs. Data on the Inside" section, covering the intersection of immutability, temporality, schema and relational querying: https://queue.acm.org/detail.cfm?id=341501

comment 5y ago · link · parent

Not exactly plug and play, but for BigQuery there's now Logica https://opensource.googleblog.com/2021/04/logica-organizing-...

comment 5y ago · link · parent

No need to apologise at all, and thank you for your thoughtful reply!

>To get the full value out of it, your app code should be aware of transactions, participate in database mechanisms (versionstamps), correctly handle asynchronous streaming of large amounts of data with backpressure

This is an excellent point, and broadly aligns with Crux's design also, since the transaction semantics provided are relatively raw and therefore much of the interesting parts of the "database" logic live firmly in the application code.

It sounds like you have a really interesting system and I would love to hear more about it one day :)

comment 5y ago · link · parent

Hi, I work on the Crux team. I think "fully distributed" has a few possible meanings, but is it essentially a case of wanting something with a dead-simple clustering story? Or is it more about multi-region distribution & availability?

Whilst Kafka itself is almost certainly not as simple to operate as FDB (although I can't speak from experience), it does in turn provide Crux with dead-simple clustering, because each Crux node acts as an isolated replica. FDB could be used equally instead of Kafka, but the maximum write throughput would then be somewhat lower. The only key part of the story Crux doesn't currently supply out-of-the-box is a load-balancing layer atop a cluster of nodes.

I expect the real drawback of Crux's current design, by comparison, is that each node is an ~expensive full replica, whereas your system (built on FDB) will benefit from fully sharded indexes running across a cluster of (smaller) machines. The main trade-off then is the low-latency query performance of a fully local KV store.

comment 5y ago · link · parent

> even that might not be true

It's not. For example, see SAP HANA's "Timeline Index" https://websci.informatik.uni-freiburg.de/publications/sigmo...

comment 5y ago · link · parent

Disclosing benchmark results is forbidden by the licensing, which isn't uncommon for proprietary DBs, e.g. https://stackoverflow.com/questions/12115397/is-it-against-l...

Incidentally, I was writing up some notes earlier today about the nightly benchmarks we run for Crux (another Clojure-flavoured Datalog DB), which may be of interest: https://opencrux.com/articles/benchmarks.html

comment 5y ago · link · parent

I work on Crux so can share a few details about our implementation of Datalog. The query is compiled into a kind of Worst-Case Optimal Join algorithm [0] which means that certain types of queries (e.g. cyclic graph-analytical queries, like counting triangles) are generally more efficient than what is possible with a non-WCOJ query execution strategy. However, the potency of this approach relies on the query planner calculating a good ordering of variables for the join order, and this is a hard problem in itself.

Crux is usually quite competent at selecting a sensible variable ordering but when it makes a bad choice your query will take an unnecessary performance hit. The workaround for these situations is to break your query into smaller queries (since we don't wish to support any kind of hinting). Over the longer term we will be continuing to build more intelligent heuristics that make use of advanced population statistics. For instance we are about to merge a PR that uses HyperLogLog to inform attribute selectivity: https://github.com/juxt/crux/pull/1472

EDIT: it's also worth pointing out that the workaround of splitting queries apart is only plausible because of the "database as a value" semantics that make it possible to query repeatedly against a fixed transaction-time snapshot. This is useful for composition more generally and makes it much simpler to write compile-to-Datalog query translation layers on top, such as for SQL: https://opencrux.com/blog/crux-sql.html

[0] https://cs.stanford.edu/people/chrismre/papers/paper49.Ngo.p...

comment 5y ago · link · parent

Crux timestamps sit outside of the data model and apply universally across the whole database (the data model is documents not tables), so you don't have to consciously think about managing bitemporality at all by default, but whenever you might need it, it's there. This means you don't have to adapt your queries to account for extra fields/columns, instead you just specify the timestamps of interest as simple parameters to the query datasource.

Also, Crux maintains a point-in-time (a.k.a timeslice) temporal index which is really a Z-Order Curve[0] that stores the two dimensions for fast lookups in a local KV store like RocksDB or LMDB. By contrast, a userland RDBMS implementation of bitemporality will be significantly slower to execute similar point-in-time "as-of" queries.

[0] https://en.m.wikipedia.org/wiki/Z-order_curve

(I work on Crux)

comment 5y ago · link · parent

More specifically, retroactive data structures[0] are an interesting lens for thinking about bitemporality. After watching some great Erik Demaine lectures on temporal data structures I wrote a bit about the relationship to bitemporality on the Crux site[1]. (Crux being a bitemporal database with graph-friendly Datalog queries)

> In summary, the Crux indexes as a whole could be described as a "partially persistent and fully retroactive data structure".

[0] https://en.wikipedia.org/wiki/Retroactive_data_structure

[1] https://opencrux.com/articles/bitemporality.html#_retroactiv...

comment 6y ago · link · parent

"less power" definitely depends on what you value when comparing Git against real databases, e.g. https://stackoverflow.com/questions/984707/what-are-the-file...

There is at least one database that exists which does support a Git-like DAG for transaction-time temporality: https://terminusdb.com/

It should also be pointed out that "temporal databases" usually offer a lot more besides a linear transaction-time history. Although I've not seen anything that offers a DAG for valid-time histories yet :)

comment 6y ago · link · parent

This is pretty interesting stuff, thanks for sharing! Does temporal information get any special treatment in the economic graph at the moment? Are temporal queries of any interest?

I ask because I work on Crux [0] which at its core is a point-in-time bitemporal Datalog engine, and I see a lot of similarities (schemaless core, Worst-Case Optimal Join etc.)

[0] https://opencrux.com

1
131415
18