Legacy – Hyperfiddle FAQ 2018 Q2

FAQ, anti-features, etc

Local state in UI

Hyperfiddle is about data sync and has no opinion about how your views work. Local state is perfectly allowable, do what you've always done. Keep in mind that Hyperfiddle data sync is so fast (on par with static sites) that you may not need much local state; just use page navigation (the URL is a perfectly good place to store state).

Reframe

Reframe does not support SSR so we can't use it in hyperfiddle core. Hyperfiddle has no opinion or technical constraints on what userland apps do for view rendering or state management. It remains to be seen whether something like reframe is desirable for Hyperfiddle views in practice.

Query subscriptions

This is a Datomic question and it is possible for straightforward queries, see this reddit thread.

Realtime

ivar: would hyperfiddle be reasonable for a chat service ? what are example apps (real or imagined) that would a) benefit from and b) be a bad fit for hyperfiddle?
dustingetz: @ivar your questions are insightful. The short answer is the I/O runtime is about 1000 line "kernel" and can be replaced, so if you want realtime push over websockets, you can drop down to that level and code it like usual. The I/O runtime implementations are general purpose and could be shared or plugged into any other hyperfiddle app. The point is that userland is sheltered from all that
ivar: so the plan (or existing state) is to support different swappable IO implementations?
dustingetz: Yes, we have a couple, different apps have different I/O needs. A simple example is you can serve the app completely without javascript and rely only on server side rendering, hyperfiddle-consulting.com works like that. It turns out that disabling javascript is actually slower, Hyperfiddle is similar to https://www.gatsbyjs.org/ and is faster with javascript once the entire app data dependencies are in browser cache. Its up to the I/O runtime to make those decisions, the default one is very good, most apps dont need to think about this

DataScript Datomic data sync

u/muhaaa: I use re-frame + datascript (re-posh) in my frontend. I want to use my datascript query to subscribe to datomic data and send the result over the wire to my frontend. This would simplify the data sync so much! Anyone tried this? reddit thread

How far will it scale?

Without immutability in the database, all efforts to abstract higher will fail; because to achieve the necessary performance, requires writing imperative optimizations to imperative platforms (object-relational impedance mismatch, N+1 problems, deeply nested JOINs, caching vs batching tradeoffs). Hyperfiddle cannot be built on RDBMS or Neo4J; their imperative nature leaks through all attempts to abstract. This is why all 4GLs historically fail. Immutability, as always, to the rescue.
How high can we abstract? We aren't sure yet. It will scale until Datomic's app-as-a-value abstraction breaks down, at which point programmers will manually optimize their Datomic services. Datomic Peer vs Client vs Cloud makes a difference here as they all have different stories for code/data locality.
Hyperfiddle's abstraction has scaled quite far already, see Hyperfiddle-in-Hyperfiddle.

Triage

  • Eric: I would like to understand where caching actually happens
  • Eric: What happens from top to bottom when a form is rendered
  • Eric: synchronous and reactive - what does this mean?